WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
281404
SVG Animation Event names might need to be special-cased
https://bugs.webkit.org/show_bug.cgi?id=281404
Summary
SVG Animation Event names might need to be special-cased
Ahmad Saleem
Reported
2024-10-13 17:38:01 PDT
Hi Team, While looking into why we don't have following EventHandlers in the `SVGAnimationElement.idl`: attribute EventHandler onbegin; attribute EventHandler onend; attribute EventHandler onrepeat; Web Specification:
https://svgwg.org/specs/animations/#InterfaceSVGAnimationElement
__ When we have to add them in
bug 275669
(PR -
https://github.com/WebKit/WebKit/pull/29984
), it is something where we need to add. `begin` in (EventNames), where this can be linked with `onbegin` instead of `EventNames` automatically linking with `beginEvent` (which we already have). Without adding `begin`, we fail `idlharness.html` tests in `svg` directory. ___ We have following already. `beginEvent` `endEvent` in EventNames.json but if I add just `idl` bits, it does not compile and give error (at least for begin) but if I add `begin` then it compiles. Although, it leads to another WPT test failures. ____ So now why we need special case: 1) We already have `end` and `endEvent` in `EventNames.json` 2) Now if I add `attribute EventHandler.json 3) It compiles and progress one test in WPT but at the same time leads to this failure. FAILURE:
https://wpt.fyi/results/svg/animations/custom-events.html?label=experimental&label=master&aligned
___ Now look into failure: First test -> custom events with the name 'end' should only call the event listener for the event 'end' and no attribute handlers or IDL listeners Second -> custom events with the name 'endEvent' should call 'onend' attribute handlers and IDL property listeners, and 'endEvent' listeners By adding `IDL`, we start failing first one. ___ We need to make sure, `endEvent` map to `onend` and similarly for other `beginEvent` map to `onbegin` etc. ____ This was done via something like this in blink: + DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(begin, beginEvent); + DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(end, endEvent); + DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(repeat, repeatEvent); Commit -
https://codereview.chromium.org/201673003
___ We have removed `DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER` macro as well. ____ If we add `begin` in EventNames.json, it leads to following `Safe C++` [Smart Pointer] violation:
https://ews-build.webkit.org/#/builders/120/builds/1177
'Found 1 new failure in JSSVGAnimationElement.cpp' => UncountedCallArgsChecker JSSVGAnimationElement.cpp ___ Just raising so we can fix it. Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-10-20 17:38:13 PDT
<
rdar://problem/138288795
>
Karl Dubost
Comment 2
2024-11-06 22:55:55 PST
https://searchfox.org/wubkat/rev/d45649fa32a499702c30474e94bd6843c4c67849/Source/WebCore/svg/SVGAnimationElement.idl
SMIL has attributes.
https://searchfox.org/wubkat/rev/d45649fa32a499702c30474e94bd6843c4c67849/Source/WebCore/svg/animation/SVGSMILElement.cpp#513-518
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug