layout: Use the PseudoElement from ServoThreadSafeLayoutNode in NodeAndStyleInfo (#38630)

Instead of storing the non-pseudo version of the node in
`NodeAndStyleInfo`, store the pseudo version and use that to query the
`PseudoElement` that a `NodeAndStyleInfo` refers to.

This is a step on the way toward fixing nested pseudo-elements in Servo.

Testing: This should not change behavior and is thus covered by existing
WPT tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-08-13 19:31:57 +02:00 committed by GitHub
parent ee7c1d9109
commit 5ff084a688
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 34 additions and 38 deletions

View file

@ -228,7 +228,7 @@ impl<'a, 'dom> ModernContainerBuilder<'a, 'dom> {
let anonymous_info = LazyLock::new(|| {
self.info
.pseudo(self.context, PseudoElement::ServoAnonymousBox)
.with_pseudo_element(self.context, PseudoElement::ServoAnonymousBox)
.expect("Should always be able to construct info for anonymous boxes.")
});