Bug 275293
| Summary: | [SVG] Handle `repeatEvent` for svg animations | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | SVG | Assignee: | Ahmad Saleem <ahmad.saleem792> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | sabouhallawa, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar, WPTImpact |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=299047 | ||
Ahmad Saleem
Hi Team,
While going through SVG Animations failure, I noticed that we fail 'repeat' event.
Blink Commit: https://chromium.googlesource.com/chromium/blink/+/f7d3a4aaa8598d79b137dde63e9b401ea351e1e9
WebKit Source: https://github.com/WebKit/WebKit/blob/502bfe649c550c59266753403cb4b2ab86854333/Source/WebCore/svg/animation/SVGSMILElement.cpp
Following compiles:
> Source/WebCore/dom/EventNames.json:
Add -> "repeatEvent": { },
> Source/WebCore/svg/animation/SVGSMILElement.cpp:
In 'SVGSMILElement::progress':
After:
if (oldActiveState == Inactive)
startedActiveInterval();
Add following:
if (repeat && repeat != m_lastRepeat)
smilEventSender().dispatchEventSoon(*this, eventNames().repeatEventEvent);
In same, after 'if (seekToTime)' (within same loop) add following:
if (repeat) {
for (unsigned repeatEventCount = 1; repeatEventCount < repeat; repeatEventCount++) {
smilEventSender().dispatchEventSoon(*this, eventNames().repeatEventEvent);
}
if (m_activeState == Inactive)
smilEventSender().dispatchEventSoon(*this, eventNames().repeatEventEvent);
}
___
It progress following: https://wpt.fyi/results/svg/animations/repeat-event.svg?label=experimental&label=master&aligned=
___
Just raising so we can fix it.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/129919749>
Ahmad Saleem
Pull request: https://github.com/WebKit/WebKit/pull/29658
EWS
Committed 298715@main (d7366f00065a): <https://commits.webkit.org/298715@main>
Reviewed commits have been landed. Closing PR #29658 and removing active labels.