Bug 1022612. Part 28: Make nsLayoutUtils::GetScrollableFrameFor return null for non-scrolled-frames. r=mattwoodrow
☠☠ backed out by 2bcded4e3b4a ☠ ☠
authorRobert O'Callahan <robert@ocallahan.org>
Wed, 09 Jul 2014 10:12:41 +1200
changeset 216624 f7e2c6a72043ed47ae24f449e5fdd5a8987d9854
parent 216623 959917c9027dcca170cbb1fdfddff49933283a93
child 216625 b23f1081afb8a72b2dce03fb279695294b489864
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
@@ -1476,17 +1476,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,