Backout changeset 071d6332729b (bug 770058 part 1) because DLBI is being backed out
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 03 Jul 2012 19:38:00 -0400
changeset 103017 4fb1de24239d0253371594ef4ec0e07e900c5774
parent 103016 a510b1500a8bdb9f9344e38cf5de895ab2569495
child 103018 d62e567738df9c68b0a98701314ef3f24c13900f
push id1316
push userakeybl@mozilla.com
push dateMon, 27 Aug 2012 22:37:00 +0000
treeherdermozilla-beta@db4b09302ee2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs770058
milestone16.0a1
backs out071d6332729b9feb5bb322e730b0707eda2593c6
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
Backout changeset 071d6332729b (bug 770058 part 1) because DLBI is being backed out
layout/generic/nsFrame.cpp
layout/generic/nsIFrame.h
layout/tables/nsTableCellFrame.h
layout/tables/nsTableColFrame.cpp
layout/tables/nsTableColFrame.h
layout/tables/nsTableColGroupFrame.cpp
layout/tables/nsTableColGroupFrame.h
layout/tables/nsTableRowFrame.cpp
layout/tables/nsTableRowFrame.h
layout/tables/nsTableRowGroupFrame.cpp
layout/tables/nsTableRowGroupFrame.h
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4598,34 +4598,35 @@ nsIFrame::GetTransformMatrix(nsIFrame* a
   PRInt32 scaleFactor = PresContext()->AppUnitsPerDevPixel();
   return gfx3DMatrix().Translation
     (NSAppUnitsToFloatPixels(delta.x, scaleFactor),
      NSAppUnitsToFloatPixels(delta.y, scaleFactor),
      0.0f);
 }
 
 void
-nsIFrame::InvalidateFrameSubtree()
-{
-  InvalidateFrame();
+nsIFrame::InvalidateFrameSubtree(PRUint32 aFlags)
+{
+  InvalidateFrame(aFlags);
 
   if (HasAnyStateBits(NS_FRAME_ALL_DESCENDANTS_NEED_PAINT)) {
     return;
   }
 
   AddStateBits(NS_FRAME_ALL_DESCENDANTS_NEED_PAINT);
   
   nsAutoTArray<nsIFrame::ChildList,4> childListArray;
   GetCrossDocChildLists(&childListArray);
 
   nsIFrame::ChildListArrayIterator lists(childListArray);
   for (; !lists.IsDone(); lists.Next()) {
     nsFrameList::Enumerator childFrames(lists.CurrentList());
     for (; !childFrames.AtEnd(); childFrames.Next()) {
-      childFrames.get()->InvalidateFrameSubtree();
+      childFrames.get()->
+        InvalidateFrameSubtree(aFlags | INVALIDATE_DONT_SCHEDULE_PAINT);
     }
   }
 }
 
 void
 nsIFrame::ClearInvalidationStateBits()
 {
   if (HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT)) {
@@ -4642,25 +4643,25 @@ nsIFrame::ClearInvalidationStateBits()
   }
 
   RemoveStateBits(NS_FRAME_NEEDS_PAINT | 
                   NS_FRAME_DESCENDANT_NEEDS_PAINT | 
                   NS_FRAME_ALL_DESCENDANTS_NEED_PAINT);
 }
 
 void
-nsIFrame::InvalidateFrame()
+nsIFrame::InvalidateFrame(PRUint32 aFlags)
 {
   AddStateBits(NS_FRAME_NEEDS_PAINT);
   nsIFrame *parent = nsLayoutUtils::GetCrossDocParentFrame(this);
   while (parent && !parent->HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT)) {
     parent->AddStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT);
     parent = nsLayoutUtils::GetCrossDocParentFrame(parent);
   }
-  if (!parent) {
+  if (!(aFlags & INVALIDATE_DONT_SCHEDULE_PAINT)) {
     SchedulePaint();
   }
 }
   
 bool 
 nsIFrame::IsInvalid() 
 {
   return HasAnyStateBits(NS_FRAME_NEEDS_PAINT);
@@ -7804,17 +7805,17 @@ nsFrame::SetParent(nsIFrame* aParent)
   } else {
     RemoveInPopupStateBitFromDescendants(this);
   }
   
   // If our new parent only has invalid children, then we just invalidate
   // ourselves too. This is probably faster than clearing the flag all
   // the way up the frame tree.
   if (aParent->HasAnyStateBits(NS_FRAME_ALL_DESCENDANTS_NEED_PAINT)) {
-    InvalidateFrame();
+    InvalidateFrame(INVALIDATE_DONT_SCHEDULE_PAINT);
   }
 }
 
 void
 nsFrame::InitBoxMetrics(bool aClear)
 {
   FrameProperties props = Properties();
   if (aClear) {
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -2121,31 +2121,36 @@ public:
    * nsChangeHint_UpdateOpacityLayer. We return true only if
    * a change in the transform or opacity has been recorded while layers have
    * been marked active for this frame.
    */
   bool AreLayersMarkedActive(nsChangeHint aChangeHint);
 
   /**
    * Marks all display items created by this frame as needing a repaint,
-   * and calls SchedulePaint() if requested and one is not already pending.
+   * and calls SchedulePaint() if requested.
    *
    * This includes all display items created by this frame, including
    * container types.
+   * @param aFlags INVALIDATE_DONT_SCHEDULE_PAINT: Don't call SchedulePaint()
+   * when invalidating.
    */
-  virtual void InvalidateFrame();
+  enum {
+    INVALIDATE_DONT_SCHEDULE_PAINT
+  };
+  virtual void InvalidateFrame(PRUint32 aFlags = 0);
   
   /**
    * Calls InvalidateFrame() on all frames descendant frames (including
    * this one).
    * 
    * This function doesn't walk through placeholder frames to invalidate
    * the out-of-flow frames.
    */
-  void InvalidateFrameSubtree();
+  void InvalidateFrameSubtree(PRUint32 aFlags = 0);
   
   /**
    * Checks if a frame has had InvalidateFrame() called on it since the
    * last paint.
    */
   bool IsInvalid();
  
   /**
--- a/layout/tables/nsTableCellFrame.h
+++ b/layout/tables/nsTableCellFrame.h
@@ -205,21 +205,21 @@ public:
                                nsPoint              aPt,
                                PRUint32             aFlags);
 
   void DecorateForSelection(nsRenderingContext& aRenderingContext,
                             nsPoint              aPt);
 
   virtual bool UpdateOverflow();
   
-  virtual void InvalidateFrame()
+  virtual void InvalidateFrame(PRUint32 aFlags = 0)
   {
-    nsIFrame::InvalidateFrame();
+    nsIFrame::InvalidateFrame(aFlags);
     nsTableFrame *tableFrame = nsTableFrame::GetTableFrame(this);
-    tableFrame->InvalidateFrame();
+    tableFrame->InvalidateFrame(aFlags | INVALIDATE_DONT_SCHEDULE_PAINT);
   }
 
 protected:
   /** implement abstract method on nsContainerFrame */
   virtual PRIntn GetSkipSides() const;
 
   /**
    * GetBorderOverflow says how far the cell's own borders extend
--- a/layout/tables/nsTableColFrame.cpp
+++ b/layout/tables/nsTableColFrame.cpp
@@ -184,15 +184,15 @@ nsTableColFrame::GetFrameName(nsAString&
 
 nsSplittableType
 nsTableColFrame::GetSplittableType() const
 {
   return NS_FRAME_NOT_SPLITTABLE;
 }
 
 void
-nsTableColFrame::InvalidateFrame()
+nsTableColFrame::InvalidateFrame(PRUint32 aFlags)
 {
-  nsIFrame::InvalidateFrame();
+  nsIFrame::InvalidateFrame(aFlags);
   nsTableFrame *tableFrame = nsTableFrame::GetTableFrame(this);
-  tableFrame->InvalidateFrame();
+  tableFrame->InvalidateFrame(aFlags | INVALIDATE_DONT_SCHEDULE_PAINT);
 }
 
--- a/layout/tables/nsTableColFrame.h
+++ b/layout/tables/nsTableColFrame.h
@@ -258,17 +258,17 @@ public:
   }
   void SetFinalWidth(nscoord aFinalWidth) {
     mFinalWidth = aFinalWidth;
   }
   nscoord GetFinalWidth() {
     return mFinalWidth;
   }
   
-  virtual void InvalidateFrame();
+  virtual void InvalidateFrame(PRUint32 aFlags = 0);
 
 protected:
 
   nsTableColFrame(nsStyleContext* aContext);
   ~nsTableColFrame();
 
   nscoord mMinCoord;
   nscoord mPrefCoord;
--- a/layout/tables/nsTableColGroupFrame.cpp
+++ b/layout/tables/nsTableColGroupFrame.cpp
@@ -458,21 +458,21 @@ NS_IMPL_FRAMEARENA_HELPERS(nsTableColGro
 
 nsIAtom*
 nsTableColGroupFrame::GetType() const
 {
   return nsGkAtoms::tableColGroupFrame;
 }
   
 void 
-nsTableColGroupFrame::InvalidateFrame()
+nsTableColGroupFrame::InvalidateFrame(PRUint32 aFlags)
 {
-  nsIFrame::InvalidateFrame();
+  nsIFrame::InvalidateFrame(aFlags);
   nsTableFrame *tableFrame = nsTableFrame::GetTableFrame(this);
-  tableFrame->InvalidateFrame();
+  tableFrame->InvalidateFrame(aFlags | INVALIDATE_DONT_SCHEDULE_PAINT);
 }
 
 #ifdef DEBUG
 NS_IMETHODIMP
 nsTableColGroupFrame::GetFrameName(nsAString& aResult) const
 {
   return MakeFrameName(NS_LITERAL_STRING("TableColGroup"), aResult);
 }
--- a/layout/tables/nsTableColGroupFrame.h
+++ b/layout/tables/nsTableColGroupFrame.h
@@ -191,17 +191,17 @@ public:
   void GetContinuousBCBorderWidth(nsMargin& aBorder);
   /**
    * Set full border widths before collapsing with cell borders
    * @param aForSide - side to set; only accepts top and bottom
    */
   void SetContinuousBCBorderWidth(PRUint8     aForSide,
                                   BCPixelSize aPixelValue);
   
-  virtual void InvalidateFrame();
+  virtual void InvalidateFrame(PRUint32 aFlags = 0);
 
 protected:
   nsTableColGroupFrame(nsStyleContext* aContext);
 
   void InsertColsReflow(PRInt32                   aColIndex,
                         const nsFrameList::Slice& aCols);
 
   /** implement abstract method on nsContainerFrame */
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -1345,21 +1345,21 @@ void nsTableRowFrame::InitHasCellWithSty
       AddStateBits(NS_ROW_HAS_CELL_WITH_STYLE_HEIGHT);
       return;
     }
   }
   RemoveStateBits(NS_ROW_HAS_CELL_WITH_STYLE_HEIGHT);
 }
   
 void 
