Bug 812687 part 6: Rename & invert polarity of a flexbox frame-state-bit, for consistency with grid. r=mats
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 05 Apr 2017 19:31:47 -0700
changeset 351533 c1034f23ceb83fc5c1e60109cf56187d9ed14641
parent 351532 173a4f49dfe3db98a490a037db937cb06da5170d
child 351534 51504aea09b0792729e49ff82460e41789a520f6
push id31611
push usercbook@mozilla.com
push dateThu, 06 Apr 2017 10:51:05 +0000
treeherdermozilla-central@950612071c4e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs812687
milestone55.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 812687 part 6: Rename & invert polarity of a flexbox frame-state-bit, for consistency with grid. r=mats This patch is just flipping some logic in a way that should produce the same outcome, so it shouldn't affect behavior. MozReview-Commit-ID: LM4HbJD3D9w
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFrameStateBits.h
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -2258,19 +2258,19 @@ nsFlexContainerFrame::BuildDisplayList(n
   DisplayBorderBackgroundOutline(aBuilder, aLists);
 
   // Our children are all block-level, so their borders/backgrounds all go on
   // the BlockBorderBackgrounds list.
   nsDisplayListSet childLists(aLists, aLists.BlockBorderBackgrounds());
 
   typedef CSSOrderAwareFrameIterator::OrderState OrderState;
   OrderState orderState =
-    HasAnyStateBits(NS_STATE_FLEX_CHILDREN_REORDERED)
-    ? OrderState::eKnownUnordered
-    : OrderState::eKnownOrdered;
+    HasAnyStateBits(NS_STATE_FLEX_NORMAL_FLOW_CHILDREN_IN_CSS_ORDER)
+    ? OrderState::eKnownOrdered
+    : OrderState::eKnownUnordered;
 
   CSSOrderAwareFrameIterator iter(this, kPrincipalList,
                                   CSSOrderAwareFrameIterator::eIncludeAll,
                                   orderState,
                                   OrderingPropertyForIter(this));
   for (; !iter.AtEnd(); iter.Next()) {
     nsIFrame* childFrame = *iter;
     BuildDisplayListForChild(aBuilder, childFrame, aDirtyRect, childLists,
@@ -3576,19 +3576,19 @@ nsFlexContainerFrame::GenerateFlexLines(
   uint32_t itemIdxInContainer = 0;
 
   CSSOrderAwareFrameIterator iter(this, kPrincipalList,
                                   CSSOrderAwareFrameIterator::eIncludeAll,
                                   CSSOrderAwareFrameIterator::eUnknownOrder,
                                   OrderingPropertyForIter(this));
 
   if (iter.ItemsAreAlreadyInOrder()) {
-    RemoveStateBits(NS_STATE_FLEX_CHILDREN_REORDERED);
+    AddStateBits(NS_STATE_FLEX_NORMAL_FLOW_CHILDREN_IN_CSS_ORDER);
   } else {
-    AddStateBits(NS_STATE_FLEX_CHILDREN_REORDERED);
+    RemoveStateBits(NS_STATE_FLEX_NORMAL_FLOW_CHILDREN_IN_CSS_ORDER);
   }
 
   for (; !iter.AtEnd(); iter.Next()) {
     nsIFrame* childFrame = *iter;
     // Don't create flex items / lines for placeholder frames:
     if (childFrame->GetType() == nsGkAtoms::placeholderFrame) {
       aPlaceholders.AppendElement(childFrame);
       continue;
--- a/layout/generic/nsFrameStateBits.h
+++ b/layout/generic/nsFrameStateBits.h
@@ -305,19 +305,19 @@ FRAME_STATE_BIT(Box, 31, NS_STATE_IS_DIR
 FRAME_STATE_BIT(Box, 60, NS_FRAME_MOUSE_THROUGH_ALWAYS)
 FRAME_STATE_BIT(Box, 61, NS_FRAME_MOUSE_THROUGH_NEVER)
 
 
 // == Frame state bits that apply to flex container frames ====================
 
 FRAME_STATE_GROUP(FlexContainer, nsFlexContainerFrame)
 
-// Set for a flex container whose children have been reordered due to 'order'.
-// (Means that we have to be more thorough about checking them for sortedness.)
-FRAME_STATE_BIT(FlexContainer, 20, NS_STATE_FLEX_CHILDREN_REORDERED)
+// True iff the normal flow children are already in CSS 'order' in the
+// order they occur in the child frame list.
+FRAME_STATE_BIT(FlexContainer, 20, NS_STATE_FLEX_NORMAL_FLOW_CHILDREN_IN_CSS_ORDER)
 
 // Set for a flex container that is emulating a legacy
 // 'display:-webkit-{inline-}box' container.
 FRAME_STATE_BIT(FlexContainer, 21, NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX)
 
 // True if the container has no flex items; may lie if there is a pending reflow
 FRAME_STATE_BIT(FlexContainer, 22, NS_STATE_FLEX_SYNTHESIZE_BASELINE)