mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Auto merge of #25222 - pshaughn:node_isconnected, r=jdm
adding .isConnected DOM attribute <!-- Please describe your changes on the following line: --> is_connected already existed for this concept and just needed to be hooked up to an IDL attribute. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25126 <!-- Either: --> - [X] There are tests for these changes OR <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
e10cf7adad
5 changed files with 11 additions and 42 deletions
|
@ -2296,6 +2296,11 @@ impl NodeMethods for Node {
|
|||
USVString(String::from(self.owner_doc().base_url().as_str()))
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-node-isconnected
|
||||
fn IsConnected(&self) -> bool {
|
||||
return self.is_connected();
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-node-ownerdocument
|
||||
fn GetOwnerDocument(&self) -> Option<DomRoot<Document>> {
|
||||
match self.type_id() {
|
||||
|
|
|
@ -28,6 +28,9 @@ interface Node : EventTarget {
|
|||
[Pure]
|
||||
readonly attribute USVString baseURI;
|
||||
|
||||
[Pure]
|
||||
readonly attribute boolean isConnected;
|
||||
|
||||
[Pure]
|
||||
readonly attribute Document? ownerDocument;
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "nextSibling" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "isConnected" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "isSameNode(Node)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -59,21 +62,12 @@
|
|||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "removeChild(Node)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: element must inherit property "isConnected" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createComment("abc") must inherit property "isConnected" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: calling lookupPrefix(DOMString) on document.querySelector("[id\]").attributes[0\] with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "PROCESSING_INSTRUCTION_NODE" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: new Document() must inherit property "isConnected" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "baseURI" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -107,12 +101,6 @@
|
|||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "childNodes" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createTextNode("abc") must inherit property "isConnected" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.doctype must inherit property "isConnected" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "parentElement" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -140,18 +128,9 @@
|
|||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "lookupNamespaceURI(DOMString)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.createDocumentFragment() must inherit property "isConnected" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: calling lookupNamespaceURI(DOMString) on document.querySelector("[id\]").attributes[0\] with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "isConnected" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: xmlDoc must inherit property "isConnected" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "firstChild" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -170,15 +149,9 @@
|
|||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "DOCUMENT_TYPE_NODE" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: attribute isConnected]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "hasChildNodes()" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "isConnected" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Node interface: document.querySelector("[id\]").attributes[0\] must inherit property "lastChild" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
[Node-isConnected.html]
|
||||
type: testharness
|
||||
[Test with ordinary child nodes]
|
||||
expected: FAIL
|
||||
|
||||
[Test with iframes]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[option-text-setter.html]
|
||||
[Verify that using HTMLOptionElement.text setter does not update the existing text child node.]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue