Bug 775624 Part 20 - Remove NS_FRAME_OVERFLOW_INCOMPLETE. r=dholbert
authorTing-Yu Lin <tlin@mozilla.com>
Tue, 14 Feb 2017 17:22:09 +0800
changeset 373411 72b4e2c632372f13f63836378012e97ba15c4504
parent 373410 53e23cf580b78e141a7d6e5c0520ca8c4412619d
child 373412 dfe7b2bfa220301806e971b09afa82a3fd557b1c
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs775624
milestone54.0a1
Bug 775624 Part 20 - Remove NS_FRAME_OVERFLOW_INCOMPLETE. r=dholbert MozReview-Commit-ID: ATzg0IdIjd8
layout/generic/nsColumnSetFrame.cpp
layout/generic/nsContainerFrame.h
layout/generic/nsIFrame.h
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -579,19 +579,22 @@ nsColumnSetFrame::ReflowChildren(ReflowO
     nscoord childContentBEnd = 0;
     if (!reflowNext && (skipIncremental || skipResizeBSizeShrink)) {
       // This child does not need to be reflowed, but we may need to move it
       MoveChildTo(child, childOrigin, wm, containerSize);
 
       // If this is the last frame then make sure we get the right status
       nsIFrame* kidNext = child->GetNextSibling();
       if (kidNext) {
-        aStatus = (kidNext->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)
-                  ? NS_FRAME_OVERFLOW_INCOMPLETE
-                  : NS_FRAME_NOT_COMPLETE;
+        aStatus.Reset();
+        if (kidNext->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER) {
+          aStatus.SetOverflowIncomplete();
+        } else {
+          aStatus.SetIncomplete();
+        }
       } else {
         aStatus = mLastFrameStatus;
       }
       childContentBEnd = nsLayoutUtils::CalculateContentBEnd(wm, child);
 #ifdef DEBUG_roc
       printf("*** Skipping child #%d %p (incremental %d, resize block-size shrink %d): status = %d\n",
              columnCount, (void*)child, skipIncremental, skipResizeBSizeShrink, aStatus);
 #endif
--- a/layout/generic/nsContainerFrame.h
+++ b/layout/generic/nsContainerFrame.h
@@ -323,17 +323,17 @@ public:
    * are created when the frame runs out of computed height, but still has
    * too much content to fit in the availableHeight. The parent creates a
    * continuation as usual, but marks it as NS_FRAME_IS_OVERFLOW_CONTAINER
    * and adds it to its next-in-flow's overflow container list, either by
    * adding it directly or by putting it in its own excess overflow containers
    * list (to be drained by the next-in-flow when it calls
    * ReflowOverflowContainerChildren). The parent continues reflow as if
    * the frame was complete once it ran out of computed height, but returns
-   * either an NS_FRAME_NOT_COMPLETE or NS_FRAME_OVERFLOW_INCOMPLETE reflow
+   * with either the mIncomplete or mOverflowIncomplete bit set in reflow
    * status to request a next-in-flow. The parent's next-in-flow is then
    * responsible for calling ReflowOverflowContainerChildren to (drain and)
    * reflow these overflow continuations. Overflow containers do not affect
    * other frames' size or position during reflow (but do affect their
    * parent's overflow area).
    *
    * Overflow container continuations are different from normal continuations
    * in that
@@ -834,17 +834,17 @@ public:
     }
   private:
     nsOverflowContinuationTracker* mTracker;
     nsIFrame* mChild;
   };
 
   /**
    * This function should be called for each child that isn't reflowed.
-   * It increments our walker and sets the NS_FRAME_OVERFLOW_INCOMPLETE
+   * It increments our walker and sets the mOverflowIncomplete
    * reflow flag if it encounters an overflow continuation so that our
    * next-in-flow doesn't get prematurely deleted. It MUST be called on
    * each unreflowed child that has an overflow container continuation;
    * it MAY be called on other children, but it isn't necessary (doesn't
    * do anything).
    */
   void Skip(nsIFrame* aChild, nsReflowStatus& aReflowStatus)
   {
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -366,17 +366,16 @@ private:
   // Inline break status bit flags.
   bool mInlineBreak : 1;
   bool mInlineBreakAfter : 1;
   bool mFirstLetterComplete : 1;
 };
 
 #define NS_FRAME_COMPLETE             0       // Note: not a bit!
 #define NS_FRAME_NOT_COMPLETE         0x1
-#define NS_FRAME_OVERFLOW_INCOMPLETE  0x4
 
 #define NS_FRAME_SET_TRUNCATION(aStatus, aReflowInput, aMetrics) \
   aStatus.UpdateTruncated(aReflowInput, aMetrics);
 
 //----------------------------------------------------------------------
 
 /**
  * DidReflow status values.