mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Support align attribute on HTMLParagraphElement interface (#36054)
Signed-off-by: Stephen Muss <stephenmuss@gmail.com>
This commit is contained in:
parent
a442a11330
commit
07e06f5635
4 changed files with 11 additions and 122 deletions
|
@ -6,7 +6,9 @@ use dom_struct::dom_struct;
|
|||
use html5ever::{LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLParagraphElementBinding::HTMLParagraphElementMethods;
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::document::Document;
|
||||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::node::Node;
|
||||
|
@ -46,3 +48,11 @@ impl HTMLParagraphElement {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLParagraphElementMethods<crate::DomTypeHolder> for HTMLParagraphElement {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-p-align
|
||||
make_getter!(Align, "align");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-p-align
|
||||
make_setter!(SetAlign, "align");
|
||||
}
|
||||
|
|
|
@ -12,6 +12,5 @@ interface HTMLParagraphElement : HTMLElement {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#HTMLParagraphElement-partial
|
||||
partial interface HTMLParagraphElement {
|
||||
// [CEReactions]
|
||||
// attribute DOMString align;
|
||||
[CEReactions] attribute DOMString align;
|
||||
};
|
||||
|
|
|
@ -6292,12 +6292,6 @@
|
|||
[HTMLHeadingElement interface: document.createElement("h1") must inherit property "align" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLParagraphElement interface: attribute align]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLParagraphElement interface: document.createElement("p") must inherit property "align" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLHRElement interface: attribute noShade]
|
||||
expected: FAIL
|
||||
|
||||
|
|
114
tests/wpt/meta/html/dom/reflection-grouping.html.ini
vendored
114
tests/wpt/meta/html/dom/reflection-grouping.html.ini
vendored
|
@ -191,120 +191,6 @@
|
|||
[p.tabIndex: IDL set to -2147483648]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: typeof IDL attribute]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL get with DOM attribute unset]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to ""]
|
||||
expected: FAIL
|
||||
|
||||
[p.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 "]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to undefined]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to 7]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to 1.5]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to "5%"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to "+100"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to ".5"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to true]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to false]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to object "[object Object\]"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to NaN]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to Infinity]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to -Infinity]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to "\\0"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to null]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to object "test-toString"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: setAttribute() to object "test-valueOf"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to ""]
|
||||
expected: FAIL
|
||||
|
||||
[p.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 "]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to undefined]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to 7]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to 1.5]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to "5%"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to "+100"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to ".5"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to true]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to false]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to object "[object Object\]"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to NaN]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to Infinity]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to -Infinity]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to "\\0"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to null]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to object "test-toString"]
|
||||
expected: FAIL
|
||||
|
||||
[p.align: IDL set to object "test-valueOf"]
|
||||
expected: FAIL
|
||||
|
||||
[hr.accessKey: typeof IDL attribute]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue