aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/htmlbuttonelement.rs12
-rw-r--r--components/script/dom/webidls/HTMLButtonElement.webidl8
-rw-r--r--tests/wpt/metadata/html/dom/interfaces.html.ini12
-rw-r--r--tests/wpt/metadata/html/dom/reflection-forms.html.ini258
4 files changed, 16 insertions, 274 deletions
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs
index 22c1b67656a..280a92c99b2 100644
--- a/components/script/dom/htmlbuttonelement.rs
+++ b/components/script/dom/htmlbuttonelement.rs
@@ -108,6 +108,18 @@ impl<'a> HTMLButtonElementMethods for JSRef<'a, HTMLButtonElement> {
make_getter!(FormTarget);
make_setter!(SetFormTarget, "formtarget");
+
+ // https://html.spec.whatwg.org/multipage/#dom-fe-name
+ make_getter!(Name);
+
+ // https://html.spec.whatwg.org/multipage/#dom-fe-name
+ make_setter!(SetName, "name");
+
+ // https://html.spec.whatwg.org/multipage/#dom-button-value
+ make_getter!(Value);
+
+ // https://html.spec.whatwg.org/multipage/#dom-button-value
+ make_setter!(SetValue, "value");
}
impl<'a> VirtualMethods for JSRef<'a, HTMLButtonElement> {
diff --git a/components/script/dom/webidls/HTMLButtonElement.webidl b/components/script/dom/webidls/HTMLButtonElement.webidl
index 110d483a2b4..7613bd56687 100644
--- a/components/script/dom/webidls/HTMLButtonElement.webidl
+++ b/components/script/dom/webidls/HTMLButtonElement.webidl
@@ -6,16 +6,16 @@
// https://www.whatwg.org/html/#htmlbuttonelement
interface HTMLButtonElement : HTMLElement {
// attribute boolean autofocus;
- attribute boolean disabled;
+ attribute boolean disabled;
//readonly attribute HTMLFormElement? form;
attribute DOMString formAction;
attribute DOMString formEnctype;
attribute DOMString formMethod;
// attribute boolean formNoValidate;
attribute DOMString formTarget;
- // attribute DOMString name;
- attribute DOMString type;
- // attribute DOMString value;
+ attribute DOMString name;
+ attribute DOMString type;
+ attribute DOMString value;
// attribute HTMLMenuElement? menu;
//readonly attribute boolean willValidate;
diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini
index 80d2fdd9c1d..8b2e80f9c29 100644
--- a/tests/wpt/metadata/html/dom/interfaces.html.ini
+++ b/tests/wpt/metadata/html/dom/interfaces.html.ini
@@ -5739,12 +5739,6 @@
[HTMLButtonElement interface: attribute formNoValidate]
expected: FAIL
- [HTMLButtonElement interface: attribute name]
- expected: FAIL
-
- [HTMLButtonElement interface: attribute value]
- expected: FAIL
-
[HTMLButtonElement interface: attribute menu]
expected: FAIL
@@ -5775,12 +5769,6 @@
[HTMLButtonElement interface: document.createElement("button") must inherit property "formNoValidate" with the proper type (6)]
expected: FAIL
- [HTMLButtonElement interface: document.createElement("button") must inherit property "name" with the proper type (8)]
- expected: FAIL
-
- [HTMLButtonElement interface: document.createElement("button") must inherit property "value" with the proper type (10)]
- expected: FAIL
-
[HTMLButtonElement interface: document.createElement("button") must inherit property "menu" with the proper type (11)]
expected: FAIL
diff --git a/tests/wpt/metadata/html/dom/reflection-forms.html.ini b/tests/wpt/metadata/html/dom/reflection-forms.html.ini
index 604280dfb3d..c113263aabe 100644
--- a/tests/wpt/metadata/html/dom/reflection-forms.html.ini
+++ b/tests/wpt/metadata/html/dom/reflection-forms.html.ini
@@ -7278,264 +7278,6 @@
[button.formNoValidate: IDL set to object "test-valueOf" followed by IDL get]
expected: FAIL
- [button.name: typeof IDL attribute]
- expected: FAIL
-
- [button.name: IDL get with DOM attribute unset]
- expected: FAIL
-
- [button.name: setAttribute() to "" followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to undefined followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to 7 followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to 1.5 followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to true followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to false followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to object "[object Object\]" followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to NaN followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to Infinity followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to -Infinity followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to "\\0" followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to null followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to object "test-toString" followed by IDL get]
- expected: FAIL
-
- [button.name: setAttribute() to object "test-valueOf" followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to "" followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to undefined followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to undefined followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to 7 followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to 7 followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to 1.5 followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to 1.5 followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to true followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to true followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to false followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to false followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to object "[object Object\]" followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to object "[object Object\]" followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to NaN followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to NaN followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to Infinity followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to Infinity followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to -Infinity followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to -Infinity followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to "\\0" followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to null followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to null followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to object "test-toString" followed by getAttribute()]
- expected: FAIL
-
- [button.name: IDL set to object "test-toString" followed by IDL get]
- expected: FAIL
-
- [button.name: IDL set to object "test-valueOf" followed by IDL get]
- expected: FAIL
-
- [button.value: typeof IDL attribute]
- expected: FAIL
-
- [button.value: IDL get with DOM attribute unset]
- expected: FAIL
-
- [button.value: setAttribute() to "" followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to undefined followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to 7 followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to 1.5 followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to true followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to false followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to object "[object Object\]" followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to NaN followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to Infinity followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to -Infinity followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to "\\0" followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to null followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to object "test-toString" followed by IDL get]
- expected: FAIL
-
- [button.value: setAttribute() to object "test-valueOf" followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to "" followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to undefined followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to undefined followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to 7 followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to 7 followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to 1.5 followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to 1.5 followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to true followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to true followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to false followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to false followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to object "[object Object\]" followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to object "[object Object\]" followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to NaN followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to NaN followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to Infinity followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to Infinity followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to -Infinity followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to -Infinity followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to "\\0" followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to null followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to null followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to object "test-toString" followed by getAttribute()]
- expected: FAIL
-
- [button.value: IDL set to object "test-toString" followed by IDL get]
- expected: FAIL
-
- [button.value: IDL set to object "test-valueOf" followed by IDL get]
- expected: FAIL
-
[button.itemScope: typeof IDL attribute]
expected: FAIL