diff options
author | shanehandley <1322294+shanehandley@users.noreply.github.com> | 2024-05-11 15:06:44 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-11 05:06:44 +0000 |
commit | 2904c32e05f90ee826968d04cfd837f614cd2541 (patch) | |
tree | 8759ea0a86e738d3a803eae06bc79f8924fd7433 | |
parent | c2325cd7388a158543932451845b4e920dbc32ce (diff) | |
download | servo-2904c32e05f90ee826968d04cfd837f614cd2541.tar.gz servo-2904c32e05f90ee826968d04cfd837f614cd2541.zip |
Implement attributes for the `<meter>` element (#32230)
* Implement attributes for the meter element
* Remove checks for min < max before clamping
10 files changed, 139 insertions, 743 deletions
diff --git a/components/script/dom/htmlmeterelement.rs b/components/script/dom/htmlmeterelement.rs index 917258a1ea8..53fa61e9074 100644 --- a/components/script/dom/htmlmeterelement.rs +++ b/components/script/dom/htmlmeterelement.rs @@ -2,14 +2,18 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use std::ops::{Add, Div}; + use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix}; +use html5ever::{local_name, LocalName, Prefix}; use js::rust::HandleObject; use crate::dom::bindings::codegen::Bindings::HTMLMeterElementBinding::HTMLMeterElementMethods; use crate::dom::bindings::inheritance::Castable; +use crate::dom::bindings::num::Finite; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; use crate::dom::document::Document; +use crate::dom::element::Element; use crate::dom::htmlelement::HTMLElement; use crate::dom::node::Node; use crate::dom::nodelist::NodeList; @@ -20,6 +24,7 @@ pub struct HTMLMeterElement { labels_node_list: MutNullableDom<NodeList>, } +/// <https://html.spec.whatwg.org/multipage/#the-meter-element> impl HTMLMeterElement { fn new_inherited( local_name: LocalName, @@ -52,4 +57,125 @@ impl HTMLMeterElement { impl HTMLMeterElementMethods for HTMLMeterElement { // https://html.spec.whatwg.org/multipage/#dom-lfe-labels make_labels_getter!(Labels, labels_node_list); + + /// <https://html.spec.whatwg.org/multipage/#concept-meter-actual> + fn Value(&self) -> Finite<f64> { + let min = *self.Min(); + let max = *self.Max(); + + Finite::wrap( + self.upcast::<Element>() + .get_string_attribute(&local_name!("value")) + .parse_floating_point_number() + .map_or(0.0, |candidate_actual_value| { + candidate_actual_value.clamp(min, max) + }), + ) + } + + /// <https://html.spec.whatwg.org/multipage/#dom-meter-value> + fn SetValue(&self, value: Finite<f64>) { + self.upcast::<Element>() + .set_string_attribute(&local_name!("value"), (*value).to_string().into()); + } + + /// <https://html.spec.whatwg.org/multipage/#concept-meter-minimum> + fn Min(&self) -> Finite<f64> { + Finite::wrap( + self.upcast::<Element>() + .get_string_attribute(&local_name!("min")) + .parse_floating_point_number() + .unwrap_or(0.0), + ) + } + + /// <https://html.spec.whatwg.org/multipage/#dom-meter-min> + fn SetMin(&self, value: Finite<f64>) { + self.upcast::<Element>() + .set_string_attribute(&local_name!("min"), (*value).to_string().into()); + } + + /// <https://html.spec.whatwg.org/multipage/#concept-meter-maximum> + fn Max(&self) -> Finite<f64> { + Finite::wrap( + self.upcast::<Element>() + .get_string_attribute(&local_name!("max")) + .parse_floating_point_number() + .unwrap_or(1.0) + .max(*self.Min()), + ) + } + + /// <https://html.spec.whatwg.org/multipage/#concept-meter-maximum> + fn SetMax(&self, value: Finite<f64>) { + self.upcast::<Element>() + .set_string_attribute(&local_name!("max"), (*value).to_string().into()); + } + + /// <https://html.spec.whatwg.org/multipage/#concept-meter-low> + fn Low(&self) -> Finite<f64> { + let min = *self.Min(); + let max = *self.Max(); + + Finite::wrap( + self.upcast::<Element>() + .get_string_attribute(&local_name!("low")) + .parse_floating_point_number() + .map_or(min, |candidate_low_boundary| { + candidate_low_boundary.clamp(min, max) + }), + ) + } + + /// <https://html.spec.whatwg.org/multipage/#dom-meter-low> + fn SetLow(&self, value: Finite<f64>) { + self.upcast::<Element>() + .set_string_attribute(&local_name!("low"), (*value).to_string().into()); + } + + /// <https://html.spec.whatwg.org/multipage/#concept-meter-high> + fn High(&self) -> Finite<f64> { + let max: f64 = *self.Max(); + let low: f64 = *self.Low(); + + Finite::wrap( + self.upcast::<Element>() + .get_string_attribute(&local_name!("high")) + .parse_floating_point_number() + .map_or(max, |candidate_high_boundary| { + if candidate_high_boundary < low { + return low; + } + + candidate_high_boundary.clamp(*self.Min(), max) + }), + ) + } + + /// <https://html.spec.whatwg.org/multipage/#dom-meter-high> + fn SetHigh(&self, value: Finite<f64>) { + self.upcast::<Element>() + .set_string_attribute(&local_name!("high"), (*value).to_string().into()); + } + + /// <https://html.spec.whatwg.org/multipage/#concept-meter-optimum> + fn Optimum(&self) -> Finite<f64> { + let max = *self.Max(); + let min = *self.Min(); + + Finite::wrap( + self.upcast::<Element>() + .get_string_attribute(&local_name!("optimum")) + .parse_floating_point_number() + .map_or(max.add(min).div(2.0), |candidate_optimum_point| { + candidate_optimum_point.clamp(min, max) + }), + ) + } + + /// <https://html.spec.whatwg.org/multipage/#dom-meter-optimum> + fn SetOptimum(&self, value: Finite<f64>) { + self.upcast::<Element>() + .set_string_attribute(&local_name!("optimum"), (*value).to_string().into()); + } } diff --git a/components/script/dom/webidls/HTMLMeterElement.webidl b/components/script/dom/webidls/HTMLMeterElement.webidl index 4021d2ec185..23e6bc16b3e 100644 --- a/components/script/dom/webidls/HTMLMeterElement.webidl +++ b/components/script/dom/webidls/HTMLMeterElement.webidl @@ -7,17 +7,17 @@ interface HTMLMeterElement : HTMLElement { [HTMLConstructor] constructor(); - // [CEReactions] - // attribute double value; - // [CEReactions] - // attribute double min; - // [CEReactions] - // attribute double max; - // [CEReactions] - // attribute double low; - // [CEReactions] - // attribute double high; - // [CEReactions] - // attribute double optimum; + [CEReactions] + attribute double value; + [CEReactions] + attribute double min; + [CEReactions] + attribute double max; + [CEReactions] + attribute double low; + [CEReactions] + attribute double high; + [CEReactions] + attribute double optimum; readonly attribute NodeList labels; }; diff --git a/tests/wpt/meta-legacy-layout/custom-elements/reactions/customized-builtins/HTMLMeterElement.html.ini b/tests/wpt/meta-legacy-layout/custom-elements/reactions/customized-builtins/HTMLMeterElement.html.ini deleted file mode 100644 index 4a09a19f78e..00000000000 --- a/tests/wpt/meta-legacy-layout/custom-elements/reactions/customized-builtins/HTMLMeterElement.html.ini +++ /dev/null @@ -1,36 +0,0 @@ -[HTMLMeterElement.html] - [value on HTMLMeterElement must enqueue an attributeChanged reaction when adding value content attribute] - expected: FAIL - - [value on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [min on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [min on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [max on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [max on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [low on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [low on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [high on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [high on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [optimum on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [optimum on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini b/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini index 322279129cc..d36a263ba23 100644 --- a/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini @@ -2790,9 +2790,6 @@ [HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "align" with the proper type] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "low" with the proper type] - expected: FAIL - [HTMLInputElement interface: createInput("time") must inherit property "useMap" with the proper type] expected: FAIL @@ -2802,9 +2799,6 @@ [HTMLInputElement interface: createInput("hidden") must inherit property "align" with the proper type] expected: FAIL - [HTMLMeterElement interface: attribute value] - expected: FAIL - [HTMLTableSectionElement interface: document.createElement("thead") must inherit property "chOff" with the proper type] expected: FAIL @@ -3216,18 +3210,12 @@ [HTMLIFrameElement interface: attribute align] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "max" with the proper type] - expected: FAIL - [HTMLTableCellElement interface: document.createElement("th") must inherit property "noWrap" with the proper type] expected: FAIL [HTMLAreaElement interface: document.createElement("area") must inherit property "shape" with the proper type] expected: FAIL - [HTMLMeterElement interface: attribute low] - expected: FAIL - [HTMLEmbedElement interface: attribute height] expected: FAIL @@ -3318,12 +3306,6 @@ [HTMLImageElement interface: document.createElement("img") must inherit property "sizes" with the proper type] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "optimum" with the proper type] - expected: FAIL - - [HTMLMeterElement interface: document.createElement("meter") must inherit property "value" with the proper type] - expected: FAIL - [HTMLEmbedElement interface: attribute align] expected: FAIL @@ -3489,9 +3471,6 @@ [HTMLInputElement interface: createInput("color") must inherit property "useMap" with the proper type] expected: FAIL - [HTMLMeterElement interface: attribute optimum] - expected: FAIL - [HTMLInputElement interface: createInput("password") must inherit property "useMap" with the proper type] expected: FAIL @@ -3642,9 +3621,6 @@ [HTMLOListElement interface: attribute compact] expected: FAIL - [HTMLMeterElement interface: attribute high] - expected: FAIL - [HTMLInputElement interface: createInput("reset") must inherit property "useMap" with the proper type] expected: FAIL @@ -3660,18 +3636,12 @@ [HTMLAreaElement interface: attribute download] expected: FAIL - [HTMLMeterElement interface: attribute max] - expected: FAIL - [HTMLInputElement interface: createInput("hidden") must inherit property "width" with the proper type] expected: FAIL [HTMLInputElement interface: createInput("text") must inherit property "align" with the proper type] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "high" with the proper type] - expected: FAIL - [HTMLParagraphElement interface: document.createElement("p") must inherit property "align" with the proper type] expected: FAIL @@ -3840,9 +3810,6 @@ [HTMLTableCellElement interface: document.createElement("th") must inherit property "scope" with the proper type] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "min" with the proper type] - expected: FAIL - [HTMLLinkElement interface: attribute as] expected: FAIL @@ -4434,9 +4401,6 @@ [HTMLObjectElement interface: document.createElement("object") must inherit property "data" with the proper type] expected: FAIL - [HTMLMeterElement interface: attribute min] - expected: FAIL - [HTMLElement interface: document.createElement("noscript") must inherit property "onsecuritypolicyviolation" with the proper type] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/dom/reflection-forms.html.ini b/tests/wpt/meta-legacy-layout/html/dom/reflection-forms.html.ini index 7280767d3ec..f18e02cb406 100644 --- a/tests/wpt/meta-legacy-layout/html/dom/reflection-forms.html.ini +++ b/tests/wpt/meta-legacy-layout/html/dom/reflection-forms.html.ini @@ -20178,150 +20178,42 @@ [textarea.inputMode: IDL set to "Kana-name"] expected: FAIL - [meter.value: typeof IDL attribute] - expected: FAIL - [meter.value: IDL get with DOM attribute unset] expected: FAIL - [meter.value: IDL set to -10000000000] - expected: FAIL - - [meter.value: IDL set to -1] - expected: FAIL - [meter.value: IDL set to -0] expected: FAIL - [meter.value: IDL set to 0] - expected: FAIL - - [meter.value: IDL set to 1] - expected: FAIL - - [meter.value: IDL set to 10000000000] - expected: FAIL - - [meter.min: typeof IDL attribute] - expected: FAIL - [meter.min: IDL get with DOM attribute unset] expected: FAIL - [meter.min: IDL set to -10000000000] - expected: FAIL - - [meter.min: IDL set to -1] - expected: FAIL - [meter.min: IDL set to -0] expected: FAIL - [meter.min: IDL set to 0] - expected: FAIL - - [meter.min: IDL set to 1] - expected: FAIL - - [meter.min: IDL set to 10000000000] - expected: FAIL - - [meter.max: typeof IDL attribute] - expected: FAIL - [meter.max: IDL get with DOM attribute unset] expected: FAIL - [meter.max: IDL set to -10000000000] - expected: FAIL - - [meter.max: IDL set to -1] - expected: FAIL - [meter.max: IDL set to -0] expected: FAIL - [meter.max: IDL set to 0] - expected: FAIL - - [meter.max: IDL set to 1] - expected: FAIL - - [meter.max: IDL set to 10000000000] - expected: FAIL - - [meter.low: typeof IDL attribute] - expected: FAIL - [meter.low: IDL get with DOM attribute unset] expected: FAIL - [meter.low: IDL set to -10000000000] - expected: FAIL - - [meter.low: IDL set to -1] - expected: FAIL - [meter.low: IDL set to -0] expected: FAIL - [meter.low: IDL set to 0] - expected: FAIL - - [meter.low: IDL set to 1] - expected: FAIL - - [meter.low: IDL set to 10000000000] - expected: FAIL - - [meter.high: typeof IDL attribute] - expected: FAIL - [meter.high: IDL get with DOM attribute unset] expected: FAIL - [meter.high: IDL set to -10000000000] - expected: FAIL - - [meter.high: IDL set to -1] - expected: FAIL - [meter.high: IDL set to -0] expected: FAIL - [meter.high: IDL set to 0] - expected: FAIL - - [meter.high: IDL set to 1] - expected: FAIL - - [meter.high: IDL set to 10000000000] - expected: FAIL - - [meter.optimum: typeof IDL attribute] - expected: FAIL - [meter.optimum: IDL get with DOM attribute unset] expected: FAIL - [meter.optimum: IDL set to -10000000000] - expected: FAIL - - [meter.optimum: IDL set to -1] - expected: FAIL - [meter.optimum: IDL set to -0] expected: FAIL - [meter.optimum: IDL set to 0] - expected: FAIL - - [meter.optimum: IDL set to 1] - expected: FAIL - - [meter.optimum: IDL set to 10000000000] - expected: FAIL - [optgroup.accessKey: setAttribute() to "5%"] expected: FAIL @@ -20937,71 +20829,35 @@ [meter.value: IDL set to 1e-10] expected: FAIL - [meter.value: IDL set to 0.0001] - expected: FAIL - - [meter.value: IDL set to 1.5] - expected: FAIL - [meter.value: IDL set to 1e+25] expected: FAIL [meter.min: IDL set to 1e-10] expected: FAIL - [meter.min: IDL set to 0.0001] - expected: FAIL - - [meter.min: IDL set to 1.5] - expected: FAIL - [meter.min: IDL set to 1e+25] expected: FAIL [meter.max: IDL set to 1e-10] expected: FAIL - [meter.max: IDL set to 0.0001] - expected: FAIL - - [meter.max: IDL set to 1.5] - expected: FAIL - [meter.max: IDL set to 1e+25] expected: FAIL [meter.low: IDL set to 1e-10] expected: FAIL - [meter.low: IDL set to 0.0001] - expected: FAIL - - [meter.low: IDL set to 1.5] - expected: FAIL - [meter.low: IDL set to 1e+25] expected: FAIL [meter.high: IDL set to 1e-10] expected: FAIL - [meter.high: IDL set to 0.0001] - expected: FAIL - - [meter.high: IDL set to 1.5] - expected: FAIL - [meter.high: IDL set to 1e+25] expected: FAIL [meter.optimum: IDL set to 1e-10] expected: FAIL - [meter.optimum: IDL set to 0.0001] - expected: FAIL - - [meter.optimum: IDL set to 1.5] - expected: FAIL - [meter.optimum: IDL set to 1e+25] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/forms/the-meter-element/meter.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/forms/the-meter-element/meter.html.ini deleted file mode 100644 index 6c0f829429e..00000000000 --- a/tests/wpt/meta-legacy-layout/html/semantics/forms/the-meter-element/meter.html.ini +++ /dev/null @@ -1,149 +0,0 @@ -[meter.html] - type: testharness - [Default values] - expected: FAIL - - [Invalid floating-point number values] - expected: FAIL - - [max < min] - expected: FAIL - - [value < min] - expected: FAIL - - [value > max] - expected: FAIL - - [low < min] - expected: FAIL - - [low > max] - expected: FAIL - - [high < low] - expected: FAIL - - [high > max] - expected: FAIL - - [optimum < min] - expected: FAIL - - [optimum > max] - expected: FAIL - - [value must be 0 when a string is given] - expected: FAIL - - [default value of min is 0] - expected: FAIL - - [If min is not specified and value is smaller than the default value of min (i.e. 0), the actual value must be 0] - expected: FAIL - - [default value of max is 1.0] - expected: FAIL - - [If max is not specified and value is larger than the default value of max (i.e. 1.0), the actual value must be 1.0] - expected: FAIL - - [If a value smaller than 1.0 is given to min and max is not specified, max must be the same value as its default value (i.e. 1.0)] - expected: FAIL - - [If a value smaller than 1.0 is given to min, max is not specified, and value is larger than the default value of max (i.e. 1.0), the actual value must be 1.0] - expected: FAIL - - [If a value larger than or equal to 1.0 is given to min and max is not specified, max must be the same value as min] - expected: FAIL - - [If a value larger than or equal to 1.0 is given to min and max is not specified, the actual value must be the same value as min] - expected: FAIL - - [If a value smaller than 0 is given to max and min is not specified, min must be be the same value as its default value (i.e. 0)] - expected: FAIL - - [If a value smaller than 0 is given to max and min is not specified, max must be be the same value as the default value of min (i.e. 0)] - expected: FAIL - - [If a value smaller than 0 is given to max and min is not specified, the actual value must be be the same value as the default value of min (i.e. 0)] - expected: FAIL - - [If a value larger than or equal to 0 is given to max and min is not specified, max must be the same value as the default value of min (i.e. 0)] - expected: FAIL - - [If a value larger than or equal to 0 is given to max and min is not specified, min must be the same value as its default value (i.e. 0)] - expected: FAIL - - [If a value larger than or equal to 0 is given to max and min is not specified, the actual value must be the same value as the default value of min (i.e. 0)] - expected: FAIL - - [min must be 0 when a string is given] - expected: FAIL - - [If a string is given to min and value is smaller than the default value of min (i.e. 0), the actual value must be 0] - expected: FAIL - - [max must be 1.0 when a string is given] - expected: FAIL - - [If a string is given to max and value is larger than the default value of min (i.e. 1.0), the actual value must be 1.0] - expected: FAIL - - [giving a string to low must not affect the actual value] - expected: FAIL - - [high must equal max when a string is given to high] - expected: FAIL - - [giving a string to high must not affect the actual value] - expected: FAIL - - [value must not be smaller than min] - expected: FAIL - - [value must not be larger than max] - expected: FAIL - - [default low and high values equal min and max, respectively] - expected: FAIL - - [default low and high values equal 0 and 1.0 respectively, if both low and high are not specified] - expected: FAIL - - [low must not be smaller than min] - expected: FAIL - - [low must not be larger than max] - expected: FAIL - - [high must not be smaller than min] - expected: FAIL - - [high must not be larger than max] - expected: FAIL - - [If min is not specified, low must not be smaller than default value of min (i.e. 0)] - expected: FAIL - - [If a value smaller than low is given to high, it must be set to the same value as low] - expected: FAIL - - [If max is not specified, high must not be larger than default value of max (i.e. 1.0)] - expected: FAIL - - [optimum smaller than min] - expected: FAIL - - [optimum (smaller than min) must not affect min and the actual value] - expected: FAIL - - [optimum smaller than max] - expected: FAIL - - [optimum (larger than max) must not affect max and the actual value] - expected: FAIL - - [default optimum value is the midpoint between min and max] - expected: FAIL - diff --git a/tests/wpt/meta/custom-elements/reactions/customized-builtins/HTMLMeterElement.html.ini b/tests/wpt/meta/custom-elements/reactions/customized-builtins/HTMLMeterElement.html.ini deleted file mode 100644 index 4a09a19f78e..00000000000 --- a/tests/wpt/meta/custom-elements/reactions/customized-builtins/HTMLMeterElement.html.ini +++ /dev/null @@ -1,36 +0,0 @@ -[HTMLMeterElement.html] - [value on HTMLMeterElement must enqueue an attributeChanged reaction when adding value content attribute] - expected: FAIL - - [value on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [min on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [min on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [max on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [max on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [low on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [low on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [high on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [high on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [optimum on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [optimum on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL diff --git a/tests/wpt/meta/html/dom/idlharness.https.html.ini b/tests/wpt/meta/html/dom/idlharness.https.html.ini index 05eb99aed01..23fba12decc 100644 --- a/tests/wpt/meta/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta/html/dom/idlharness.https.html.ini @@ -2640,9 +2640,6 @@ [HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "align" with the proper type] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "low" with the proper type] - expected: FAIL - [HTMLInputElement interface: createInput("hidden") must inherit property "width" with the proper type] expected: FAIL @@ -2826,9 +2823,6 @@ [HTMLObjectElement interface: document.createElement("object") must inherit property "codeBase" with the proper type] expected: FAIL - [HTMLMeterElement interface: attribute value] - expected: FAIL - [HTMLFrameElement interface: attribute marginWidth] expected: FAIL @@ -3045,9 +3039,6 @@ [HTMLIFrameElement interface: attribute align] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "max" with the proper type] - expected: FAIL - [HTMLTableCellElement interface: document.createElement("th") must inherit property "noWrap" with the proper type] expected: FAIL @@ -3057,9 +3048,6 @@ [HTMLMarqueeElement interface: document.createElement("marquee") must inherit property "trueSpeed" with the proper type] expected: FAIL - [HTMLMeterElement interface: attribute low] - expected: FAIL - [HTMLEmbedElement interface: attribute height] expected: FAIL @@ -3153,9 +3141,6 @@ [HTMLImageElement interface: document.createElement("img") must inherit property "sizes" with the proper type] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "optimum" with the proper type] - expected: FAIL - [HTMLEmbedElement interface: attribute align] expected: FAIL @@ -3303,9 +3288,6 @@ [HTMLInputElement interface: createInput("color") must inherit property "useMap" with the proper type] expected: FAIL - [HTMLMeterElement interface: attribute optimum] - expected: FAIL - [HTMLInputElement interface: createInput("password") must inherit property "useMap" with the proper type] expected: FAIL @@ -3444,9 +3426,6 @@ [HTMLOListElement interface: attribute compact] expected: FAIL - [HTMLMeterElement interface: attribute high] - expected: FAIL - [HTMLBRElement interface: attribute clear] expected: FAIL @@ -3459,9 +3438,6 @@ [HTMLAreaElement interface: attribute download] expected: FAIL - [HTMLMeterElement interface: attribute max] - expected: FAIL - [HTMLInputElement interface: createInput("text") must inherit property "align" with the proper type] expected: FAIL @@ -3651,9 +3627,6 @@ [HTMLTableCellElement interface: document.createElement("th") must inherit property "scope" with the proper type] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "min" with the proper type] - expected: FAIL - [HTMLLinkElement interface: attribute as] expected: FAIL @@ -4014,9 +3987,6 @@ [HTMLStyleElement interface: document.createElement("style") must inherit property "type" with the proper type] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "high" with the proper type] - expected: FAIL - [HTMLAreaElement interface: document.createElement("area") must inherit property "alt" with the proper type] expected: FAIL @@ -4224,9 +4194,6 @@ [HTMLObjectElement interface: document.createElement("object") must inherit property "data" with the proper type] expected: FAIL - [HTMLMeterElement interface: attribute min] - expected: FAIL - [HTMLElement interface: document.createElement("noscript") must inherit property "onsecuritypolicyviolation" with the proper type] expected: FAIL @@ -4263,9 +4230,6 @@ [HTMLInputElement interface: createInput("url") must inherit property "useMap" with the proper type] expected: FAIL - [HTMLMeterElement interface: document.createElement("meter") must inherit property "value" with the proper type] - expected: FAIL - [HTMLTableColElement interface: attribute chOff] expected: FAIL diff --git a/tests/wpt/meta/html/dom/reflection-forms.html.ini b/tests/wpt/meta/html/dom/reflection-forms.html.ini index e695f877b65..4498919cd97 100644 --- a/tests/wpt/meta/html/dom/reflection-forms.html.ini +++ b/tests/wpt/meta/html/dom/reflection-forms.html.ini @@ -3380,132 +3380,24 @@ [meter.tabIndex: IDL set to -2147483648] expected: FAIL - [meter.value: typeof IDL attribute] - expected: FAIL - - [meter.value: IDL set to -10000000000] - expected: FAIL - - [meter.value: IDL set to -1] - expected: FAIL - [meter.value: IDL set to -0] expected: FAIL - [meter.value: IDL set to 0] - expected: FAIL - - [meter.value: IDL set to 1] - expected: FAIL - - [meter.value: IDL set to 10000000000] - expected: FAIL - - [meter.min: typeof IDL attribute] - expected: FAIL - - [meter.min: IDL set to -10000000000] - expected: FAIL - - [meter.min: IDL set to -1] - expected: FAIL - [meter.min: IDL set to -0] expected: FAIL - [meter.min: IDL set to 0] - expected: FAIL - - [meter.min: IDL set to 1] - expected: FAIL - - [meter.min: IDL set to 10000000000] - expected: FAIL - - [meter.max: typeof IDL attribute] - expected: FAIL - - [meter.max: IDL set to -10000000000] - expected: FAIL - - [meter.max: IDL set to -1] - expected: FAIL - [meter.max: IDL set to -0] expected: FAIL - [meter.max: IDL set to 0] - expected: FAIL - - [meter.max: IDL set to 1] - expected: FAIL - - [meter.max: IDL set to 10000000000] - expected: FAIL - - [meter.low: typeof IDL attribute] - expected: FAIL - - [meter.low: IDL set to -10000000000] - expected: FAIL - - [meter.low: IDL set to -1] - expected: FAIL - [meter.low: IDL set to -0] expected: FAIL - [meter.low: IDL set to 0] - expected: FAIL - - [meter.low: IDL set to 1] - expected: FAIL - - [meter.low: IDL set to 10000000000] - expected: FAIL - - [meter.high: typeof IDL attribute] - expected: FAIL - - [meter.high: IDL set to -10000000000] - expected: FAIL - - [meter.high: IDL set to -1] - expected: FAIL - [meter.high: IDL set to -0] expected: FAIL - [meter.high: IDL set to 0] - expected: FAIL - - [meter.high: IDL set to 1] - expected: FAIL - - [meter.high: IDL set to 10000000000] - expected: FAIL - - [meter.optimum: typeof IDL attribute] - expected: FAIL - - [meter.optimum: IDL set to -10000000000] - expected: FAIL - - [meter.optimum: IDL set to -1] - expected: FAIL - [meter.optimum: IDL set to -0] expected: FAIL - [meter.optimum: IDL set to 0] - expected: FAIL - - [meter.optimum: IDL set to 1] - expected: FAIL - - [meter.optimum: IDL set to 10000000000] - expected: FAIL - [form.tabIndex: setAttribute() to "7\\v"] expected: FAIL @@ -3686,71 +3578,35 @@ [meter.value: IDL set to 1e-10] expected: FAIL - [meter.value: IDL set to 0.0001] - expected: FAIL - - [meter.value: IDL set to 1.5] - expected: FAIL - [meter.value: IDL set to 1e+25] expected: FAIL [meter.min: IDL set to 1e-10] expected: FAIL - [meter.min: IDL set to 0.0001] - expected: FAIL - - [meter.min: IDL set to 1.5] - expected: FAIL - [meter.min: IDL set to 1e+25] expected: FAIL [meter.max: IDL set to 1e-10] expected: FAIL - [meter.max: IDL set to 0.0001] - expected: FAIL - - [meter.max: IDL set to 1.5] - expected: FAIL - [meter.max: IDL set to 1e+25] expected: FAIL [meter.low: IDL set to 1e-10] expected: FAIL - [meter.low: IDL set to 0.0001] - expected: FAIL - - [meter.low: IDL set to 1.5] - expected: FAIL - [meter.low: IDL set to 1e+25] expected: FAIL [meter.high: IDL set to 1e-10] expected: FAIL - [meter.high: IDL set to 0.0001] - expected: FAIL - - [meter.high: IDL set to 1.5] - expected: FAIL - [meter.high: IDL set to 1e+25] expected: FAIL [meter.optimum: IDL set to 1e-10] expected: FAIL - [meter.optimum: IDL set to 0.0001] - expected: FAIL - - [meter.optimum: IDL set to 1.5] - expected: FAIL - [meter.optimum: IDL set to 1e+25] expected: FAIL diff --git a/tests/wpt/meta/html/semantics/forms/the-meter-element/meter.html.ini b/tests/wpt/meta/html/semantics/forms/the-meter-element/meter.html.ini deleted file mode 100644 index 6c0f829429e..00000000000 --- a/tests/wpt/meta/html/semantics/forms/the-meter-element/meter.html.ini +++ /dev/null @@ -1,149 +0,0 @@ -[meter.html] - type: testharness - [Default values] - expected: FAIL - - [Invalid floating-point number values] - expected: FAIL - - [max < min] - expected: FAIL - - [value < min] - expected: FAIL - - [value > max] - expected: FAIL - - [low < min] - expected: FAIL - - [low > max] - expected: FAIL - - [high < low] - expected: FAIL - - [high > max] - expected: FAIL - - [optimum < min] - expected: FAIL - - [optimum > max] - expected: FAIL - - [value must be 0 when a string is given] - expected: FAIL - - [default value of min is 0] - expected: FAIL - - [If min is not specified and value is smaller than the default value of min (i.e. 0), the actual value must be 0] - expected: FAIL - - [default value of max is 1.0] - expected: FAIL - - [If max is not specified and value is larger than the default value of max (i.e. 1.0), the actual value must be 1.0] - expected: FAIL - - [If a value smaller than 1.0 is given to min and max is not specified, max must be the same value as its default value (i.e. 1.0)] - expected: FAIL - - [If a value smaller than 1.0 is given to min, max is not specified, and value is larger than the default value of max (i.e. 1.0), the actual value must be 1.0] - expected: FAIL - - [If a value larger than or equal to 1.0 is given to min and max is not specified, max must be the same value as min] - expected: FAIL - - [If a value larger than or equal to 1.0 is given to min and max is not specified, the actual value must be the same value as min] - expected: FAIL - - [If a value smaller than 0 is given to max and min is not specified, min must be be the same value as its default value (i.e. 0)] - expected: FAIL - - [If a value smaller than 0 is given to max and min is not specified, max must be be the same value as the default value of min (i.e. 0)] - expected: FAIL - - [If a value smaller than 0 is given to max and min is not specified, the actual value must be be the same value as the default value of min (i.e. 0)] - expected: FAIL - - [If a value larger than or equal to 0 is given to max and min is not specified, max must be the same value as the default value of min (i.e. 0)] - expected: FAIL - - [If a value larger than or equal to 0 is given to max and min is not specified, min must be the same value as its default value (i.e. 0)] - expected: FAIL - - [If a value larger than or equal to 0 is given to max and min is not specified, the actual value must be the same value as the default value of min (i.e. 0)] - expected: FAIL - - [min must be 0 when a string is given] - expected: FAIL - - [If a string is given to min and value is smaller than the default value of min (i.e. 0), the actual value must be 0] - expected: FAIL - - [max must be 1.0 when a string is given] - expected: FAIL - - [If a string is given to max and value is larger than the default value of min (i.e. 1.0), the actual value must be 1.0] - expected: FAIL - - [giving a string to low must not affect the actual value] - expected: FAIL - - [high must equal max when a string is given to high] - expected: FAIL - - [giving a string to high must not affect the actual value] - expected: FAIL - - [value must not be smaller than min] - expected: FAIL - - [value must not be larger than max] - expected: FAIL - - [default low and high values equal min and max, respectively] - expected: FAIL - - [default low and high values equal 0 and 1.0 respectively, if both low and high are not specified] - expected: FAIL - - [low must not be smaller than min] - expected: FAIL - - [low must not be larger than max] - expected: FAIL - - [high must not be smaller than min] - expected: FAIL - - [high must not be larger than max] - expected: FAIL - - [If min is not specified, low must not be smaller than default value of min (i.e. 0)] - expected: FAIL - - [If a value smaller than low is given to high, it must be set to the same value as low] - expected: FAIL - - [If max is not specified, high must not be larger than default value of max (i.e. 1.0)] - expected: FAIL - - [optimum smaller than min] - expected: FAIL - - [optimum (smaller than min) must not affect min and the actual value] - expected: FAIL - - [optimum smaller than max] - expected: FAIL - - [optimum (larger than max) must not affect max and the actual value] - expected: FAIL - - [default optimum value is the midpoint between min and max] - expected: FAIL - |