mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Implement 'align' IDL attribute on '<hr>'.
This commit is contained in:
parent
5adf36231e
commit
bd74844537
4 changed files with 8 additions and 136 deletions
|
@ -37,6 +37,12 @@ impl HTMLHRElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLHRElementMethods for HTMLHRElement {
|
impl HTMLHRElementMethods for HTMLHRElement {
|
||||||
|
// https://html.spec.whatwg.org/multipage/#dom-hr-align
|
||||||
|
make_getter!(Align, "align");
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/#dom-hr-align
|
||||||
|
make_atomic_setter!(SetAlign, "align");
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-hr-color
|
// https://html.spec.whatwg.org/multipage/#dom-hr-color
|
||||||
make_getter!(Color, "color");
|
make_getter!(Color, "color");
|
||||||
|
|
||||||
|
@ -86,6 +92,7 @@ impl VirtualMethods for HTMLHRElement {
|
||||||
|
|
||||||
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
|
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
|
||||||
match name {
|
match name {
|
||||||
|
&atom!("align") => AttrValue::from_dimension(value),
|
||||||
&atom!("color") => AttrValue::from_legacy_color(value),
|
&atom!("color") => AttrValue::from_legacy_color(value),
|
||||||
&atom!("width") => AttrValue::from_dimension(value),
|
&atom!("width") => AttrValue::from_dimension(value),
|
||||||
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
|
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
|
||||||
|
|
|
@ -10,7 +10,7 @@ interface HTMLHRElement : HTMLElement {
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#HTMLHRElement-partial
|
// https://html.spec.whatwg.org/multipage/#HTMLHRElement-partial
|
||||||
partial interface HTMLHRElement {
|
partial interface HTMLHRElement {
|
||||||
// attribute DOMString align;
|
attribute DOMString align;
|
||||||
attribute DOMString color;
|
attribute DOMString color;
|
||||||
// attribute boolean noShade;
|
// attribute boolean noShade;
|
||||||
// attribute DOMString size;
|
// attribute DOMString size;
|
||||||
|
|
|
@ -2148,18 +2148,12 @@
|
||||||
[HTMLParagraphElement interface: document.createElement("p") must inherit property "align" with the proper type (0)]
|
[HTMLParagraphElement interface: document.createElement("p") must inherit property "align" with the proper type (0)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTMLHRElement interface: attribute align]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[HTMLHRElement interface: attribute noShade]
|
[HTMLHRElement interface: attribute noShade]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTMLHRElement interface: attribute size]
|
[HTMLHRElement interface: attribute size]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[HTMLHRElement interface: document.createElement("hr") must inherit property "align" with the proper type (0)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[HTMLHRElement interface: document.createElement("hr") must inherit property "noShade" with the proper type (2)]
|
[HTMLHRElement interface: document.createElement("hr") must inherit property "noShade" with the proper type (2)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1317,135 +1317,6 @@
|
||||||
[hr.tabIndex: IDL set to -2147483648 followed by getAttribute()]
|
[hr.tabIndex: IDL set to -2147483648 followed by getAttribute()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[hr.align: typeof IDL attribute]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL get with DOM attribute unset]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to "" followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: 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
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to undefined followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to 7 followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to 1.5 followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to true followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to false followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to object "[object Object\]" followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to NaN followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to Infinity followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to -Infinity followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to "\\0" followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to null followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to object "test-toString" followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: setAttribute() to object "test-valueOf" followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to "" followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: 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
|
|
||||||
|
|
||||||
[hr.align: IDL set to undefined followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to undefined followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to 7 followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to 7 followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to 1.5 followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to 1.5 followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to true followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to true followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to false followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to false followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to object "[object Object\]" followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to object "[object Object\]" followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to NaN followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to NaN followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to Infinity followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to Infinity followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to -Infinity followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to -Infinity followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to "\\0" followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to null followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to null followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to object "test-toString" followed by getAttribute()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to object "test-toString" followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.align: IDL set to object "test-valueOf" followed by IDL get]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hr.noShade: typeof IDL attribute]
|
[hr.noShade: typeof IDL attribute]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue