Diff
Modified: trunk/LayoutTests/ChangeLog (216539 => 216540)
--- trunk/LayoutTests/ChangeLog 2017-05-09 21:04:31 UTC (rev 216539)
+++ trunk/LayoutTests/ChangeLog 2017-05-09 21:21:04 UTC (rev 216540)
@@ -1,3 +1,19 @@
+2017-05-09 Chris Dumez <cdu...@apple.com>
+
+ Move onanimation* EventHandlers to GlobalEventHandlers
+ https://bugs.webkit.org/show_bug.cgi?id=171874
+
+ Reviewed by Simon Fraser.
+
+ * fast/css/onanimation-eventhandlers-expected.txt: Added.
+ * fast/css/onanimation-eventhandlers.html: Added.
+ Add layout test coverage.
+
+ * fast/dom/event-handler-attributes-expected.txt:
+ * fast/dom/event-handler-attributes.html:
+ * js/dom/dom-static-property-for-in-iteration-expected.txt:
+ Rebaseline existing tests to reflect behavior change.
+
2017-05-09 Matt Lewis <jlew...@apple.com>
Fixed a typo in expectations file.
Added: trunk/LayoutTests/fast/css/onanimation-eventhandlers-expected.txt (0 => 216540)
--- trunk/LayoutTests/fast/css/onanimation-eventhandlers-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css/onanimation-eventhandlers-expected.txt 2017-05-09 21:21:04 UTC (rev 216540)
@@ -0,0 +1,6 @@
+
+PASS HTMLElement should have onanimation* event handlers.
+PASS Window should have onanimation* event handlers.
+PASS SVGElement should have onanimation* event handlers.
+PASS Document should have onanimation* event handlers.
+
Added: trunk/LayoutTests/fast/css/onanimation-eventhandlers.html (0 => 216540)
--- trunk/LayoutTests/fast/css/onanimation-eventhandlers.html (rev 0)
+++ trunk/LayoutTests/fast/css/onanimation-eventhandlers.html 2017-05-09 21:21:04 UTC (rev 216540)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script src=""
+<script>
+const animationEventHandlers = ["onanimationend", "onanimationiteration", "onanimationstart"];
+test(function() {
+ for (let animationEventHandler of animationEventHandlers) {
+ assert_own_property(HTMLElement.prototype, animationEventHandler, animationEventHandler + " on HTMLElement.prototype");
+ assert_idl_attribute(document.createElement("div"), animationEventHandler, "div." + animationEventHandler);
+ }
+}, "HTMLElement should have onanimation* event handlers.");
+
+test(function() {
+ for (let animationEventHandler of animationEventHandlers)
+ assert_own_property(window, animationEventHandler, "window." + animationEventHandler);
+}, "Window should have onanimation* event handlers.");
+
+test(function() {
+ const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
+ for (let animationEventHandler of animationEventHandlers) {
+ assert_own_property(SVGElement.prototype, animationEventHandler, animationEventHandler + " on SVGElement.prototype");
+ assert_idl_attribute(svg, animationEventHandler, "svg." + animationEventHandler);
+ }
+}, "SVGElement should have onanimation* event handlers.");
+
+test(function() {
+ for (let animationEventHandler of animationEventHandlers) {
+ assert_own_property(Document.prototype, animationEventHandler, animationEventHandler + " on Document.prototype");
+ assert_idl_attribute(document, animationEventHandler, "document." + animationEventHandler);
+ }
+}, "Document should have onanimation* event handlers.");
+</script>
+</body>
+</html>
Modified: trunk/LayoutTests/fast/dom/event-handler-attributes-expected.txt (216539 => 216540)
--- trunk/LayoutTests/fast/dom/event-handler-attributes-expected.txt 2017-05-09 21:04:31 UTC (rev 216539)
+++ trunk/LayoutTests/fast/dom/event-handler-attributes-expected.txt 2017-05-09 21:21:04 UTC (rev 216540)
@@ -99,6 +99,9 @@
Event names we expect to be able to set on the document
PASS testScriptAttribute(document, "abort") is "document"
+PASS testScriptAttribute(document, "animationend") is "document"
+PASS testScriptAttribute(document, "animationiteration") is "document"
+PASS testScriptAttribute(document, "animationstart") is "document"
PASS testScriptAttribute(document, "beforecopy") is "document"
PASS testScriptAttribute(document, "beforecut") is "document"
PASS testScriptAttribute(document, "beforepaste") is "document"
@@ -167,9 +170,6 @@
Event names we expect not to be able to set on the document
-PASS testScriptAttribute(document, "animationend") is "none"
-PASS testScriptAttribute(document, "animationiteration") is "none"
-PASS testScriptAttribute(document, "animationstart") is "none"
PASS testScriptAttribute(document, "beforeload") is "none"
PASS testScriptAttribute(document, "beforeunload") is "none"
PASS testScriptAttribute(document, "focusin") is "none"
@@ -855,9 +855,9 @@
Event names on a non-HTML element
PASS testElementAttribute(nonHTMLElement, "abort") is "none"
-FAIL testElementAttribute(nonHTMLElement, "animationend") should be none. Was script: target; content: none.
-FAIL testElementAttribute(nonHTMLElement, "animationiteration") should be none. Was script: target; content: none.
-FAIL testElementAttribute(nonHTMLElement, "animationstart") should be none. Was script: target; content: none.
+PASS testElementAttribute(nonHTMLElement, "animationend") is "none"
+PASS testElementAttribute(nonHTMLElement, "animationiteration") is "none"
+PASS testElementAttribute(nonHTMLElement, "animationstart") is "none"
FAIL testElementAttribute(nonHTMLElement, "beforecopy") should be none. Was script: target; content: none.
FAIL testElementAttribute(nonHTMLElement, "beforecut") should be none. Was script: target; content: none.
FAIL testElementAttribute(nonHTMLElement, "beforeload") should be none. Was script: target; content: none.
Modified: trunk/LayoutTests/fast/dom/event-handler-attributes.html (216539 => 216540)
--- trunk/LayoutTests/fast/dom/event-handler-attributes.html 2017-05-09 21:04:31 UTC (rev 216539)
+++ trunk/LayoutTests/fast/dom/event-handler-attributes.html 2017-05-09 21:21:04 UTC (rev 216540)
@@ -14,6 +14,9 @@
const eventsInGlobalEventHandlers = [
"abort",
+ "animationend",
+ "animationiteration",
+ "animationstart",
"blur",
"canplay",
"canplaythrough",
@@ -96,9 +99,6 @@
];
const elementAndWindowEvents = [
- "animationend",
- "animationiteration",
- "animationstart",
"webkitanimationend",
"webkitanimationiteration",
"webkitanimationstart",
Modified: trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt (216539 => 216540)
--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt 2017-05-09 21:04:31 UTC (rev 216539)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt 2017-05-09 21:21:04 UTC (rev 216540)
@@ -111,6 +111,9 @@
PASS a["onvolumechange"] is null
PASS a["onwaiting"] is null
PASS a["ontransitionend"] is null
+PASS a["onanimationend"] is null
+PASS a["onanimationiteration"] is null
+PASS a["onanimationstart"] is null
PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
PASS a["prefix"] is null
PASS a["localName"] is a
Modified: trunk/LayoutTests/platform/ios/fast/dom/event-handler-attributes-expected.txt (216539 => 216540)
--- trunk/LayoutTests/platform/ios/fast/dom/event-handler-attributes-expected.txt 2017-05-09 21:04:31 UTC (rev 216539)
+++ trunk/LayoutTests/platform/ios/fast/dom/event-handler-attributes-expected.txt 2017-05-09 21:21:04 UTC (rev 216540)
@@ -99,6 +99,9 @@
Event names we expect to be able to set on the document
PASS testScriptAttribute(document, "abort") is "document"
+PASS testScriptAttribute(document, "animationend") is "document"
+PASS testScriptAttribute(document, "animationiteration") is "document"
+PASS testScriptAttribute(document, "animationstart") is "document"
PASS testScriptAttribute(document, "beforecopy") is "document"
PASS testScriptAttribute(document, "beforecut") is "document"
PASS testScriptAttribute(document, "beforepaste") is "document"
@@ -167,9 +170,6 @@
Event names we expect not to be able to set on the document
-PASS testScriptAttribute(document, "animationend") is "none"
-PASS testScriptAttribute(document, "animationiteration") is "none"
-PASS testScriptAttribute(document, "animationstart") is "none"
PASS testScriptAttribute(document, "beforeload") is "none"
PASS testScriptAttribute(document, "beforeunload") is "none"
PASS testScriptAttribute(document, "focusin") is "none"
@@ -855,9 +855,9 @@
Event names on a non-HTML element
PASS testElementAttribute(nonHTMLElement, "abort") is "none"
-FAIL testElementAttribute(nonHTMLElement, "animationend") should be none. Was script: target; content: none.
-FAIL testElementAttribute(nonHTMLElement, "animationiteration") should be none. Was script: target; content: none.
-FAIL testElementAttribute(nonHTMLElement, "animationstart") should be none. Was script: target; content: none.
+PASS testElementAttribute(nonHTMLElement, "animationend") is "none"
+PASS testElementAttribute(nonHTMLElement, "animationiteration") is "none"
+PASS testElementAttribute(nonHTMLElement, "animationstart") is "none"
FAIL testElementAttribute(nonHTMLElement, "beforecopy") should be none. Was script: target; content: none.
FAIL testElementAttribute(nonHTMLElement, "beforecut") should be none. Was script: target; content: none.
FAIL testElementAttribute(nonHTMLElement, "beforeload") should be none. Was script: target; content: none.
Modified: trunk/Source/WebCore/ChangeLog (216539 => 216540)
--- trunk/Source/WebCore/ChangeLog 2017-05-09 21:04:31 UTC (rev 216539)
+++ trunk/Source/WebCore/ChangeLog 2017-05-09 21:21:04 UTC (rev 216540)
@@ -1,3 +1,22 @@
+2017-05-09 Chris Dumez <cdu...@apple.com>
+
+ Move onanimation* EventHandlers to GlobalEventHandlers
+ https://bugs.webkit.org/show_bug.cgi?id=171874
+
+ Reviewed by Simon Fraser.
+
+ Move onanimation* EventHandlers to GlobalEventHandlers to match the specification:
+ - https://drafts.csswg.org/css-animations/#interface-globaleventhandlers-idl
+
+ We previously have those on Window and Element only. Firefox complies with the
+ specification.
+
+ Test: fast/css/onanimation-eventhandlers.html
+
+ * dom/Element.idl:
+ * dom/GlobalEventHandlers.idl:
+ * page/DOMWindow.idl:
+
2017-05-09 Youenn Fablet <you...@apple.com>
Refresh webrtc WPT tests
Modified: trunk/Source/WebCore/dom/Element.idl (216539 => 216540)
--- trunk/Source/WebCore/dom/Element.idl 2017-05-09 21:04:31 UTC (rev 216539)
+++ trunk/Source/WebCore/dom/Element.idl 2017-05-09 21:21:04 UTC (rev 216540)
@@ -112,17 +112,6 @@
// FIXME: Should be moved to GlobalEventHandlers.
[NotEnumerable] attribute EventHandler onselectstart; // FIXME: Should be enumerable.
- // Event handlers from CSS Animations API.
- // FIXME: Should be moved to GlobalEventHandlers.
- // https://drafts.csswg.org/css-animations/#interface-globaleventhandlers-idl
- [NotEnumerable] attribute EventHandler onanimationend; // FIXME: Should be enumerable.
- [NotEnumerable] attribute EventHandler onanimationiteration; // FIXME: Should be enumerable.
- [NotEnumerable] attribute EventHandler onanimationstart; // FIXME: Should be enumerable.
- // attribute EventHandler onanimationcancel;
- [NotEnumerable, ImplementedAs=onwebkitAnimationIteration] attribute EventHandler onwebkitanimationiteration; // Non-standard.
- [NotEnumerable, ImplementedAs=onwebkitAnimationStart] attribute EventHandler onwebkitanimationstart; // Non-standard.
- [NotEnumerable, ImplementedAs=onwebkitTransitionEnd] attribute EventHandler onwebkittransitionend; // Non-standard.
-
// Non-standard WebKit API (https://developer.apple.com/reference/webkitjs/gestureevent).
[NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongesturechange;
[NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongestureend;
@@ -137,6 +126,9 @@
[NotEnumerable] attribute EventHandler oncopy;
[NotEnumerable] attribute EventHandler oncut;
[NotEnumerable] attribute EventHandler onpaste;
+ [NotEnumerable, ImplementedAs=onwebkitAnimationIteration] attribute EventHandler onwebkitanimationiteration;
+ [NotEnumerable, ImplementedAs=onwebkitAnimationStart] attribute EventHandler onwebkitanimationstart;
+ [NotEnumerable, ImplementedAs=onwebkitTransitionEnd] attribute EventHandler onwebkittransitionend;
// FIXME: These event handlers should only be on Document (https://fullscreen.spec.whatwg.org/#api).
[NotEnumerable, Conditional=FULLSCREEN_API] attribute EventHandler onwebkitfullscreenchange;
Modified: trunk/Source/WebCore/dom/GlobalEventHandlers.idl (216539 => 216540)
--- trunk/Source/WebCore/dom/GlobalEventHandlers.idl 2017-05-09 21:04:31 UTC (rev 216539)
+++ trunk/Source/WebCore/dom/GlobalEventHandlers.idl 2017-05-09 21:21:04 UTC (rev 216540)
@@ -103,6 +103,11 @@
// attribute EventHandler ontransitionstart;
// attribute EventHandler ontransitioncancel;
+ // Event handlers from CSS Animations API (https://drafts.csswg.org/css-animations/#interface-globaleventhandlers-idl).
+ attribute EventHandler onanimationend;
+ attribute EventHandler onanimationiteration;
+ attribute EventHandler onanimationstart;
+ // attribute EventHandler onanimationcancel;
// Additions that are not yet part of the standard.
Modified: trunk/Source/WebCore/page/DOMWindow.idl (216539 => 216540)
--- trunk/Source/WebCore/page/DOMWindow.idl 2017-05-09 21:04:31 UTC (rev 216539)
+++ trunk/Source/WebCore/page/DOMWindow.idl 2017-05-09 21:21:04 UTC (rev 216540)
@@ -184,18 +184,6 @@
[MayThrowException, EnabledForWorld=shadowRootIsAlwaysOpen] NodeList collectMatchingElementsInFlatTree(Node scope, DOMString selectors);
[MayThrowException, EnabledForWorld=shadowRootIsAlwaysOpen] Element? matchingElementInFlatTree(Node scope, DOMString selectors);
- // Event handlers from CSS Animations API.
- // FIXME: Should be moved to GlobalEventHandlers.
- // https://drafts.csswg.org/css-animations/#interface-globaleventhandlers-idl
- [NotEnumerable] attribute EventHandler onanimationend; // FIXME: Should be enumerable.
- [NotEnumerable] attribute EventHandler onanimationiteration; // FIXME: Should be enumerable.
- [NotEnumerable] attribute EventHandler onanimationstart; // FIXME: Should be enumerable.
- // attribute EventHandler onanimationcancel;
- [NotEnumerable, ImplementedAs=onwebkitAnimationEnd] attribute EventHandler onwebkitanimationend; // Non standard.
- [NotEnumerable, ImplementedAs=onwebkitAnimationIteration] attribute EventHandler onwebkitanimationiteration; // Non standard.
- [NotEnumerable, ImplementedAs=onwebkitAnimationStart] attribute EventHandler onwebkitanimationstart; // Non standard.
- [NotEnumerable, ImplementedAs=onwebkitTransitionEnd] attribute EventHandler onwebkittransitionend; // Non standard.
-
// iOS Gesture API event handlers.
[NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongesturechange;
[NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongestureend;
@@ -207,8 +195,12 @@
// Event handler from DeviceOrientation Event Specification (https://w3c.github.io/deviceorientation/spec-source-orientation.html#deviceorientation)
[NotEnumerable, Conditional=DEVICE_ORIENTATION] attribute EventHandler ondeviceorientation; // FIXME: Should be enumerable.
- // Non standard event handler.
+ // Non standard event handlers.
[NotEnumerable, Conditional=PROXIMITY_EVENTS] attribute EventHandler onwebkitdeviceproximity;
+ [NotEnumerable, ImplementedAs=onwebkitAnimationEnd] attribute EventHandler onwebkitanimationend;
+ [NotEnumerable, ImplementedAs=onwebkitAnimationIteration] attribute EventHandler onwebkitanimationiteration;
+ [NotEnumerable, ImplementedAs=onwebkitAnimationStart] attribute EventHandler onwebkitanimationstart;
+ [NotEnumerable, ImplementedAs=onwebkitTransitionEnd] attribute EventHandler onwebkittransitionend;
};
DOMWindow implements GlobalCrypto;