Title: [216510] trunk
Revision
216510
Author
cdu...@apple.com
Date
2017-05-09 09:51:00 -0700 (Tue, 09 May 2017)

Log Message

ontransitionend eventHandler should be in GlobalEventHandlers
https://bugs.webkit.org/show_bug.cgi?id=171836

Reviewed by Ryosuke Niwa.

Source/WebCore:

ontransitionend eventHandler should be in GlobalEventHandlers:
- https://drafts.csswg.org/css-transitions/#interface-globaleventhandlers-idl

WebKit currently has in on Window and Element only. Firefox matches the specification.

Test: fast/css/ontransitionend-eventhandler.html

* dom/Element.idl:
* dom/GlobalEventHandlers.idl:
* page/DOMWindow.idl:

LayoutTests:

* fast/css/ontransitionend-eventhandler-expected.txt: Added.
* fast/css/ontransitionend-eventhandler.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.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (216509 => 216510)


--- trunk/LayoutTests/ChangeLog	2017-05-09 16:00:22 UTC (rev 216509)
+++ trunk/LayoutTests/ChangeLog	2017-05-09 16:51:00 UTC (rev 216510)
@@ -1,3 +1,19 @@
+2017-05-09  Chris Dumez  <cdu...@apple.com>
+
+        ontransitionend eventHandler should be in GlobalEventHandlers
+        https://bugs.webkit.org/show_bug.cgi?id=171836
+
+        Reviewed by Ryosuke Niwa.
+
+        * fast/css/ontransitionend-eventhandler-expected.txt: Added.
+        * fast/css/ontransitionend-eventhandler.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  Nael Ouedraogo  <nael.ouedra...@crf.canon.fr>
 
         Invalid MediaSource duration value should throw TyperError instead of InvalidStateError

Added: trunk/LayoutTests/fast/css/ontransitionend-eventhandler-expected.txt (0 => 216510)


--- trunk/LayoutTests/fast/css/ontransitionend-eventhandler-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/ontransitionend-eventhandler-expected.txt	2017-05-09 16:51:00 UTC (rev 216510)
@@ -0,0 +1,6 @@
+
+PASS HTMLElement should have ontransitionend event handler. 
+PASS Window should have ontransitionend event handler. 
+PASS SVGElement should have ontransitionend event handler. 
+PASS Document should have ontransitionend event handler. 
+

Added: trunk/LayoutTests/fast/css/ontransitionend-eventhandler.html (0 => 216510)


--- trunk/LayoutTests/fast/css/ontransitionend-eventhandler.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/ontransitionend-eventhandler.html	2017-05-09 16:51:00 UTC (rev 216510)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script src=""
+<script>
+test(function() {
+    assert_own_property(HTMLElement.prototype, "ontransitionend", "HTMLElement.prototype");
+    assert_idl_attribute(document.createElement("div"), "ontransitionend", "div.ontransitionend");
+}, "HTMLElement should have ontransitionend event handler.");
+
+test(function() {
+    assert_own_property(window, "ontransitionend", "window.ontransitionend");
+}, "Window should have ontransitionend event handler.");
+
+test(function() {
+    const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
+    assert_own_property(SVGElement.prototype, "ontransitionend", "SVGElement.prototype");
+    assert_idl_attribute(svg, "ontransitionend", "svg.ontransitionend");
+}, "SVGElement should have ontransitionend event handler.");
+
+test(function() {
+    assert_own_property(Document.prototype, "ontransitionend", "Document.prototype");
+    assert_idl_attribute(document, "ontransitionend", "document.ontransitionend");
+}, "Document should have ontransitionend event handler.");
+</script>
+</body>
+</html>

Modified: trunk/LayoutTests/fast/dom/event-handler-attributes-expected.txt (216509 => 216510)


--- trunk/LayoutTests/fast/dom/event-handler-attributes-expected.txt	2017-05-09 16:00:22 UTC (rev 216509)
+++ trunk/LayoutTests/fast/dom/event-handler-attributes-expected.txt	2017-05-09 16:51:00 UTC (rev 216510)
@@ -160,6 +160,7 @@
 PASS testScriptAttribute(document, "submit") is "document"
 PASS testScriptAttribute(document, "suspend") is "document"
 PASS testScriptAttribute(document, "timeupdate") is "document"
+PASS testScriptAttribute(document, "transitionend") is "document"
 PASS testScriptAttribute(document, "volumechange") is "document"
 PASS testScriptAttribute(document, "waiting") is "document"
 PASS testScriptAttribute(document, "wheel") is "document"
@@ -182,7 +183,6 @@
 PASS testScriptAttribute(document, "pageshow") is "none"
 PASS testScriptAttribute(document, "popstate") is "none"
 PASS testScriptAttribute(document, "storage") is "none"
