Add event handlers for media-related events.

This commit is contained in:
Josh Matthews 2015-11-07 12:29:44 -05:00
parent d718da1c6a
commit a80320e24e
8 changed files with 30 additions and 218 deletions

View file

@ -347,17 +347,30 @@ macro_rules! global_event_handlers(
);
(NoOnload) => (
event_handler!(abort, GetOnabort, SetOnabort);
event_handler!(canplay, GetOncanplay, SetOncanplay);
event_handler!(canplaythrough, GetOncanplaythrough, SetOncanplaythrough);
event_handler!(change, GetOnchange, SetOnchange);
event_handler!(click, GetOnclick, SetOnclick);
event_handler!(dblclick, GetOndblclick, SetOndblclick);
event_handler!(emptied, GetOnemptied, SetOnemptied);
error_event_handler!(error, GetOnerror, SetOnerror);
event_handler!(input, GetOninput, SetOninput);
event_handler!(keydown, GetOnkeydown, SetOnkeydown);
event_handler!(keypress, GetOnkeypress, SetOnkeypress);
event_handler!(keyup, GetOnkeyup, SetOnkeyup);
event_handler!(loadeddata, GetOnloadeddata, SetOnloadeddata);
event_handler!(loadedmetata, GetOnloadedmetadata, SetOnloadedmetadata);
event_handler!(mouseover, GetOnmouseover, SetOnmouseover);
event_handler!(pause, GetOnpause, SetOnpause);
event_handler!(play, GetOnplay, SetOnplay);
event_handler!(playing, GetOnplaying, SetOnplaying);
event_handler!(progress, GetOnprogress, SetOnprogress);
event_handler!(reset, GetOnreset, SetOnreset);
event_handler!(submit, GetOnsubmit, SetOnsubmit);
event_handler!(suspend, GetOnsuspend, SetOnsuspend);
event_handler!(timeupdate, GetOntimeupdate, SetOntimeupdate);
event_handler!(toggle, GetOntoggle, SetOntoggle);
event_handler!(waiting, GetOnwaiting, SetOnwaiting);
)
);

View file

@ -20,26 +20,40 @@ callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional
optional any error);
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
// https://html.spec.whatwg.org/multipage/#globaleventhandlers
[NoInterfaceObject]
interface GlobalEventHandlers {
attribute EventHandler onabort;
attribute EventHandler onblur;
attribute EventHandler oncanplay;
attribute EventHandler oncanplaythrough;
attribute EventHandler onchange;
attribute EventHandler onclick;
attribute EventHandler ondblclick;
attribute EventHandler onemptied;
attribute OnErrorEventHandler onerror;
attribute EventHandler oninput;
attribute EventHandler onkeydown;
attribute EventHandler onkeypress;
attribute EventHandler onkeyup;
attribute EventHandler onload;
attribute EventHandler onloadeddata;
attribute EventHandler onloadedmetadata;
attribute EventHandler onmouseover;
attribute EventHandler onpause;
attribute EventHandler onplay;
attribute EventHandler onplaying;
attribute EventHandler onprogress;
attribute EventHandler onreset;
attribute EventHandler onresize;
attribute EventHandler onsubmit;
attribute EventHandler onsuspend;
attribute EventHandler ontimeupdate;
attribute EventHandler ontoggle;
attribute EventHandler onwaiting;
};
// https://html.spec.whatwg.org/multipage/#windoweventhandlers
[NoInterfaceObject]
interface WindowEventHandlers {
attribute EventHandler onunload;

View file

@ -66,9 +66,6 @@
[Document interface: attribute all]
expected: FAIL
[Document interface: attribute onabort]
expected: FAIL
[Document interface: attribute onautocomplete]
expected: FAIL
@ -78,12 +75,6 @@
[Document interface: attribute oncancel]
expected: FAIL
[Document interface: attribute oncanplay]
expected: FAIL
[Document interface: attribute oncanplaythrough]
expected: FAIL
[Document interface: attribute onclose]
expected: FAIL
@ -120,9 +111,6 @@
[Document interface: attribute ondurationchange]
expected: FAIL
[Document interface: attribute onemptied]
expected: FAIL
[Document interface: attribute onended]
expected: FAIL
@ -132,12 +120,6 @@
[Document interface: attribute oninvalid]
expected: FAIL
[Document interface: attribute onloadeddata]
expected: FAIL
[Document interface: attribute onloadedmetadata]
expected: FAIL
[Document interface: attribute onloadstart]
expected: FAIL
@ -162,18 +144,6 @@
[Document interface: attribute onmousewheel]
expected: FAIL
[Document interface: attribute onpause]
expected: FAIL
[Document interface: attribute onplay]
expected: FAIL
[Document interface: attribute onplaying]
expected: FAIL
[Document interface: attribute onprogress]
expected: FAIL
[Document interface: attribute onratechange]
expected: FAIL
@ -198,18 +168,9 @@
[Document interface: attribute onstalled]
expected: FAIL
[Document interface: attribute onsuspend]
expected: FAIL
[Document interface: attribute ontimeupdate]
expected: FAIL
[Document interface: attribute onvolumechange]
expected: FAIL
[Document interface: attribute onwaiting]
expected: FAIL
[Stringification of iframe.contentDocument]
expected: FAIL
@ -1593,9 +1554,6 @@
[HTMLElement interface: attribute commandChecked]
expected: FAIL
[HTMLElement interface: attribute onabort]
expected: FAIL
[HTMLElement interface: attribute onautocomplete]
expected: FAIL
@ -1605,12 +1563,6 @@
[HTMLElement interface: attribute oncancel]
expected: FAIL
[HTMLElement interface: attribute oncanplay]
expected: FAIL
[HTMLElement interface: attribute oncanplaythrough]
expected: FAIL
[HTMLElement interface: attribute onclose]
expected: FAIL
@ -1647,9 +1599,6 @@
[HTMLElement interface: attribute ondurationchange]
expected: FAIL
[HTMLElement interface: attribute onemptied]
expected: FAIL
[HTMLElement interface: attribute onended]
expected: FAIL
@ -1659,12 +1608,6 @@
[HTMLElement interface: attribute oninvalid]
expected: FAIL
[HTMLElement interface: attribute onloadeddata]
expected: FAIL
[HTMLElement interface: attribute onloadedmetadata]
expected: FAIL
[HTMLElement interface: attribute onloadstart]
expected: FAIL
@ -1689,18 +1632,6 @@
[HTMLElement interface: attribute onmousewheel]
expected: FAIL
[HTMLElement interface: attribute onpause]
expected: FAIL
[HTMLElement interface: attribute onplay]
expected: FAIL
[HTMLElement interface: attribute onplaying]
expected: FAIL
[HTMLElement interface: attribute onprogress]
expected: FAIL
[HTMLElement interface: attribute onratechange]
expected: FAIL
@ -1725,18 +1656,9 @@
[HTMLElement interface: attribute onstalled]
expected: FAIL
[HTMLElement interface: attribute onsuspend]
expected: FAIL
[HTMLElement interface: attribute ontimeupdate]
expected: FAIL
[HTMLElement interface: attribute onvolumechange]
expected: FAIL
[HTMLElement interface: attribute onwaiting]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "translate" with the proper type (2)]
expected: FAIL
@ -1812,9 +1734,6 @@
[HTMLElement interface: document.createElement("noscript") must inherit property "commandChecked" with the proper type (31)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onabort" with the proper type (32)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onautocomplete" with the proper type (33)]
expected: FAIL
@ -1824,12 +1743,6 @@
[HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type (36)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "oncanplay" with the proper type (37)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type (38)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type (41)]
expected: FAIL
@ -1866,9 +1779,6 @@
[HTMLElement interface: document.createElement("noscript") must inherit property "ondurationchange" with the proper type (53)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onemptied" with the proper type (54)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onended" with the proper type (55)]
expected: FAIL
@ -1878,12 +1788,6 @@
[HTMLElement interface: document.createElement("noscript") must inherit property "oninvalid" with the proper type (59)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onloadeddata" with the proper type (64)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onloadedmetadata" with the proper type (65)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onloadstart" with the proper type (66)]
expected: FAIL
@ -1908,18 +1812,6 @@
[HTMLElement interface: document.createElement("noscript") must inherit property "onmousewheel" with the proper type (74)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onpause" with the proper type (75)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onplay" with the proper type (76)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onplaying" with the proper type (77)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onprogress" with the proper type (78)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onratechange" with the proper type (79)]
expected: FAIL
@ -1944,18 +1836,9 @@
[HTMLElement interface: document.createElement("noscript") must inherit property "onstalled" with the proper type (88)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onsuspend" with the proper type (90)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "ontimeupdate" with the proper type (91)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onvolumechange" with the proper type (93)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onwaiting" with the proper type (94)]
expected: FAIL
[Element interface: document.createElement("noscript") must inherit property "query" with the proper type (34)]
expected: FAIL
@ -7905,9 +7788,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "queryAll" with the proper type (91)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onabort" with the proper type (94)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onautocomplete" with the proper type (95)]
expected: FAIL
@ -7917,12 +7797,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "oncancel" with the proper type (98)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "oncanplay" with the proper type (99)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "oncanplaythrough" with the proper type (100)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onclose" with the proper type (103)]
expected: FAIL
@ -7959,9 +7833,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "ondurationchange" with the proper type (115)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onemptied" with the proper type (116)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onended" with the proper type (117)]
expected: FAIL
@ -7971,12 +7842,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "oninvalid" with the proper type (121)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onloadeddata" with the proper type (126)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onloadedmetadata" with the proper type (127)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onloadstart" with the proper type (128)]
expected: FAIL
@ -8001,18 +7866,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onmousewheel" with the proper type (136)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onpause" with the proper type (137)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onplay" with the proper type (138)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onplaying" with the proper type (139)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onprogress" with the proper type (140)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onratechange" with the proper type (141)]
expected: FAIL
@ -8037,18 +7890,9 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onstalled" with the proper type (150)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onsuspend" with the proper type (152)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "ontimeupdate" with the proper type (153)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onvolumechange" with the proper type (155)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onwaiting" with the proper type (156)]
expected: FAIL
[HTMLAnchorElement interface: attribute origin]
expected: FAIL
@ -8451,9 +8295,6 @@
[Document interface: calling queryAll(DOMString) on new Document() with too few arguments must throw TypeError]
expected: FAIL
[Document interface: new Document() must inherit property "onabort" with the proper type (94)]
expected: FAIL
[Document interface: new Document() must inherit property "onautocomplete" with the proper type (95)]
expected: FAIL
@ -8463,12 +8304,6 @@
[Document interface: new Document() must inherit property "oncancel" with the proper type (98)]
expected: FAIL
[Document interface: new Document() must inherit property "oncanplay" with the proper type (99)]
expected: FAIL
[Document interface: new Document() must inherit property "oncanplaythrough" with the proper type (100)]
expected: FAIL
[Document interface: new Document() must inherit property "onclose" with the proper type (103)]
expected: FAIL
@ -8505,9 +8340,6 @@
[Document interface: new Document() must inherit property "ondurationchange" with the proper type (115)]
expected: FAIL
[Document interface: new Document() must inherit property "onemptied" with the proper type (116)]
expected: FAIL
[Document interface: new Document() must inherit property "onended" with the proper type (117)]
expected: FAIL
@ -8517,12 +8349,6 @@
[Document interface: new Document() must inherit property "oninvalid" with the proper type (121)]
expected: FAIL
[Document interface: new Document() must inherit property "onloadeddata" with the proper type (126)]
expected: FAIL
[Document interface: new Document() must inherit property "onloadedmetadata" with the proper type (127)]
expected: FAIL
[Document interface: new Document() must inherit property "onloadstart" with the proper type (128)]
expected: FAIL
@ -8547,18 +8373,6 @@
[Document interface: new Document() must inherit property "onmousewheel" with the proper type (136)]
expected: FAIL
[Document interface: new Document() must inherit property "onpause" with the proper type (137)]
expected: FAIL
[Document interface: new Document() must inherit property "onplay" with the proper type (138)]
expected: FAIL
[Document interface: new Document() must inherit property "onplaying" with the proper type (139)]
expected: FAIL
[Document interface: new Document() must inherit property "onprogress" with the proper type (140)]
expected: FAIL
[Document interface: new Document() must inherit property "onratechange" with the proper type (141)]
expected: FAIL
@ -8583,15 +8397,6 @@
[Document interface: new Document() must inherit property "onstalled" with the proper type (150)]
expected: FAIL
[Document interface: new Document() must inherit property "onsuspend" with the proper type (152)]
expected: FAIL
[Document interface: new Document() must inherit property "ontimeupdate" with the proper type (153)]
expected: FAIL
[Document interface: new Document() must inherit property "onvolumechange" with the proper type (155)]
expected: FAIL
[Document interface: new Document() must inherit property "onwaiting" with the proper type (156)]
expected: FAIL

View file

@ -1,15 +1,9 @@
[error.html]
type: testharness
expected: TIMEOUT
[audio.error after successful load]
expected: TIMEOUT
[audio.error after setting src to the empty string]
expected: TIMEOUT
[video.error after successful load]
expected: TIMEOUT
[video.error after setting src to the empty string]
expected: TIMEOUT

View file

@ -1,6 +1,5 @@
[pause-move-to-other-document.html]
type: testharness
expected: TIMEOUT
[paused state when moving to other document]
expected: TIMEOUT
expected: FAIL

View file

@ -1,6 +0,0 @@
[pause-move-within-document.html]
type: testharness
expected: TIMEOUT
[paused state when moving within a document]
expected: TIMEOUT

View file

@ -1,6 +0,0 @@
[pause-remove-from-document-networkState.html]
type: testharness
expected: TIMEOUT
[paused state when removing from a document when networkState is NETWORK_EMPTY]
expected: TIMEOUT

View file

@ -1,6 +1,5 @@
[pause-remove-from-document.html]
type: testharness
expected: TIMEOUT
[paused state when removing from a document]
expected: TIMEOUT
expected: FAIL