Bug 1517069 - Make GetMultiColumnContainingBlockFor() return nsContainerFrame*. r=dholbert
authorTing-Yu Lin <aethanyc@gmail.com>
Wed, 02 Jan 2019 22:27:43 +0000
changeset 509460 7500e3ad817a91f000d3a249fe9bf42841f4f4b6
parent 509459 00466e6699d7e72f3086a6579265cdaf62802fac
child 509461 49241781bf81a4e33cbf519a5a776ddc2eb6ebaa
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1517069
milestone66.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 1517069 - Make GetMultiColumnContainingBlockFor() return nsContainerFrame*. r=dholbert GetParent() already returns nsContainerFrame*, and it's easier to use with API like FinishBuildingColumns() demanding a nsContainerFrame*. Differential Revision: https://phabricator.services.mozilla.com/D15549
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -559,21 +559,21 @@ static nsIFrame* GetIBContainingBlockFor
                "no normal ancestor found for ib-split frame "
                "in GetIBContainingBlockFor");
   NS_ASSERTION(parentFrame != aFrame,
                "parentFrame is actually the child frame - bogus reslt");
 
   return parentFrame;
 }
 
-static nsIFrame* GetMultiColumnContainingBlockFor(nsIFrame* aFrame) {
+static nsContainerFrame* GetMultiColumnContainingBlockFor(nsIFrame* aFrame) {
   MOZ_ASSERT(aFrame->HasAnyStateBits(NS_FRAME_HAS_MULTI_COLUMN_ANCESTOR),
              "Should only be called if the frame has a multi-column ancestor!");
 
-  nsIFrame* current = aFrame->GetParent();
+  nsContainerFrame* current = aFrame->GetParent();
   while (current && !current->IsColumnSetWrapperFrame()) {
     current = current->GetParent();
   }
 
   MOZ_ASSERT(current, "No ColumnSetWrapperFrame in a valid column hierarchy?");
 
   return current;
 }
@@ -8311,17 +8311,18 @@ bool nsCSSFrameConstructor::MaybeRecreat
          !inFlowFrame->GetPrevSibling() && !inFlowFrame->GetNextSibling() &&
          // That ::-moz-column-content is the first column.
          !parent->GetPrevInFlow() &&
          // The ColumnSet grandparent has a previous sibling that is a
          // column-span.
          grandparent->GetPrevSibling());
 
     if (needsReframe) {
-      nsIFrame* containingBlock = GetMultiColumnContainingBlockFor(inFlowFrame);
+      nsContainerFrame* containingBlock =
+          GetMultiColumnContainingBlockFor(inFlowFrame);
 
 #ifdef DEBUG
       if (IsFramePartOfIBSplit(inFlowFrame)) {
         nsIFrame* ibContainingBlock = GetIBContainingBlockFor(inFlowFrame);
         MOZ_ASSERT(containingBlock == ibContainingBlock ||
                        nsLayoutUtils::IsProperAncestorFrame(containingBlock,
                                                             ibContainingBlock),
                    "Multi-column containing block should be equal to or be the "