Bug 1022612. Part 28: Make nsLayoutUtils::GetScrollableFrameFor return null for non-scrolled-frames. r=mattwoodrow

--HG--
extra : rebase_source : 8d2165d5cf10c7997925cd17b23a39c593127018
This commit is contained in:
Robert O'Callahan 2014-07-09 10:12:41 +12:00
parent 6b9e0b532c
commit 8d1480e197
2 changed files with 4 additions and 4 deletions

View File

@ -1608,9 +1608,9 @@ AppUnitsPerDevPixel(nsDisplayItem* aItem)
* 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

View File

@ -1481,7 +1481,7 @@ 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