Bug 1548118 Part 3 - Always mark inner ColumnSetWrapper's children dirty before reflowing it if the outer ColumnSetWrapper is balancing. r=dbaron
☠☠ backed out by fc6bf8a71924 ☠ ☠
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 06 May 2019 23:09:35 +0000
changeset 531619 516cc2c504f5650083dddd563fa27c6a9cec615a
parent 531618 40a074be8bf08c2f8e3ca3da13ccad5328bac624
child 531620 5268e93ef3483469953bf60e346af77b16687935
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1548118
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1548118 Part 3 - Always mark inner ColumnSetWrapper's children dirty before reflowing it if the outer ColumnSetWrapper is balancing. r=dbaron ColumnSetFrame always tries to reflow column content regardless of it's dirtiness. Making ColumnSetWrapperFrame's children dirty can have the same effect. Differential Revision: https://phabricator.services.mozilla.com/D29435
layout/generic/nsBlockFrame.cpp
layout/reftests/columns/reftest.list
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -3362,16 +3362,25 @@ void nsBlockFrame::ReflowBlockFrame(Bloc
       MOZ_ASSERT(cbReflowInput->mFrame->StyleColumn()->IsColumnContainerStyle(),
                  "Get unexpected reflow input of multicol containing block!");
 
       // Use column-width as the containing block's inline-size, i.e. the column
       // content's computed inline-size.
       cbSize.emplace(LogicalSize(wm, aState.mReflowInput.ComputedISize(),
                                  cbReflowInput->ComputedBSize())
                          .ConvertTo(frame->GetWritingMode(), wm));
+
+      // If a ColumnSetWrapper is in a balancing column content, it may be
+      // pushed or pulled back and forth between column contents. Always add
+      // NS_FRAME_HAS_DIRTY_CHILDREN bit to it so that its ColumnSet children
+      // can have a chance to reflow under current block size constraint.
+      if (aState.mReflowInput.mFlags.mIsColumnBalancing &&
+          frame->IsColumnSetWrapperFrame()) {
+        frame->AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN);
+      }
     }
 
     blockReflowInput.emplace(
         aState.mPresContext, aState.mReflowInput, frame,
         availSpace.Size(wm).ConvertTo(frame->GetWritingMode(), wm), cbSize);
 
     nsFloatManager::SavedState floatManagerState;
     nsReflowStatus frameReflowStatus;
--- a/layout/reftests/columns/reftest.list
+++ b/layout/reftests/columns/reftest.list
@@ -44,10 +44,10 @@ pref(layout.css.column-span.enabled,true
 pref(layout.css.column-span.enabled,true) == first-line-first-letter.html first-line-first-letter-ref.html
 
 # The following lines are duplicates of other lines from further up in this
 # manifest. They're listed again here so we can re-run these tests with
 # column-span enabled. These lines can be removed once the pref becomes
 # default-enabled (Bug 1426010).
 default-preferences pref(layout.css.column-span.enabled,true)
 fails == min-width-2.html min-width-2-ref.html # Bug 1548100
-fails == column-balancing-nested-001.html column-balancing-nested-001-ref.html # Bug 1548118
+== column-balancing-nested-001.html column-balancing-nested-001-ref.html
 default-preferences