Skip to content

layout: Ensure that background-repeat: round size calculation rounds to nearest natural number#56595

Merged
servo-wpt-sync merged 1 commit intoweb-platform-tests:masterfrom
servo:servo_export_41158
Dec 10, 2025
Merged

layout: Ensure that background-repeat: round size calculation rounds to nearest natural number#56595
servo-wpt-sync merged 1 commit intoweb-platform-tests:masterfrom
servo:servo_export_41158

Conversation

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

The previous code was just rounding to the nearest integrer, while the
specification says to round to the nearest natural number. The prevents
inf and NaN values from creeping to the results. This was leading to
a crash in WebRender.

Testing: This change adds a crash test.
Fixes: #41130.

Reviewed in servo/servo#41158

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.

…s to nearest natural number

The previous code was just rounding to the nearest integrer, while the
specification says to round to the nearest natural number. The prevents
`inf` and `NaN` values from creeping to the results. This was leading to
a crash in WebRender.

Signed-off-by: Martin Robinson <[email protected]>
@servo-wpt-sync servo-wpt-sync merged commit 30df11e into web-platform-tests:master Dec 10, 2025
20 of 21 checks passed
@servo-wpt-sync servo-wpt-sync deleted the servo_export_41158 branch December 10, 2025 14:40
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