Implement HTMLQuoteElement "cite" attribute (#33307)

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2024-09-04 13:29:59 +02:00 committed by GitHub
parent febb4f24c4
commit fc5f8e9237
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 12 additions and 299 deletions

View file

@ -6,7 +6,9 @@ use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use js::rust::HandleObject;
use crate::dom::bindings::codegen::Bindings::HTMLQuoteElementBinding::HTMLQuoteElementMethods;
use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::USVString;
use crate::dom::document::Document;
use crate::dom::htmlelement::HTMLElement;
use crate::dom::node::Node;
@ -43,3 +45,11 @@ impl HTMLQuoteElement {
)
}
}
impl HTMLQuoteElementMethods for HTMLQuoteElement {
// https://html.spec.whatwg.org/multipage/#dom-quote-cite
make_url_getter!(Cite, "cite");
// https://html.spec.whatwg.org/multipage/#dom-quote-cite
make_url_setter!(SetCite, "cite");
}

View file

@ -7,6 +7,6 @@
interface HTMLQuoteElement : HTMLElement {
[HTMLConstructor] constructor();
// [CEReactions]
// attribute DOMString cite;
[CEReactions]
attribute USVString cite;
};

View file

@ -1,12 +0,0 @@
[HTMLQuoteElement.html]
[cite on blockquote use HTMLQuoteElement must enqueue an attributeChanged reaction when adding cite content attribute]
expected: FAIL
[cite on blockquote use HTMLQuoteElement must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[cite on q use HTMLQuoteElement must enqueue an attributeChanged reaction when adding cite content attribute]
expected: FAIL
[cite on q use HTMLQuoteElement must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL

View file

@ -2745,9 +2745,6 @@
[HTMLTableCellElement interface: attribute vAlign]
expected: FAIL
[HTMLQuoteElement interface: attribute cite]
expected: FAIL
[HTMLModElement interface: document.createElement("ins") must inherit property "dateTime" with the proper type]
expected: FAIL
@ -3942,9 +3939,6 @@
[HTMLParamElement interface: document.createElement("param") must inherit property "value" with the proper type]
expected: FAIL
[HTMLQuoteElement interface: document.createElement("q") must inherit property "cite" with the proper type]
expected: FAIL
[HTMLMarqueeElement interface: operation start()]
expected: FAIL
@ -3975,9 +3969,6 @@
[HTMLInputElement interface: createInput("checkbox") must inherit property "autocomplete" with the proper type]
expected: FAIL
[HTMLQuoteElement interface: document.createElement("blockquote") must inherit property "cite" with the proper type]
expected: FAIL
[HTMLObjectElement interface: document.createElement("object") must inherit property "name" with the proper type]
expected: FAIL

View file

@ -1121,138 +1121,6 @@
[blockquote.tabIndex: IDL set to -2147483648]
expected: FAIL
[blockquote.cite: typeof IDL attribute]
expected: FAIL
[blockquote.cite: IDL get with DOM attribute unset]
expected: FAIL
[blockquote.cite: setAttribute() to ""]
expected: FAIL
[blockquote.cite: setAttribute() to " foo "]
expected: FAIL
[blockquote.cite: setAttribute() to "http://site.example/"]
expected: FAIL
[blockquote.cite: setAttribute() to "//site.example/path???@#l"]
expected: FAIL
[blockquote.cite: 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 "]
expected: FAIL
[blockquote.cite: setAttribute() to undefined]
expected: FAIL
[blockquote.cite: setAttribute() to 7]
expected: FAIL
[blockquote.cite: setAttribute() to 1.5]
expected: FAIL
[blockquote.cite: setAttribute() to "5%"]
expected: FAIL
[blockquote.cite: setAttribute() to "+100"]
expected: FAIL
[blockquote.cite: setAttribute() to ".5"]
expected: FAIL
[blockquote.cite: setAttribute() to true]
expected: FAIL
[blockquote.cite: setAttribute() to false]
expected: FAIL
[blockquote.cite: setAttribute() to object "[object Object\]"]
expected: FAIL
[blockquote.cite: setAttribute() to NaN]
expected: FAIL
[blockquote.cite: setAttribute() to Infinity]
expected: FAIL
[blockquote.cite: setAttribute() to -Infinity]
expected: FAIL
[blockquote.cite: setAttribute() to "\\0"]
expected: FAIL
[blockquote.cite: setAttribute() to null]
expected: FAIL
[blockquote.cite: setAttribute() to object "test-toString"]
expected: FAIL
[blockquote.cite: setAttribute() to object "test-valueOf"]
expected: FAIL
[blockquote.cite: IDL set to ""]
expected: FAIL
[blockquote.cite: IDL set to " foo "]
expected: FAIL
[blockquote.cite: IDL set to "http://site.example/"]
expected: FAIL
[blockquote.cite: IDL set to "//site.example/path???@#l"]
expected: FAIL
[blockquote.cite: 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 "]
expected: FAIL
[blockquote.cite: IDL set to undefined]
expected: FAIL
[blockquote.cite: IDL set to 7]
expected: FAIL
[blockquote.cite: IDL set to 1.5]
expected: FAIL
[blockquote.cite: IDL set to "5%"]
expected: FAIL
[blockquote.cite: IDL set to "+100"]
expected: FAIL
[blockquote.cite: IDL set to ".5"]
expected: FAIL
[blockquote.cite: IDL set to true]
expected: FAIL
[blockquote.cite: IDL set to false]
expected: FAIL
[blockquote.cite: IDL set to object "[object Object\]"]
expected: FAIL
[blockquote.cite: IDL set to NaN]
expected: FAIL
[blockquote.cite: IDL set to Infinity]
expected: FAIL
[blockquote.cite: IDL set to -Infinity]
expected: FAIL
[blockquote.cite: IDL set to "\\0"]
expected: FAIL
[blockquote.cite: IDL set to null]
expected: FAIL
[blockquote.cite: IDL set to object "test-toString"]
expected: FAIL
[blockquote.cite: IDL set to object "test-valueOf"]
expected: FAIL
[ol.accessKey: typeof IDL attribute]
expected: FAIL

View file

@ -2297,138 +2297,6 @@
[q.tabIndex: IDL set to -2147483648]
expected: FAIL
[q.cite: typeof IDL attribute]
expected: FAIL
[q.cite: IDL get with DOM attribute unset]
expected: FAIL
[q.cite: setAttribute() to ""]
expected: FAIL
[q.cite: setAttribute() to " foo "]
expected: FAIL
[q.cite: setAttribute() to "http://site.example/"]
expected: FAIL
[q.cite: setAttribute() to "//site.example/path???@#l"]
expected: FAIL
[q.cite: 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 "]
expected: FAIL
[q.cite: setAttribute() to undefined]
expected: FAIL
[q.cite: setAttribute() to 7]
expected: FAIL
[q.cite: setAttribute() to 1.5]
expected: FAIL
[q.cite: setAttribute() to "5%"]
expected: FAIL
[q.cite: setAttribute() to "+100"]
expected: FAIL
[q.cite: setAttribute() to ".5"]
expected: FAIL
[q.cite: setAttribute() to true]
expected: FAIL
[q.cite: setAttribute() to false]
expected: FAIL
[q.cite: setAttribute() to object "[object Object\]"]
expected: FAIL
[q.cite: setAttribute() to NaN]
expected: FAIL
[q.cite: setAttribute() to Infinity]
expected: FAIL
[q.cite: setAttribute() to -Infinity]
expected: FAIL
[q.cite: setAttribute() to "\\0"]
expected: FAIL
[q.cite: setAttribute() to null]
expected: FAIL
[q.cite: setAttribute() to object "test-toString"]
expected: FAIL
[q.cite: setAttribute() to object "test-valueOf"]
expected: FAIL
[q.cite: IDL set to ""]
expected: FAIL
[q.cite: IDL set to " foo "]
expected: FAIL
[q.cite: IDL set to "http://site.example/"]
expected: FAIL
[q.cite: IDL set to "//site.example/path???@#l"]
expected: FAIL
[q.cite: 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 "]
expected: FAIL
[q.cite: IDL set to undefined]
expected: FAIL
[q.cite: IDL set to 7]
expected: FAIL
[q.cite: IDL set to 1.5]
expected: FAIL
[q.cite: IDL set to "5%"]
expected: FAIL
[q.cite: IDL set to "+100"]
expected: FAIL
[q.cite: IDL set to ".5"]
expected: FAIL
[q.cite: IDL set to true]
expected: FAIL
[q.cite: IDL set to false]
expected: FAIL
[q.cite: IDL set to object "[object Object\]"]
expected: FAIL
[q.cite: IDL set to NaN]
expected: FAIL
[q.cite: IDL set to Infinity]
expected: FAIL
[q.cite: IDL set to -Infinity]
expected: FAIL
[q.cite: IDL set to "\\0"]
expected: FAIL
[q.cite: IDL set to null]
expected: FAIL
[q.cite: IDL set to object "test-toString"]
expected: FAIL
[q.cite: IDL set to object "test-valueOf"]
expected: FAIL
[dfn.accessKey: typeof IDL attribute]
expected: FAIL

View file

@ -2,12 +2,6 @@
[The 'href' attribute of the 'area' element]
expected: FAIL
[The 'cite' attribute of the 'q' element]
expected: FAIL
[The 'cite' attribute of the 'blockquote' element]
expected: FAIL
[The 'cite' attribute of the 'ins' element]
expected: FAIL

View file

@ -2,12 +2,6 @@
[The 'href' attribute of the 'area' element]
expected: FAIL
[The 'cite' attribute of the 'q' element]
expected: FAIL
[The 'cite' attribute of the 'blockquote' element]
expected: FAIL
[The 'cite' attribute of the 'ins' element]
expected: FAIL