Bug 775624 Part 20 - Remove NS_FRAME_OVERFLOW_INCOMPLETE. r?dholbert draft
authorTing-Yu Lin <tlin@mozilla.com>
Tue, 14 Feb 2017 17:22:09 +0800
changeset 488483 aa36ac28962b691bd83bc65d117cdbeeb079de4f
parent 488482 40194faa8f0b6dcf772e9fed7bdb181de35ed2b5
child 488484 efe44850d7f1e82f160333c5052283985ce6d337
push id46538
push userbmo:tlin@mozilla.com
push dateThu, 23 Feb 2017 05:39:06 +0000
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.