aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxu3u4 <u4xu3@yahoo.com.tw>2019-12-07 20:07:15 +0900
committerxu3u4 <u4xu3@yahoo.com.tw>2019-12-07 21:44:36 +0900
commit7529591e8f9f6bd24c921b1745ac62b8dff1e1cd (patch)
tree46465314c57c53f4b86df032a2f6cdc84b2be7ea
parent2d2cd2b7d742cfa95a1329955545face8fffc7e4 (diff)
downloadservo-7529591e8f9f6bd24c921b1745ac62b8dff1e1cd.tar.gz
servo-7529591e8f9f6bd24c921b1745ac62b8dff1e1cd.zip
Add onformdata to GlobalEventHandlers
-rw-r--r--components/script/dom/macros.rs1
-rw-r--r--components/script/dom/webidls/EventHandler.webidl1
-rw-r--r--tests/wpt/metadata/html/dom/idlharness.https.html.ini24
-rw-r--r--tests/wpt/metadata/html/webappapis/scripting/events/event-handler-all-global-events.html.ini3
-rw-r--r--tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini9
-rw-r--r--tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini9
-rw-r--r--tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini6
7 files changed, 2 insertions, 51 deletions
diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs
index 755624a8855..a1941662963 100644
--- a/components/script/dom/macros.rs
+++ b/components/script/dom/macros.rs
@@ -446,6 +446,7 @@ macro_rules! global_event_handlers(
event_handler!(emptied, GetOnemptied, SetOnemptied);
event_handler!(ended, GetOnended, SetOnended);
error_event_handler!(error, GetOnerror, SetOnerror);
+ event_handler!(formdata, GetOnformdata, SetOnformdata);
event_handler!(input, GetOninput, SetOninput);
event_handler!(invalid, GetOninvalid, SetOninvalid);
event_handler!(keydown, GetOnkeydown, SetOnkeydown);
diff --git a/components/script/dom/webidls/EventHandler.webidl b/components/script/dom/webidls/EventHandler.webidl
index b5566db7153..53df17fe7e0 100644
--- a/components/script/dom/webidls/EventHandler.webidl
+++ b/components/script/dom/webidls/EventHandler.webidl
@@ -51,6 +51,7 @@ interface mixin GlobalEventHandlers {
attribute EventHandler onended;
attribute OnErrorEventHandler onerror;
attribute EventHandler onfocus;
+ attribute EventHandler onformdata;
attribute EventHandler oninput;
attribute EventHandler oninvalid;
attribute EventHandler onkeydown;
diff --git a/tests/wpt/metadata/html/dom/idlharness.https.html.ini b/tests/wpt/metadata/html/dom/idlharness.https.html.ini
index 692dc849677..5f02ae6d2cd 100644
--- a/tests/wpt/metadata/html/dom/idlharness.https.html.ini
+++ b/tests/wpt/metadata/html/dom/idlharness.https.html.ini
@@ -1543,9 +1543,6 @@
[Document interface: new Document() must inherit property "onsecuritypolicyviolation" with the proper type]
expected: FAIL
- [Window interface: attribute onformdata]
- expected: FAIL
-
[Document interface: calling queryCommandIndeterm(DOMString) on iframe.contentDocument with too few arguments must throw TypeError]
expected: FAIL
@@ -1570,9 +1567,6 @@
[Document interface: attribute linkColor]
expected: FAIL
- [Document interface: documentWithHandlers must inherit property "onformdata" with the proper type]
- expected: FAIL
-
[Window interface: window must inherit property "scrollbars" with the proper type]
expected: FAIL
@@ -1612,9 +1606,6 @@
[Document interface: new Document() must inherit property "queryCommandState(DOMString)" with the proper type]
expected: FAIL
- [Window interface: window must inherit property "onformdata" with the proper type]
- expected: FAIL
-
[Document interface: calling queryCommandEnabled(DOMString) on iframe.contentDocument with too few arguments must throw TypeError]
expected: FAIL
@@ -1627,9 +1618,6 @@
[Window interface: window must inherit property "personalbar" with the proper type]
expected: FAIL
- [Document interface: new Document() must inherit property "onformdata" with the proper type]
- expected: FAIL
-
[Window interface: internal [[SetPrototypeOf\]\] method of interface prototype object - setting to a new value via __proto__ should throw a TypeError]
expected: FAIL
@@ -1669,9 +1657,6 @@
[Document interface: attribute vlinkColor]
expected: FAIL
- [Document interface: iframe.contentDocument must inherit property "onformdata" with the proper type]
- expected: FAIL
-
[Document interface: iframe.contentDocument must inherit property "queryCommandEnabled(DOMString)" with the proper type]
expected: FAIL
@@ -1702,9 +1687,6 @@
[Window interface: calling prompt(DOMString, DOMString) on window with too few arguments must throw TypeError]
expected: FAIL
- [Document interface: attribute onformdata]
- expected: FAIL
-
[Document interface: new Document() must inherit property "onauxclick" with the proper type]
expected: FAIL
@@ -3621,9 +3603,6 @@
[HTMLOListElement interface: attribute reversed]
expected: FAIL
- [HTMLElement interface: attribute onformdata]
- expected: FAIL
-
[HTMLInputElement interface: createInput("text") must inherit property "willValidate" with the proper type]
expected: FAIL
@@ -4473,9 +4452,6 @@
[HTMLInputElement interface: createInput("text") must inherit property "list" with the proper type]
expected: FAIL
- [HTMLElement interface: document.createElement("noscript") must inherit property "onformdata" with the proper type]
- expected: FAIL
-
[HTMLTableRowElement interface: document.createElement("tr") must inherit property "ch" with the proper type]
expected: FAIL
diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-all-global-events.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-all-global-events.html.ini
index 2056f9c273e..a0e595a2bac 100644
--- a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-all-global-events.html.ini
+++ b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-all-global-events.html.ini
@@ -378,9 +378,6 @@
[onwaiting: the default value must be null]
expected: FAIL
- [onformdata: the content attribute must be compiled into a function as the corresponding property]
- expected: FAIL
-
[onformdata: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini
index 9ccd888978d..d400bd7e6e3 100644
--- a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini
+++ b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini
@@ -69,15 +69,6 @@
[shadowed error (window)]
expected: FAIL
- [not shadowed formdata (window)]
- expected: FAIL
-
- [not shadowed formdata (document.body)]
- expected: FAIL
-
- [not shadowed formdata (document.createElement("body"))]
- expected: FAIL
-
[not shadowed slotchange (window)]
expected: FAIL
diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini
index 66a27dd72d8..287079cc689 100644
--- a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini
+++ b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini
@@ -62,15 +62,6 @@
[not shadowed auxclick (document.createElement("frameset"))]
expected: FAIL
- [not shadowed formdata (document.body)]
- expected: FAIL
-
- [not shadowed formdata (document.createElement("frameset"))]
- expected: FAIL
-
- [not shadowed formdata (window)]
- expected: FAIL
-
[not shadowed slotchange (window)]
expected: FAIL
diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini
index 9bcbcd5239f..1f8fe7fa677 100644
--- a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini
+++ b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini
@@ -26,12 +26,6 @@
[securitypolicyviolation is unaffected on a windowless frameset]
expected: FAIL
- [formdata is unaffected on a windowless frameset]
- expected: FAIL
-
- [formdata is unaffected on a windowless body]
- expected: FAIL
-
[slotchange is unaffected on a windowless frameset]
expected: FAIL