-nsTableRowFrame::InvalidateFrame()
+nsTableRowFrame::InvalidateFrame(PRUint32 aFlags)
 {
-  nsIFrame::InvalidateFrame();
+  nsIFrame::InvalidateFrame(aFlags);
   nsTableFrame *tableFrame = nsTableFrame::GetTableFrame(this);
-  tableFrame->InvalidateFrame();
+  tableFrame->InvalidateFrame(aFlags | INVALIDATE_DONT_SCHEDULE_PAINT);
 }
 
 /* ----- global methods ----- */
 
 nsIFrame* 
 NS_NewTableRowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) nsTableRowFrame(aContext);
--- a/layout/tables/nsTableRowFrame.h
+++ b/layout/tables/nsTableRowFrame.h
@@ -218,17 +218,17 @@ public:
   nscoord GetOuterTopContBCBorderWidth();
   /**
    * Sets full border widths before collapsing with cell borders
    * @param aForSide - side to set; only accepts right, left, and top
    */
   void SetContinuousBCBorderWidth(PRUint8     aForSide,
                                   BCPixelSize aPixelValue);
 
-  virtual void InvalidateFrame();
+  virtual void InvalidateFrame(PRUint32 aFlags = 0);
 
 #ifdef ACCESSIBILITY
   virtual already_AddRefed<Accessible> CreateAccessible();
 #endif
 
 protected:
 
   /** protected constructor.
--- a/layout/tables/nsTableRowGroupFrame.cpp
+++ b/layout/tables/nsTableRowGroupFrame.cpp
@@ -1836,14 +1836,14 @@ nsTableRowGroupFrame::FrameCursorData::A
   nscoord overflowAbove = -overflowRect.y;
   nscoord overflowBelow = overflowRect.YMost() - aFrame->GetSize().height;
   mOverflowAbove = NS_MAX(mOverflowAbove, overflowAbove);
   mOverflowBelow = NS_MAX(mOverflowBelow, overflowBelow);
   return mFrames.AppendElement(aFrame) != nsnull;
 }
   
 void 
-nsTableRowGroupFrame::InvalidateFrame()
+nsTableRowGroupFrame::InvalidateFrame(PRUint32 aFlags)
 {
-  nsIFrame::InvalidateFrame();
+  nsIFrame::InvalidateFrame(aFlags);
   nsTableFrame *tableFrame = nsTableFrame::GetTableFrame(this);
-  tableFrame->InvalidateFrame();
+  tableFrame->InvalidateFrame(aFlags | INVALIDATE_DONT_SCHEDULE_PAINT);
 }
--- a/layout/tables/nsTableRowGroupFrame.h
+++ b/layout/tables/nsTableRowGroupFrame.h
@@ -319,17 +319,17 @@ public:
    * form non-decreasing sequences (should always be true for table rows);
    * if this is violated, call ClearRowCursor(). If we return nsnull, then we
    * decided not to use a cursor or we already have one set up.
    */
   FrameCursorData* SetupRowCursor();
 
   virtual nsILineIterator* GetLineIterator() { return this; }
   
-  virtual void InvalidateFrame();
+  virtual void InvalidateFrame(PRUint32 aFlags = 0);
 
 protected:
   nsTableRowGroupFrame(nsStyleContext* aContext);
 
   void InitChildReflowState(nsPresContext&     aPresContext, 
                             bool               aBorderCollapse,
                             nsHTMLReflowState& aReflowState);