Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 81c3a71795e059166515a616172e0e6a87af0ca7
https://github.com/WebKit/WebKit/commit/81c3a71795e059166515a616172e0e6a87af0ca7
Author: Ahmad Saleem <[email protected]>
Date: 2026-03-14 (Sat, 14 Mar 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/svg/animations/custom-events-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/svg/animations/custom-events.html
M
LayoutTests/imported/w3c/web-platform-tests/svg/animations/event-listeners-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/svg/idlharness.window-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/trusted-types/TrustedTypePolicyFactory-getAttributeType-event-handler-content-attributes.tentative-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/trusted-types/set-event-handlers-content-attributes.tentative-expected.txt
M Source/WebCore/dom/EventNames.json
M Source/WebCore/svg/SVGAnimationElement.idl
Log Message:
-----------
Add onend EventHandler to SVGAnimationElement and fix event name mapping for
onbegin/onend/onrepeat
https://bugs.webkit.org/show_bug.cgi?id=309941
rdar://172533070
Reviewed by Chris Dumez and Anne van Kesteren.
The SVG spec [1] defines onbegin, onend, and onrepeat IDL attributes on
SVGAnimationElement that should map to beginEvent, endEvent, and
repeatEvent respectively. onend was missing entirely, and onbegin/onrepeat
were silently mapping to the wrong event names due to a naming collision
in the codegen.
The IDL code generator strips "on" and appends "Event" to produce the
C++ accessor (e.g. onend -> endEvent). But make-event-names.py also
appends "Event" to every EventNames.json entry to create accessors, so
eventNames().endEvent refers to the "end" event, not "endEvent". The
correct accessor for the "endEvent" event is eventNames().endEventEvent.
Using [ImplementedAs=onendEvent] makes the codegen strip "on" to get
"endEvent", then append "Event" to get "endEventEvent", producing the
correct eventNames().endEventEvent accessor.
[1] https://svgwg.org/specs/animations/#InterfaceSVGAnimationElement
* Source/WebCore/svg/SVGAnimationElement.idl:
> Progressions:
*
LayoutTests/imported/w3c/web-platform-tests/svg/animations/custom-events-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/svg/animations/event-listeners-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/svg/idlharness.window-expected.txt:
> Additional Coverage:
*
LayoutTests/imported/w3c/web-platform-tests/svg/animations/event-listeners.html:
`onbegin` and `onrepeat` special case testing
> Rebaselines:
*
LayoutTests/imported/w3c/web-platform-tests/trusted-types/TrustedTypePolicyFactory-getAttributeType-event-handler-content-attributes.tentative-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/trusted-types/set-event-handlers-content-attributes.tentative-expected.txt:
Canonical link: https://commits.webkit.org/309273@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications