Skip to content

Test that the first layout sizes an auto width float - #290

Merged
eXpl0it3r merged 1 commit into
masterfrom
fix/float-first-layout
Nov 23, 2026
Merged

eXpl0it3r merged 1 commit into
masterfrom
fix/float-first-layout

Conversation

@eXpl0it3r

@eXpl0it3r eXpl0it3r commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

The fix for an auto width float getting a width of 0 on the first layout pass already landed with #294, what's left of this PR is the regression test for the reported case.

AutoWidthFloat_IsSizedByTheFirstLayout lays out a float with a large font in an overflow: hidden block once, checks the float's width and the position of the text next to it, and then checks that a second pass doesn't change the container's size. For that, LayoutHarness.PerformLayout runs a single layout pass and is used by LayoutHarness.Layout as well, so the second pass also fails the test on a layout error.

How to test this PR?

CI should succeed.

@eXpl0it3r
eXpl0it3r force-pushed the fix/float-first-layout branch from d4b647c to eefad97 Compare November 23, 2026 11:32
@eXpl0it3r eXpl0it3r changed the title Measure the content of a float before its shrink-to-fit width Test that the first layout sizes an auto width float Nov 23, 2026
@eXpl0it3r
eXpl0it3r merged commit 588185e into master Nov 23, 2026
24 checks passed
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.

1 participant