Bug 911987 part 1 - Add onanimation** and ontransitionend event handlers. r=masayuki,smaug
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Fri, 05 Aug 2016 08:12:14 +0900
changeset 308521 42b9cd44c5462162e563a01ac460c703d811dcae
parent 308520 61a4dd746681fe7c56e1802fc80fe58caf426869
child 308522 c941f7d76a27530cecc9d94106e28e058bc7b483
push id31129
push usermantaroh@gmail.com
push dateMon, 08 Aug 2016 02:36:40 +0000
treeherderautoland@9dc08c2240db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki, smaug
bugs911987
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 911987 part 1 - Add onanimation** and ontransitionend event handlers. r=masayuki,smaug This event handler is defined CSS-Animation and CSS-Transition. https://drafts.csswg.org/css-animations-1/#event-animationevent https://github.com/w3c/csswg-drafts/pull/344 MozReview-Commit-ID: ARgsibd7wST
dom/events/EventNameList.h
dom/webidl/EventHandler.webidl
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -69,17 +69,17 @@
 #error "Don't define NON_IDL_EVENT"
 #endif /* NON_IDL_EVENT */
 
 #define EVENT MESSAGE_TO_EVENT
 #define WINDOW_ONLY_EVENT MESSAGE_TO_EVENT
 #define TOUCH_EVENT MESSAGE_TO_EVENT
 #define DOCUMENT_ONLY_EVENT MESSAGE_TO_EVENT
 #define NON_IDL_EVENT MESSAGE_TO_EVENT
-#endif
+#endif /* MESSAGE_TO_EVENT */
 
 #ifdef DEFINED_FORWARDED_EVENT
 #error "Don't define DEFINED_FORWARDED_EVENT"
 #endif /* DEFINED_FORWARDED_EVENT */
 
 #ifndef FORWARDED_EVENT
 #define FORWARDED_EVENT EVENT
 #define DEFINED_FORWARDED_EVENT
@@ -951,32 +951,32 @@ NON_IDL_EVENT(MozEdgeUICanceled,
               EventNameType_None,
               eSimpleGestureEventClass)
 NON_IDL_EVENT(MozEdgeUICompleted,
               eEdgeUICompleted,
               EventNameType_None,
               eSimpleGestureEventClass)
 
 // CSS Transition & Animation events:
-NON_IDL_EVENT(transitionend,
-              eTransitionEnd,
-              EventNameType_None,
-              eTransitionEventClass)
-NON_IDL_EVENT(animationstart,
-              eAnimationStart,
-              EventNameType_None,
-              eAnimationEventClass)
-NON_IDL_EVENT(animationend,
-              eAnimationEnd,
-              EventNameType_None,
-              eAnimationEventClass)
-NON_IDL_EVENT(animationiteration,
-              eAnimationIteration,
-              EventNameType_None,
-              eAnimationEventClass)
+EVENT(transitionend,
+      eTransitionEnd,
+      EventNameType_All,
+      eTransitionEventClass)
+EVENT(animationstart,
+      eAnimationStart,
+      EventNameType_All,
+      eAnimationEventClass)
+EVENT(animationend,
+      eAnimationEnd,
+      EventNameType_All,
+      eAnimationEventClass)
+EVENT(animationiteration,
+      eAnimationIteration,
+      EventNameType_All,
+      eAnimationEventClass)
 
 // Webkit-prefixed versions of Transition & Animation events, for web compat:
 NON_IDL_EVENT(webkitTransitionEnd,
               eWebkitTransitionEnd,
               EventNameType_None,
               eTransitionEventClass)
 NON_IDL_EVENT(webkitAnimationEnd,
               eWebkitAnimationEnd,
--- a/dom/webidl/EventHandler.webidl
+++ b/dom/webidl/EventHandler.webidl
@@ -120,16 +120,22 @@ interface GlobalEventHandlers {
            // Mozilla-specific handlers. Unprefixed handlers live in
            // Document rather than here.
            attribute EventHandler onmozfullscreenchange;
            attribute EventHandler onmozfullscreenerror;
            [Pref="pointer-lock-api.prefixed.enabled"]
            attribute EventHandler onmozpointerlockchange;
            [Pref="pointer-lock-api.prefixed.enabled"]
            attribute EventHandler onmozpointerlockerror;
+
+           // CSS-Animation and CSS-Transition handlers.
+           attribute EventHandler onanimationend;
+           attribute EventHandler onanimationiteration;
+           attribute EventHandler onanimationstart;
+           attribute EventHandler ontransitionend;
 };
 
 [NoInterfaceObject]
 interface WindowEventHandlers {
            attribute EventHandler onafterprint;
            attribute EventHandler onbeforeprint;
            attribute OnBeforeUnloadEventHandler onbeforeunload;
            attribute EventHandler onhashchange;