-PASS testScriptAttribute(document, "transitionend") is "none"
 PASS testScriptAttribute(document, "unload") is "none"
 PASS testScriptAttribute(document, "webkitanimationend") is "none"
 PASS testScriptAttribute(document, "webkitanimationiteration") is "none"
@@ -932,7 +932,7 @@
 PASS testElementAttribute(nonHTMLElement, "submit") is "none"
 PASS testElementAttribute(nonHTMLElement, "suspend") is "none"
 PASS testElementAttribute(nonHTMLElement, "timeupdate") is "none"
-FAIL testElementAttribute(nonHTMLElement, "transitionend") should be none. Was script: target; content: none.
+PASS testElementAttribute(nonHTMLElement, "transitionend") is "none"
 PASS testElementAttribute(nonHTMLElement, "unload") is "none"
 PASS testElementAttribute(nonHTMLElement, "volumechange") is "none"
 PASS testElementAttribute(nonHTMLElement, "waiting") is "none"

Modified: trunk/LayoutTests/fast/dom/event-handler-attributes.html (216509 => 216510)


--- trunk/LayoutTests/fast/dom/event-handler-attributes.html	2017-05-09 16:00:22 UTC (rev 216509)
+++ trunk/LayoutTests/fast/dom/event-handler-attributes.html	2017-05-09 16:51:00 UTC (rev 216510)
@@ -65,6 +65,7 @@
     "submit",
     "suspend",
     "timeupdate",
+    "transitionend",
     "volumechange",
     "waiting",
     "search",
@@ -98,7 +99,6 @@
     "animationend",
     "animationiteration",
     "animationstart",
-    "transitionend",
     "webkitanimationend",
     "webkitanimationiteration",
     "webkitanimationstart",

Modified: trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt (216509 => 216510)


--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt	2017-05-09 16:00:22 UTC (rev 216509)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt	2017-05-09 16:51:00 UTC (rev 216510)
@@ -110,6 +110,7 @@
 PASS a["onunhandledrejection"] is null
 PASS a["onvolumechange"] is null
 PASS a["onwaiting"] is null
+PASS a["ontransitionend"] 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 (216509 => 216510)


--- trunk/LayoutTests/platform/ios/fast/dom/event-handler-attributes-expected.txt	2017-05-09 16:00:22 UTC (rev 216509)
+++ trunk/LayoutTests/platform/ios/fast/dom/event-handler-attributes-expected.txt	2017-05-09 16:51:00 UTC (rev 216510)
@@ -160,6 +160,7 @@
 PASS testScriptAttribute(document, "submit") is "document"
 PASS testScriptAttribute(document, "suspend") is "document"
 PASS testScriptAttribute(document, "timeupdate") is "document"
+PASS testScriptAttribute(document, "transitionend") is "document"
 PASS testScriptAttribute(document, "volumechange") is "document"
 PASS testScriptAttribute(document, "waiting") is "document"
 PASS testScriptAttribute(document, "wheel") is "document"
@@ -182,7 +183,6 @@
 PASS testScriptAttribute(document, "pageshow") is "none"
 PASS testScriptAttribute(document, "popstate") is "none"
 PASS testScriptAttribute(document, "storage") is "none"
-PASS testScriptAttribute(document, "transitionend") is "none"
 PASS testScriptAttribute(document, "unload") is "none"
 PASS testScriptAttribute(document, "webkitanimationend") is "none"
 PASS testScriptAttribute(document, "webkitanimationiteration") is "none"
@@ -932,7 +932,7 @@
 PASS testElementAttribute(nonHTMLElement, "submit") is "none"
 PASS testElementAttribute(nonHTMLElement, "suspend") is "none"
 PASS testElementAttribute(nonHTMLElement, "timeupdate") is "none"
-FAIL testElementAttribute(nonHTMLElement, "transitionend") should be none. Was script: target; content: none.
+PASS testElementAttribute(nonHTMLElement, "transitionend") is "none"
 PASS testElementAttribute(nonHTMLElement, "unload") is "none"
 PASS testElementAttribute(nonHTMLElement, "volumechange") is "none"
 PASS testElementAttribute(nonHTMLElement, "waiting") is "none"

Modified: trunk/Source/WebCore/ChangeLog (216509 => 216510)


