Bug 1022612. Part 28: Make nsLayoutUtils::GetScrollableFrameFor return null for non-scrolled-frames. r=mattwoodrow
☠☠ backed out by 69000c2fca48 ☠ ☠
authorRobert O'Callahan <robert@ocallahan.org>
Wed, 09 Jul 2014 10:12:41 +1200
changeset 215939 c413b946dbc440645ec7308554ae3b3cdeb187c5
parent 215938 f9564f9f46488e95937b27c9dffeea3742f85670
child 215940 5e8625f91b68def08d922831912dd22d60996a91
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1022612
milestone33.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 1022612. Part 28: Make nsLayoutUtils::GetScrollableFrameFor return null for non-scrolled-frames. r=mattwoodrow
layout/base/FrameLayerBuilder.cpp
layout/base/nsLayoutUtils.cpp
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -1603,19 +1603,19 @@ AppUnitsPerDevPixel(nsDisplayItem* aItem
 }
 #endif
 
 /**
  * Restrict the visible region of aLayer to the region that is actually visible.
  * Because we only reduce the visible region here, we don't need to worry
  * about whether CONTENT_OPAQUE is set; if layer was opaque in the old
  * visible region, it will still be opaque in the new one.
- * @param aLayerVisibleRegion the visible region of the layer, in the layer's
- * coordinate space
- * @param aRestrictToRect the rect to restrict the visible region to, in the
+ * @param aLayerVisibleRect if non-null, the visible rect of the layer, in
+ * the layer's coordinate space
+ * @param aOuterVisibleRect the rect to restrict the visible region to, in the
  * parent's coordinate system
  */
 static void
 SetVisibleRegionForLayer(Layer* aLayer, const nsIntRect* aLayerVisibleRect,
                          const nsIntRect& aOuterVisibleRect)
 {
   gfx3DMatrix transform;
   To3DMatrix(aLayer->GetTransform(), transform);
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -1478,17 +1478,17 @@ nsLayoutUtils::FindSiblingViewFor(nsView
 }
 
 //static
 nsIScrollableFrame*
 nsLayoutUtils::GetScrollableFrameFor(const nsIFrame *aScrolledFrame)
 {
   nsIFrame *frame = aScrolledFrame->GetParent();
   nsIScrollableFrame *sf = do_QueryFrame(frame);
-  return sf;
+  return sf && sf->GetScrolledFrame() == aScrolledFrame ? sf : nullptr;
 }
 
 /* static */ void
 nsLayoutUtils::SetFixedPositionLayerData(Layer* aLayer,
                                          const nsIFrame* aViewportFrame,
                                          const nsRect& aAnchorRect,
                                          const nsIFrame* aFixedPosFrame,
                                          nsPresContext* aPresContext,