Files
sousa-gecko/testing/web-platform/tests/css
Ting-Yu Lin b4c09dcd55 Bug 2054166 - Force reflow floats when the last column is reflowed with an unconstrained block-size. r=layout-reviewers,dshin
`nsColumnSetFrame` may reflow the last column with an unconstrained block-size,
e.g. at the end of the last column balancing reflow [1]. When that happens,
i.e., `reflowLastColumnWithUnconstrainedAvailBSize=true`, we want to force
reflow all the floats to make sure they are fragmented correctly, by setting
`mMustReflowPlaceholders=true` to ensure the line containing floats is dirty
[2]. This edit alone (in nsColumnSetFrame.cpp) fixes
`column-balancing-with-floats-001.html`.

However, to fix all the assertions seen in bug 2054166 comment 1, we need to
generalize the fix in Bug 1441048 Part 2
https://hg-edge.mozilla.org/mozilla-central/rev/30e4adcd2dbd

This patch extends `ReflowInput::IsInFragmentedContext()` to catch more
scenarios and use the helper when marking lines dirty so that the above
`mMustReflowPlaceholders` trick works. Without this patch,
`column-balancing-with-floats-002.html` can trigger soft assertions in
nsColumnSetFrame [3] and nsFlexContainerFrame [4].

[1] https://searchfox.org/firefox-main/rev/aaf0207c409c5f6479cc92bc1bf407a453d63cdc/layout/generic/nsColumnSetFrame.cpp#1176-1188
[2] https://searchfox.org/firefox-main/rev/aaf0207c409c5f6479cc92bc1bf407a453d63cdc/layout/generic/nsBlockFrame.cpp#3417-3420
[3] https://searchfox.org/firefox-main/rev/7d5b291d2351f7d04c504b03fa22ec3dcdf81b54/layout/generic/nsColumnSetFrame.cpp#1313-1316
[4] https://searchfox.org/firefox-main/rev/7d5b291d2351f7d04c504b03fa22ec3dcdf81b54/layout/generic/nsFlexContainerFrame.cpp#6008-6011

Differential Revision: https://phabricator.services.mozilla.com/D312101
2026-07-14 21:05:55 +00:00
..
…
…

Introduction

This directory contains testsuites for CSS WG specifications, including ones that do not strictly speaking define CSS features, e.g., Geometry Interfaces.

The directories should be named like the specification's shortname, but without any level suffix.

As the test harness relies on the largely undocumented old CSS build system, this directory has a number of test requirements specific to it:

  • support files for a given test must live in an adjacent support directory;

  • tests must have a <link rel=help> pointing to what they are testing;

  • for each spec so linked, test filenames must be unique; and

  • support and reference files must have unique filenames within the entire css directory.