Implement ShadowRoot.innerHtml attribute (#34335)

* Implement DocumentFragment::fragment_serialization_algorithm

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement ShadowRoot innerHtml attribute

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* cargo-clippy

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Reuse existing serialization code and move helpers into Node

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fix typo

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2024-11-22 18:07:01 +01:00 committed by GitHub
parent 44ed111c0a
commit 1198b26ec9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 120 additions and 127 deletions

View file

@ -1,3 +0,0 @@
[getComputedStyle-display-none-001.html]
[getComputedStyle gets invalidated in display: none subtrees due to inherited changes to an ancestor shadow host]
expected: FAIL

View file

@ -1,6 +0,0 @@
[selectorText-modification-restyle-002.html]
[Check initial color.]
expected: FAIL
[Check that color changes correctly after shadow stylesheet selector and #container class is changed.]
expected: FAIL

View file

@ -1,18 +1,6 @@
[host-context-pseudo-class-in-has.html]
[Before adding 'a' to #host_parent: Check #subject1 color]
expected: FAIL
[Before adding 'a' to #host_parent: Check #subject2 color]
expected: FAIL
[After adding 'a' to #host_parent: Check #subject1 color]
expected: FAIL
[After adding 'a' to #host_parent: Check #subject2 color]
expected: FAIL
[After removing 'a' from #host_parent: Check #subject1 color]
expected: FAIL
[After removing 'a' from #host_parent: Check #subject2 color]
expected: FAIL
expected: FAIL

View file

@ -1,10 +1,4 @@
[host-pseudo-class-in-has.html]
[Before adding 'a' to #host: Check #subject1 color]
expected: FAIL
[Before adding 'a' to #host: Check #subject2 color]
expected: FAIL
[After adding 'a' to #host: Check #subject1 color]
expected: FAIL

View file

@ -1,7 +1,4 @@
[is-where-shadow.html]
[:is() inside :host()]
expected: FAIL
[:is() inside :host-context()]
expected: FAIL

View file

@ -1,9 +0,0 @@
[ShadowRoot.html]
[innerHTML on ShadowRoot must upgrade a custom element]
expected: FAIL
[innerHTML on ShadowRoot must enqueue connectedCallback on newly upgraded custom elements when the shadow root is connected]
expected: FAIL
[innerHTML on ShadowRoot must enqueue disconnectedCallback when removing a custom element]
expected: FAIL

View file

@ -1,3 +0,0 @@
[rootNode.html]
[getRootNode() must return context object's shadow-including root if options's composed is true, and context object's root otherwise]
expected: FAIL

View file

@ -1,3 +0,0 @@
[Range-intersectsNode-shadow.html]
[Range.intersectsNode() doesn't return true for shadow children in other trees]
expected: FAIL

View file

@ -1,3 +1,9 @@
[lang-attribute-shadow.window.html]
[lang on slot inherits from shadow host]
expected: FAIL
[lang only on host]
expected: FAIL
[lang on host and slotted element]
expected: FAIL

View file

@ -1691,9 +1691,6 @@
[ShadowRoot interface: operation getHTML(optional GetHTMLOptions)]
expected: FAIL
[ShadowRoot interface: attribute innerHTML]
expected: FAIL
[Element interface: operation getHTML(optional GetHTMLOptions)]
expected: FAIL
@ -6023,9 +6020,6 @@
[ShadowRoot interface: operation getHTML(optional GetHTMLOptions)]
expected: FAIL
[ShadowRoot interface: attribute innerHTML]
expected: FAIL
[Element interface: operation setHTMLUnsafe((TrustedHTML or DOMString))]
expected: FAIL

View file

@ -1,4 +1,5 @@
[slot-element-focusable.tentative.html]
expected: CRASH
[slot element with display: block should be focusable]
expected: FAIL

View file

@ -1,4 +1,5 @@
[ShadowRoot-interface.html]
expected: CRASH
[ShadowRoot.activeElement must return the focused element of the context object when shadow root is open.]
expected: FAIL

View file

@ -4,7 +4,7 @@
expected: FAIL
[innerHTML on shadowRoot]
expected: FAIL
expected: PASS
[document.write allowed from synchronous script loaded from main document]
expected: FAIL

View file

@ -1,3 +0,0 @@
[test-009.html]
[A_10_01_01_04_01_T01]
expected: FAIL

View file

@ -1,3 +0,0 @@
[test-010.html]
[A_10_01_01_04_02_T01_02]
expected: FAIL

View file

@ -1,3 +0,0 @@
[test-002.html]
[A_05_05_02_T01]
expected: FAIL

View file

@ -1,3 +0,0 @@
[test-002.html]
[A_05_03_02_T01]
expected: FAIL

View file

@ -1,3 +0,0 @@
[test-003.html]
[A_05_03_03_T01]
expected: FAIL

View file

@ -1,12 +1,6 @@
[dom-tree-accessors-001.html]
[The content of title element in a shadow tree should not be accessible from owner document's "title" attribute.]
expected: FAIL
[Elements in a shadow tree should not be accessible from owner document's getElementsByName() method.]
expected: FAIL
[Elements in a shadow tree should not be accessible from owner document's "all" attribute.]
expected: FAIL
[Elements in a shadow tree should not be accessible from owner document's getElementById() method.]
expected: FAIL