--- trunk/Source/WebCore/ChangeLog	2017-05-09 16:00:22 UTC (rev 216509)
+++ trunk/Source/WebCore/ChangeLog	2017-05-09 16:51:00 UTC (rev 216510)
@@ -1,3 +1,21 @@
+2017-05-09  Chris Dumez  <cdu...@apple.com>
+
+        ontransitionend eventHandler should be in GlobalEventHandlers
+        https://bugs.webkit.org/show_bug.cgi?id=171836
+
+        Reviewed by Ryosuke Niwa.
+
+        ontransitionend eventHandler should be in GlobalEventHandlers:
+        - https://drafts.csswg.org/css-transitions/#interface-globaleventhandlers-idl
+
+        WebKit currently has in on Window and Element only. Firefox matches the specification.
+
+        Test: fast/css/ontransitionend-eventhandler.html
+
+        * dom/Element.idl:
+        * dom/GlobalEventHandlers.idl:
+        * page/DOMWindow.idl:
+
 2017-05-09  Nael Ouedraogo  <nael.ouedra...@crf.canon.fr>
 
         MediaSource.readyState should use an IDL enum

Modified: trunk/Source/WebCore/dom/Element.idl (216509 => 216510)


--- trunk/Source/WebCore/dom/Element.idl	2017-05-09 16:00:22 UTC (rev 216509)
+++ trunk/Source/WebCore/dom/Element.idl	2017-05-09 16:51:00 UTC (rev 216510)
@@ -123,15 +123,6 @@
     [NotEnumerable, ImplementedAs=onwebkitAnimationStart] attribute EventHandler onwebkitanimationstart; // Non-standard.
     [NotEnumerable, ImplementedAs=onwebkitTransitionEnd] attribute EventHandler onwebkittransitionend; // Non-standard.
 
-    // Event handlers from CSS Transitions API.
-    // FIXME: Should be moved to GlobalEventHandlers.
-    // https://drafts.csswg.org/css-transitions/#interface-globaleventhandlers-idl
-    [NotEnumerable] attribute EventHandler ontransitionend; // FIXME: Should be enumerable.
-    // attribute EventHandler ontransitionrun;
-    // attribute EventHandler ontransitionstart;
-    // attribute EventHandler ontransitioncancel;
-    [NotEnumerable, ImplementedAs=onwebkitAnimationEnd] attribute EventHandler onwebkitanimationend; // 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;
@@ -138,6 +129,7 @@
     [NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongesturestart;
 
     // Non standard event handlers.
+    [NotEnumerable, ImplementedAs=onwebkitAnimationEnd] attribute EventHandler onwebkitanimationend;
     [NotEnumerable] attribute EventHandler onbeforecopy;
     [NotEnumerable] attribute EventHandler onbeforecut;
     [NotEnumerable] attribute EventHandler onbeforeinput;

Modified: trunk/Source/WebCore/dom/GlobalEventHandlers.idl (216509 => 216510)


--- trunk/Source/WebCore/dom/GlobalEventHandlers.idl	2017-05-09 16:00:22 UTC (rev 216509)
+++ trunk/Source/WebCore/dom/GlobalEventHandlers.idl	2017-05-09 16:51:00 UTC (rev 216510)
@@ -97,7 +97,13 @@
     attribute EventHandler onvolumechange;
     attribute EventHandler onwaiting;
 
+    // Extensions from CSS Transitions API (https://drafts.csswg.org/css-transitions/#interface-globaleventhandlers-idl).
+    attribute EventHandler ontransitionend;
+    // attribute EventHandler ontransitionrun;
+    // attribute EventHandler ontransitionstart;
+    // attribute EventHandler ontransitioncancel;
 
+
     // Additions that are not yet part of the standard.
 
     [NotEnumerable] attribute EventHandler onsearch;

Modified: trunk/Source/WebCore/page/DOMWindow.idl (216509 => 216510)


--- trunk/Source/WebCore/page/DOMWindow.idl	2017-05-09 16:00:22 UTC (rev 216509)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2017-05-09 16:51:00 UTC (rev 216510)
@@ -196,14 +196,6 @@
     [NotEnumerable, ImplementedAs=onwebkitAnimationStart] attribute EventHandler onwebkitanimationstart; // Non standard.
     [NotEnumerable, ImplementedAs=onwebkitTransitionEnd] attribute EventHandler onwebkittransitionend; // Non standard.
 
-    // Event handlers from CSS Transitions API.
-    // FIXME: Should be moved to GlobalEventHandlers.
-    // https://drafts.csswg.org/css-transitions/#interface-globaleventhandlers-idl
-    [NotEnumerable] attribute EventHandler ontransitionend; // FIXME: Should be enumerable.
-    // attribute EventHandler ontransitionrun;
-    // attribute EventHandler ontransitionstart;
-    // attribute EventHandler ontransitioncancel;
-
     // iOS Gesture API event handlers.
     [NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongesturechange;
     [NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongestureend;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to