diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 39484d977dd..dc7666f743f 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -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 diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 8bb035fad98..08c5edc14ff 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -1483,7 +1483,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