Skip to content

layout: Cleanup for replaced elements with widgets#56153

Merged
servo-wpt-sync merged 1 commit intoweb-platform-tests:masterfrom
servo:servo_export_40769
Nov 20, 2025
Merged

layout: Cleanup for replaced elements with widgets#56153
servo-wpt-sync merged 1 commit intoweb-platform-tests:masterfrom
servo:servo_export_40769

Conversation

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

@servo-wpt-sync servo-wpt-sync commented Nov 20, 2025

This cleans up the changes done in #40578.

In particular, it removes the unnecessary Contents::ReplacedWithWidget since we can handle that with Contents::Replaced. It also removes IndependentFormattingContextContents::ReplacedWithWidget in favor of IndependentFormattingContextContents::Replaced, by adding an optional parameter for the widget.

That ensures that the behavior of replaced elements won't accidentally diverge dependign on whether they have a widget. For example, #40578 forgot to handle ReplacedWithWidget in tentative_block_content_size().

Additionally, this removes the hardcoded especial behavior for <video> that was added in ServoThreadSafeLayoutElement::with_pseudo().

Testing: Adding a reftest
Fixes: #40708
Fixes: #40770
Reviewed in servo/servo#40769

Signed-off-by: Oriol Brufau <[email protected]>
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 merged commit e22ad03 into web-platform-tests:master Nov 20, 2025
25 checks passed
@servo-wpt-sync servo-wpt-sync deleted the servo_export_40769 branch November 20, 2025 21:45
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