Bug 1511536 - Restore the comment in nsCSSFrameConstructor::ConstructBlock(), and disable clang-format. r=sylvestre
authorTing-Yu Lin <tlin@mozilla.com>
Sat, 01 Dec 2018 13:48:45 +0000
changeset 505525 2f15c3366bf0c1993c63c46e3e3efc4a2c9a4842
parent 505519 b12e6afd5831cc692e666d4295cbb260613fd8ad
child 505526 ac75e40dd2ab684d8bbf074ec677db2d77c93055
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssylvestre
bugs1511536
milestone65.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 1511536 - Restore the comment in nsCSSFrameConstructor::ConstructBlock(), and disable clang-format. r=sylvestre The example frame tree didn't survive the global clang-format change. DONTBUILD because this is a comment-only change. Differential Revision: https://phabricator.services.mozilla.com/D13602
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -10398,16 +10398,18 @@ nsContainerFrame* nsCSSFrameConstructor:
 }
 
 void nsCSSFrameConstructor::ConstructBlock(
     nsFrameConstructorState& aState, nsIContent* aContent,
     nsContainerFrame* aParentFrame, nsContainerFrame* aContentParentFrame,
     ComputedStyle* aComputedStyle, nsContainerFrame** aNewFrame,
     nsFrameItems& aFrameItems, nsIFrame* aPositionedFrameForAbsPosContainer,
     PendingBinding* aPendingBinding) {
+  // clang-format off
+  //
   // If a block frame is in a multi-column subtree, its children may need to
   // be chopped into runs of blocks containing column-spans and runs of
   // blocks containing no column-spans. Each run containing column-spans
   // will be wrapped by an anonymous block. See CreateColumnSpanSiblings() for
   // the implementation.
   //
   // If a block frame is a multi-column container, its children will need to
   // be processed as above. Moreover, it creates a ColumnSetWrapperFrame as
@@ -10441,32 +10443,43 @@ void nsCSSFrameConstructor::ConstructBlo
   //      e
   //    </div>
   //  </div>
   //  <div style="column-span: all">f</div>
   //
   //  yields the following frame tree.
   //
   // A) ColumnSetWrapper (original style)
-  // B)   ColumnSet (-moz-column-set)   <-- always created by
-  // BeginBuildingColumns C)     Block (-moz-column-content) D)   Block
-  // (-moz-column-span-wrapper, created by x) E)     Block (div) F)       Text
-  // ("a") G)   ColumnSet (-moz-column-set) H)     Block (-moz-column-content,
-  // created by x) I)       Block (div, y) J)         Text ("b") K)   Block
-  // (-moz-column-span-wrapper, created by x) L)     Block
-  // (-moz-column-span-wrapper, created by y) M)       Block (div, new BFC) N)
-  // Text ("c") O)       Block (div, new BFC) P)         Text ("d") Q) ColumnSet
-  // (-moz-column-set) R)     Block (-moz-column-content, created by x) S) Block
-  // (div, y) T)         Text ("e") U) Block (div, new BFC)   <-- not in
-  // multi-column hierarchy V)   Text ("f")
+  // B)   ColumnSet (-moz-column-set)   <-- always created by BeginBuildingColumns
+  // C)     Block (-moz-column-content)
+  // D)   Block (-moz-column-span-wrapper, created by x)
+  // E)     Block (div)
+  // F)       Text ("a")
+  // G)   ColumnSet (-moz-column-set)
+  // H)     Block (-moz-column-content, created by x)
+  // I)       Block (div, y)
+  // J)         Text ("b")
+  // K)   Block (-moz-column-span-wrapper, created by x)
+  // L)     Block (-moz-column-span-wrapper, created by y)
+  // M)       Block (div, new BFC)
+  // N)         Text ("c")
+  // O)       Block (div, new BFC)
+  // P)         Text ("d")
+  // Q)   ColumnSet (-moz-column-set)
+  // R)     Block (-moz-column-content, created by x)
+  // S)       Block (div, y)
+  // T)         Text ("e")
+  // U) Block (div, new BFC)   <-- not in multi-column hierarchy
+  // V)   Text ("f")
   //
   // ColumnSet linkage described in 3): B -> G -> Q
   //
   // Block linkage described in 4): C -> H -> R  and  I -> S
   //
+  // clang-format on
 
   nsBlockFrame* blockFrame = do_QueryFrame(*aNewFrame);
   MOZ_ASSERT(blockFrame->IsBlockFrame() || blockFrame->IsDetailsFrame(),
              "not a block frame nor a details frame?");
 
   // Create column hierarchy if necessary.
   const bool needsColumn =
       aComputedStyle->StyleColumn()->IsColumnContainerStyle();