aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-08-06 07:44:51 -0600
committerbors-servo <metajack+bors@gmail.com>2015-08-06 07:44:51 -0600
commit106361443d58f57ac140e4b4033b60e98fdaad2b (patch)
tree8d0fe6a834e9cc8885b9410994fa970c08ae0299
parentddd2840eed6a9c119b188c7c3aa7258f25702697 (diff)
parentd4ac9a59664eef9950ddcbeda7488281390770a6 (diff)
downloadservo-106361443d58f57ac140e4b4033b60e98fdaad2b.tar.gz
servo-106361443d58f57ac140e4b4033b60e98fdaad2b.zip
Auto merge of #6451 - jgraham:onkey_attributes, r=Ms2ger
Add onkey* global event handler attributes <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6451) <!-- Reviewable:end -->
-rw-r--r--components/script/dom/macros.rs3
-rw-r--r--components/script/dom/webidls/EventHandler.webidl3
-rw-r--r--tests/wpt/metadata/html/dom/interfaces.html.ini36
3 files changed, 6 insertions, 36 deletions
diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs
index 6b19d3f99c0..74fae719db5 100644
--- a/components/script/dom/macros.rs
+++ b/components/script/dom/macros.rs
@@ -275,6 +275,9 @@ macro_rules! global_event_handlers(
);
(NoOnload) => (
event_handler!(click, GetOnclick, SetOnclick);
+ event_handler!(keydown, GetOnkeydown, SetOnkeydown);
+ event_handler!(keypress, GetOnkeypress, SetOnkeypress);
+ event_handler!(keyup, GetOnkeyup, SetOnkeyup);
event_handler!(input, GetOninput, SetOninput);
event_handler!(change, GetOnchange, SetOnchange);
event_handler!(submit, GetOnsubmit, SetOnsubmit);
diff --git a/components/script/dom/webidls/EventHandler.webidl b/components/script/dom/webidls/EventHandler.webidl
index ea388daad92..c1a210a06e0 100644
--- a/components/script/dom/webidls/EventHandler.webidl
+++ b/components/script/dom/webidls/EventHandler.webidl
@@ -26,6 +26,9 @@ interface GlobalEventHandlers {
attribute EventHandler onclick;
attribute EventHandler onload;
attribute EventHandler oninput;
+ attribute EventHandler onkeydown;
+ attribute EventHandler onkeypress;
+ attribute EventHandler onkeyup;
attribute EventHandler onchange;
attribute EventHandler onsubmit;
};
diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini
index d000553cacc..3fd0ad22507 100644
--- a/tests/wpt/metadata/html/dom/interfaces.html.ini
+++ b/tests/wpt/metadata/html/dom/interfaces.html.ini
@@ -156,15 +156,6 @@
[Document interface: attribute oninvalid]
expected: FAIL
- [Document interface: attribute onkeydown]
- expected: FAIL
-
- [Document interface: attribute onkeypress]
- expected: FAIL
-
- [Document interface: attribute onkeyup]
- expected: FAIL
-
[Document interface: attribute onloadeddata]
expected: FAIL
@@ -1254,15 +1245,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "oninvalid" with the proper type (120)]
expected: FAIL
- [Document interface: document.implementation.createDocument(null, "", null) must inherit property "onkeydown" with the proper type (121)]
- expected: FAIL
-
- [Document interface: document.implementation.createDocument(null, "", null) must inherit property "onkeypress" with the proper type (122)]
- expected: FAIL
-
- [Document interface: document.implementation.createDocument(null, "", null) must inherit property "onkeyup" with the proper type (123)]
- expected: FAIL
-
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onloadeddata" with the proper type (125)]
expected: FAIL
@@ -1773,15 +1755,6 @@
[HTMLElement interface: attribute oninvalid]
expected: FAIL
- [HTMLElement interface: attribute onkeydown]
- expected: FAIL
-
- [HTMLElement interface: attribute onkeypress]
- expected: FAIL
-
- [HTMLElement interface: attribute onkeyup]
- expected: FAIL
-
[HTMLElement interface: attribute onloadeddata]
expected: FAIL
@@ -2022,15 +1995,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 "onkeydown" with the proper type (60)]
- expected: FAIL
-
- [HTMLElement interface: document.createElement("noscript") must inherit property "onkeypress" with the proper type (61)]
- expected: FAIL
-
- [HTMLElement interface: document.createElement("noscript") must inherit property "onkeyup" with the proper type (62)]
- expected: FAIL
-
[HTMLElement interface: document.createElement("noscript") must inherit property "onloadeddata" with the proper type (64)]
expected: FAIL