Don't clamp replaced elements' max size to the available space - #937
Merged
nicoburns merged 1 commit intoSep 24, 2026
Merged
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
compute_replaced_layoutcapped replaced elements' max size at the available space:That isn't in the spec. Replaced elements should overflow their container, not shrink to fit it. In narrow containers (e.g. the
width: 0divs used by manycss-text/line-breakingtests)<img>s collapsed to 0×0.WPT css + html vs main: 24 tests improved, 4 regressed (+18 subtests).
css-sizing/keyword-sizes-on-replaced-element.html,css-sizing/stretch/aspect-ratio-2.htmlandcss-multicol/multicol-on-broken-image-alt-text.htmlwere passing only because of the clamp. They depend onmin-content/fit-content/stretchsizing of replaced elements, which isn't implemented properly.css-text/line-breaking/line-breaking-replaced-005.htmlregresses with the current Parley pin. It's fixed by Don't force a line break after an inline box that overflows at the start of a line parley#61, which stops Parley from forcing a line break after an inline box that overflows at the start of a line. With that PR included the result is 25 improved, 3 regressed.line-breaking-replaced-001/004/006also need a root inline strut for image-only lines. That's left to #832.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/9f574399dc5b4df490331cd42ec926e5
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/9f574399dc5b4df490331cd42ec926e5?variant=devin-insiders
Requested by: @nicoburns
WPT results
Subtests: 31 newly passing, 14 newly failing (net +17).
Full diff (27 changed tests)
Generated by the WPT workflow.