From 7f63309602c3167f0e9e9f393ddad0746abaa728 Mon Sep 17 00:00:00 2001 From: James Graham Date: Tue, 23 Jun 2015 20:59:15 -0700 Subject: [PATCH 1/2] Add onkey* global event handler attributes --- components/script/dom/macros.rs | 3 ++ .../script/dom/webidls/EventHandler.webidl | 3 ++ ...send-after-setting-document-domain.htm.ini | 1 + .../wpt/metadata/html/dom/interfaces.html.ini | 36 ------------------- 4 files changed, 7 insertions(+), 36 deletions(-) diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs index a5efaab5c2e..f2ac996de28 100644 --- a/components/script/dom/macros.rs +++ b/components/script/dom/macros.rs @@ -274,6 +274,9 @@ macro_rules! global_event_handlers( ); (NoOnload) => ( event_handler!(click, GetOnclick, SetOnclick); + event_handler!(keydown, GetOnkeydown, SetOnkeydown); + event_handler!(keypress, GetOnkeypress, SetOnkeypress); + event_handler!(keypress, 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 c0ee3f290a8..50f04ddc2b0 100644 --- a/components/script/dom/webidls/EventHandler.webidl +++ b/components/script/dom/webidls/EventHandler.webidl @@ -24,6 +24,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/XMLHttpRequest/send-after-setting-document-domain.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini index c9c9517fb97..4114af649a9 100644 --- a/tests/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini +++ b/tests/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini @@ -2,3 +2,4 @@ type: testharness [loading documents from original origin after setting document.domain] expected: FAIL + diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini index b1228b4171f..450b28ed9c2 100644 --- a/tests/wpt/metadata/html/dom/interfaces.html.ini +++ b/tests/wpt/metadata/html/dom/interfaces.html.ini @@ -159,15 +159,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 @@ -1260,15 +1251,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 @@ -1779,15 +1761,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 @@ -2028,15 +2001,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 From d4ac9a59664eef9950ddcbeda7488281390770a6 Mon Sep 17 00:00:00 2001 From: James Graham Date: Wed, 24 Jun 2015 15:39:45 -0700 Subject: [PATCH 2/2] fixup! Add onkey* global event handler attributes --- components/script/dom/macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs index f2ac996de28..a470648f260 100644 --- a/components/script/dom/macros.rs +++ b/components/script/dom/macros.rs @@ -276,7 +276,7 @@ macro_rules! global_event_handlers( event_handler!(click, GetOnclick, SetOnclick); event_handler!(keydown, GetOnkeydown, SetOnkeydown); event_handler!(keypress, GetOnkeypress, SetOnkeypress); - event_handler!(keypress, GetOnkeyup, SetOnkeyup); + event_handler!(keyup, GetOnkeyup, SetOnkeyup); event_handler!(input, GetOninput, SetOninput); event_handler!(change, GetOnchange, SetOnchange); event_handler!(submit, GetOnsubmit, SetOnsubmit);