Closed Bug 1583639 Opened 5 years ago Closed 5 years ago

Improve column fragmentation story with "column-fill:auto" mode in nested columns

Categories

(Core :: Layout: Columns, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(4 files)

Specifically, fix nsColumnSetFrame to pass testing/web-platform/tests/css/css-multicol/multicol-breaking-003.html.

This is a prerequisite for an easy fix in bug 1575054.

The associated if-block has a "break" statement at the end of the scope
to break the while-loop, making the else-block redundant.

In next patch, this variable won't be set to INT32_MAX in
"column-fill:auto" mode, and it will be used in Part 4. Hence the
rename.

Depends on D47002

mUseColCount is used in balancing mode to check whether we have created
the maximum number of columns when the content cannot fit. Similarly,
mUseColCount can also be useful in "column-fill:auto" mode to improve
the fragmentation story in the next patch.

This patch doesn't change the behavior (yet).

Depends on D47003

This patch makes fragmentation in "column-fill:auto" mode possible.

Note that we only bail out of creating more column contents when
"column-fill:auto" mode is set from the styles, i.e. when mForceAuto is
false. That is because when mForceAuto is true, we usually in the case
where we have gave up balancing, and we really want to create overflow
columns.

Note: without !aConfig.mForceAuto check, 673770.html can generated
assertions, and the frame tree contains dangling Overflow-lines and
ExcessOverflowContainersList.

Depends on D47004

Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/9913d2611ead
Part 1 - De-indent an else-block inside the while-loop in nsColumnSetFrame::ReflowChild. r=dbaron
https://hg.mozilla.org/integration/autoland/rev/d410846efdeb
Part 2 - Rename mBalanceColCount to mUsedColCount in nsColumnSetFrame::ReflowConfig. r=dbaron
https://hg.mozilla.org/integration/autoland/rev/1c897f0c159a
Part 3 - Keep the optimal used numColumns in column-fill:auto mode without resetting it to INT32_MAX. r=dbaron
https://hg.mozilla.org/integration/autoland/rev/583786221254
Part 4 - Stop creating more columns in column-fill:auto mode if there's still block-size left in multicol container. r=dbaron
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: