Backed out changeset 21d141d01c97 (bug 1022612)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 15 Jul 2014 10:30:03 +0200
changeset 214847 16db030a2bff9b6a7c0cb52bbff69b2231b3bfa1
parent 214846 c4de29a139bfd8d59ab03c6bdd1adbb1354f1361
child 214848 066e949e61909fcea0fd1db5920dcfc9eab33582
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1022612
milestone33.0a1
backs out21d141d01c979f777437809580acdcec72dc06d3
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
Backed out changeset 21d141d01c97 (bug 1022612)
layout/base/nsDisplayList.h
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -1355,16 +1355,21 @@ public:
       DisplayItemClip temp = *mClip;
       temp.IntersectWith(aClip);
       SetClip(aBuilder, temp);
     } else {
       SetClip(aBuilder, aClip);
     }
   }
 
+  // If we return false here it means that if this item creates a layer then
+  // ProcessDisplayItems will not set the visible region on the layer. The item
+  // should set the visible region, usually in BuildContainerLayer.
+  virtual bool SetVisibleRegionOnLayer() { return true; }
+
   bool IsInFixedPos() { return mInFixedPos; }
 
 protected:
   friend class nsDisplayList;
 
   nsDisplayItem() { mAbove = nullptr; }
 
   nsIFrame* mFrame;
@@ -2609,16 +2614,22 @@ public:
   {
     NS_ASSERTION(mList.IsEmpty() || !ReferenceFrame() ||
                  !mList.GetBottom()->ReferenceFrame() ||
                  mList.GetBottom()->ReferenceFrame() == ReferenceFrame(),
                  "Children must have same reference frame");
     return &mList;
   }
   virtual nsDisplayList* GetChildren() MOZ_OVERRIDE { return &mList; }
+  /**
+   * All our subclasses BuildLayers call
+   * FrameLayerBuilder::BuildContainerLayerFor, which
+   * sets the visible region of the layer correctly.
+   */
+  virtual bool SetVisibleRegionOnLayer() { return false; }
 
   virtual int32_t ZIndex() const MOZ_OVERRIDE
   {
     return (mOverrideZIndex > 0) ? mOverrideZIndex : nsDisplayItem::ZIndex();
   }
 
   void SetOverrideZIndex(int32_t aZIndex)
   {