Lay out the contents of slot elements (#35220)

* Make Slottable match layout/alignment of NonNull<Node>

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

* Implement ServoLayoutElement::slotted_nodes

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

* Bump mozjs

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

* Layout the contents of slot elements

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

* Implement ServoLayoutElement::assigned_slot

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

* implement ServoLayoutElement::traversal_parent

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

* Simplify slottable name update

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

* Don't iterate over children of shadow hosts

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

* Recompute slot style when contents change

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

* Change match_slottable to a function instead of a macro

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

* Fix crown errors

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

* Update WPT expectations

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

* Reset a slottable's assigned slot when it's removed from the slot

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 2025-02-02 21:49:42 +01:00 committed by GitHub
parent 938baf6bf3
commit 6a2e37183c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 263 additions and 143 deletions

View file

@ -1,2 +0,0 @@
[quotes-slot-scoping.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[display-contents-slot-attach-whitespace.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[counter-slot-order-scoping.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[counter-slot-order.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[text-decoration-propagation-shadow.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[remove-slotted-with-whitespace-sibling.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.text-outside-of-the-flat-tree.html]
expected: FAIL

View file

@ -1,7 +1,4 @@
[DocumentOrShadowRoot-prototype-elementFromPoint.html]
[document.elementFromPoint and shadowRoot.elementFromPoint must return the shadow host when the hit-tested text node is assigned to a slot and the host has display: inline]
expected: FAIL
[document.elementFromPoint and shadowRoot.elementFromPoint must return the element assigned to a slot when hit-tested text node under an element is assigned to a slot in the shadow tree and the shadow host of the slot has display: block]
expected: FAIL

View file

@ -0,0 +1,2 @@
[focus-pseudo-on-shadow-host-2.html]
expected: FAIL

View file

@ -1,6 +0,0 @@
[imperative-slot-fallback-clear.html]
[Text node fallback should be cleared in a subsequently layout]
expected: FAIL
[Element fallback should be cleared in a subsequent layout]
expected: FAIL

View file

@ -1,2 +0,0 @@
[imperative-slot-layout-invalidation-001.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[layout-slot-no-longer-fallback.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[slot-fallback-content-001.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[slot-fallback-content-002.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[slot-fallback-content-007.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[reprojection-001.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[shadow-root-002.html]
expected: FAIL