Bug 911987 part 1 - Add onanimation** and ontransitionend event handlers. r?masayuki draft
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Fri, 05 Aug 2016 08:12:14 +0900
changeset 397029 38366c6813b91b99612fc5f3cd0aaef3ee946d0b
parent 396804 0ba72e8027cfcbcbf3426770ac264a7ade2af090
child 397030 7c64a40bd98bb99eb03bdf58243a04b3c145700b
push id25184
push usermantaroh@gmail.com
push dateFri, 05 Aug 2016 02:54:44 +0000
reviewersmasayuki
bugs911987
milestone51.0a1
Bug 911987 part 1 - Add onanimation** and ontransitionend event handlers. r?masayuki 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;