Closed Bug 1575106 Opened 5 years ago Closed 5 years ago

Nested columns can create zero height column-boxes indefinitely if the content's block-size is larger than the column container

Categories

(Core :: Layout: Columns, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files)

The attached test case has nested columns, where both outer and inner columns have only 1 column, and their content has larger block-size than its container.

Loading the test case can create zero column-boxes indefinitely. It happens after bug 1569701, but I think this is an existing bug in nsColumnSet's reflow because we don't handle overflow contents properly in nested columns after enabling column-span. If we are lucky, this may also fix some of the fuzzing-column-span bugs.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

That is when ColumnSet gives its last ::moz-column-content unbounded
available block-size in the very first balancing iteration.

Note that the last column's available block-size isn't
really unbounded yet, but we'll make it happen in the next part.

Every time I read the code, the name blockReflowInput makes me think
the variable is an instance of BlockReflowInput, but it is not.

Depends on D43126

This patch affects only if column-span is enabled. It fixed a lot of
fuzzing test cases which will be added in next part.

It changes the column balancing behavior in the following ways.

  1. By using unconstrained block-size to measure the last column in first
    balancing iteration, we can guarantee that the mKnownInfeasibleBSize is the
    correct feasible block-size.

  2. Always reflow one more time if the content cannot fit the available
    content block-size. Due to 1), the content (last column) always return
    fully complete in the first balancing iteration even if it's in an inner
    column with a constrained available block-size. We need to reflow
    again to get the correct incomplete reflow status so that the outer
    column can create next-in-flows for the inner column.

  3. ColumnSet gives up balancing only when ColumnSetWrapper is running
    out of its block-size. When columns in nested, we prioritize fragmenting
    the inner column container over creating overflow columns within the
    inner column container.

Depends on D43127

1346454-1.html and 1346454-2.html are moved to keep the list sorted.

Depends on D43128

Attachment #9087526 - Attachment description: Bug 1575106 Part 2 - Rename blockReflowInput to reflowInput in nsBlockFrame::ReflowBlockFrame(). → Bug 1575106 Part 2 - Rename blockReflowInput to childReflowInput in nsBlockFrame::ReflowBlockFrame().
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/95b4fc380349 Part 1 - Use a variable to indicate ColumnSet is measuring the feasible block-size. r=dbaron https://hg.mozilla.org/integration/autoland/rev/d72dc8614374 Part 2 - Rename blockReflowInput to childReflowInput in nsBlockFrame::ReflowBlockFrame(). r=dbaron https://hg.mozilla.org/integration/autoland/rev/66042c8f7236 Part 3 - Use unconstrained block-size to measure last column, and revise condition to create overflow columns. r=dbaron https://hg.mozilla.org/integration/autoland/rev/400cbd234621 Part 4 - Add reftests, crashtests, and adjust test expectations. r=dbaron
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Upstream PR merged by moz-wptsync-bot
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: