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
--- 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;