Skip to content

layout: Handle zero-sized positioning areas when laying out a dimension for background-repeat#57530

Merged
servo-wpt-sync merged 1 commit intoweb-platform-tests:masterfrom
servo:servo_export_42303
Feb 4, 2026
Merged

layout: Handle zero-sized positioning areas when laying out a dimension for background-repeat#57530
servo-wpt-sync merged 1 commit intoweb-platform-tests:masterfrom
servo:servo_export_42303

Conversation

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

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

The specification says that the rounding of the tile size should only happen
when the positioning size is not zero. This change makes us follow the
specification in this case.

Testing: This PR adds a new WPT crash test.
Fixes: #42216

Reviewed in servo/servo#42303

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.

…areas

When dimensions of these areas are zero, this causes the math to
calculate background repeat to produce NaN values -- leading to crashes
in WebRender. When they are empty, we don't want to render a background
anyway, so just exit early.

Signed-off-by: Martin Robinson <[email protected]>
@servo-wpt-sync servo-wpt-sync changed the title layout: Do not render backgrounds with empty positioning or painting areas layout: Handle zero-sized positioning areas when laying out a dimension for background-repeat Feb 3, 2026
@servo-wpt-sync servo-wpt-sync merged commit e67a46e into web-platform-tests:master Feb 4, 2026
25 checks passed
@servo-wpt-sync servo-wpt-sync deleted the servo_export_42303 branch February 4, 2026 09:03
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