Skip to content

layout: Do not consider pseudo-elements widgets for the purposes of replaced content#57567

Merged
servo-wpt-sync merged 2 commits intoweb-platform-tests:masterfrom
servo:servo_export_42332
Feb 5, 2026
Merged

layout: Do not consider pseudo-elements widgets for the purposes of replaced content#57567
servo-wpt-sync merged 2 commits intoweb-platform-tests:masterfrom
servo:servo_export_42332

Conversation

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

@servo-wpt-sync servo-wpt-sync commented Feb 4, 2026

When an element has an image content value or list-style-image value they end up duplicating the content of the element inside the generated '::marker'.

This is caused by code inside IndependentFormattingContext for user agent widgets (all user agent shadow dom), this code is specifically aimed at video and audio elements.

This patch adapts that code to be more specific to elements without a pseudo-element chain (e.g. audio and video)

Testing: newly added test crashes on main servo (slightly flakily), but passes consistently now.
Fixes: #42329
Fixes: #41231

Reviewed in servo/servo#42332

Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Servo project.

@servo-wpt-sync servo-wpt-sync force-pushed the servo_export_42332 branch 4 times, most recently from ee5dad1 to 0621e8e Compare February 5, 2026 11:42
When an element has an image content value or list-style-image value they end up duplicating the content of the element inside the generated '::marker'.

This is caused by code inside IndependentFormattingContext for user agent widgets (all user agent shadow dom), this code is specifically aimed at video and audio elements.

This patch adapts that code to be more specific to elements without a pseudo-element chain (e.g. audio and video)

Signed-off-by: Luke Warlow <[email protected]>
Signed-off-by: Luke Warlow <[email protected]>
@servo-wpt-sync servo-wpt-sync changed the title layout: fix double borrow for details elements with an image marker layout: Do not consider pseudo-elements widgets for the purposes of replacec content Feb 5, 2026
@servo-wpt-sync servo-wpt-sync changed the title layout: Do not consider pseudo-elements widgets for the purposes of replacec content layout: Do not consider pseudo-elements widgets for the purposes of replaced content Feb 5, 2026
@servo-wpt-sync servo-wpt-sync merged commit bb4d746 into web-platform-tests:master Feb 5, 2026
26 checks passed
@servo-wpt-sync servo-wpt-sync deleted the servo_export_42332 branch February 5, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants