Bug 1548731 - part1 : support 'cuechange' event. r=smaug
authoralwu <alwu@mozilla.com>
Tue, 07 May 2019 11:21:29 +0000
changeset 531941 073a5c5c22621d3b22b6248135e1be1bf49c9c19
parent 531940 f883d868ce316ef506df5dd52cd0b9697c63760d
child 531942 cea220a6b7dd6c86a71c09d805e0eaa719b34317
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1548731
milestone68.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 1548731 - part1 : support 'cuechange' event. r=smaug According to the spec [1], `oncuechange` is one of the `GlobalEventHandler`. This event could be fired on `Track` element or `TextTrack` [2]. We would dispatch this event when we run the `TimeMarchesOn` algorithm. [1] https://html.spec.whatwg.org/multipage/webappapis.html#handler-oncuechange [2] https://html.spec.whatwg.org/multipage/media.html#event-media-cuechange [3] https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:event-media-cuechange Differential Revision: https://phabricator.services.mozilla.com/D29783
dom/events/EventNameList.h
dom/webidl/EventHandler.webidl
widget/EventMessageList.h
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -158,18 +158,17 @@ EVENT(CheckboxStateChange, eFormCheckbox
 EVENT(RadioStateChange, eFormRadioStateChange, EventNameType_None,
       eBasicEventClass)
 EVENT(auxclick, eMouseAuxClick, EventNameType_All, eMouseEventClass)
 EVENT(click, eMouseClick, EventNameType_All, eMouseEventClass)
 EVENT(close, eClose, EventNameType_HTMLXUL, eBasicEventClass)
 EVENT(contextmenu, eContextMenu, EventNameType_HTMLXUL, eMouseEventClass)
 NON_IDL_EVENT(mouselongtap, eMouseLongTap, EventNameType_HTMLXUL,
               eMouseEventClass)
-// Not supported yet
-// EVENT(cuechange)
+EVENT(cuechange, eCueChange, EventNameType_All, eBasicEventClass)
 EVENT(dblclick, eMouseDoubleClick, EventNameType_HTMLXUL, eMouseEventClass)
 EVENT(drag, eDrag, EventNameType_HTMLXUL, eDragEventClass)
 EVENT(dragend, eDragEnd, EventNameType_HTMLXUL, eDragEventClass)
 EVENT(dragenter, eDragEnter, EventNameType_HTMLXUL, eDragEventClass)
 EVENT(dragexit, eDragExit, EventNameType_HTMLXUL, eDragEventClass)
 EVENT(dragleave, eDragLeave, EventNameType_HTMLXUL, eDragEventClass)
 EVENT(dragover, eDragOver, EventNameType_HTMLXUL, eDragEventClass)
 EVENT(dragstart, eDragStart, EventNameType_HTMLXUL, eDragEventClass)
--- a/dom/webidl/EventHandler.webidl
+++ b/dom/webidl/EventHandler.webidl
@@ -33,17 +33,17 @@ interface GlobalEventHandlers {
            //(Not implemented)attribute EventHandler oncancel;
            attribute EventHandler onauxclick;
            attribute EventHandler oncanplay;
            attribute EventHandler oncanplaythrough;
            attribute EventHandler onchange;
            attribute EventHandler onclick;
            attribute EventHandler onclose;
            attribute EventHandler oncontextmenu;
-           //(Not implemented)attribute EventHandler oncuechange;
+           attribute EventHandler oncuechange;
            attribute EventHandler ondblclick;
            attribute EventHandler ondrag;
            attribute EventHandler ondragend;
            attribute EventHandler ondragenter;
            attribute EventHandler ondragexit;
            attribute EventHandler ondragleave;
            attribute EventHandler ondragover;
            attribute EventHandler ondragstart;
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -103,16 +103,18 @@ NS_EVENT_MESSAGE(ePointerEnter)
 NS_EVENT_MESSAGE(ePointerLeave)
 NS_EVENT_MESSAGE(ePointerCancel)
 NS_EVENT_MESSAGE(ePointerGotCapture)
 NS_EVENT_MESSAGE(ePointerLostCapture)
 NS_EVENT_MESSAGE_FIRST_LAST(ePointerEvent, ePointerMove, ePointerLostCapture)
 
 NS_EVENT_MESSAGE(eContextMenu)
 
+NS_EVENT_MESSAGE(eCueChange)
+
 NS_EVENT_MESSAGE(eLoad)
 NS_EVENT_MESSAGE(eUnload)
 NS_EVENT_MESSAGE(eHashChange)
 NS_EVENT_MESSAGE(eImageAbort)
 NS_EVENT_MESSAGE(eLoadError)
 NS_EVENT_MESSAGE(eLoadEnd)
 NS_EVENT_MESSAGE(ePopState)
 NS_EVENT_MESSAGE(eRejectionHandled)