Bug 1152049 - Apply all scroll clips when computing plugin clips in content. r?tn draft
authorMarkus Stange <mstange@themasta.com>
Thu, 10 Dec 2015 14:19:25 -0500
changeset 317194 5f33ec8063c3
parent 317193 77c26ca3d22a
child 512274 3346255b3471
push id8674
push usermstange@themasta.com
push dateWed, 23 Dec 2015 14:24:02 +0000
reviewerstn
bugs1152049
milestone46.0a1
Bug 1152049 - Apply all scroll clips when computing plugin clips in content. r?tn
layout/generic/nsPluginFrame.cpp
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -1014,17 +1014,18 @@ nsDisplayPlugin::ComputeVisibility(nsDis
       nsRect rAncestor = nsLayoutUtils::TransformFrameRectToAncestor(f,
           f->GetContentRectRelativeToSelf(), ReferenceFrame());
       nscoord appUnitsPerDevPixel =
         ReferenceFrame()->PresContext()->AppUnitsPerDevPixel();
       f->mNextConfigurationBounds = LayoutDeviceIntRect::FromUnknownRect(
         rAncestor.ToNearestPixels(appUnitsPerDevPixel));
 
       nsRegion visibleRegion;
-      visibleRegion.And(*aVisibleRegion, GetClippedBounds(aBuilder));
+      // Apply all scroll clips when computing the clipped bounds of this item.
+      visibleRegion.And(*aVisibleRegion, GetClippedBoundsUpTo(aBuilder, nullptr));
       // Make visibleRegion relative to f
       visibleRegion.MoveBy(-ToReferenceFrame());
 
       f->mNextConfigurationClipRegion.Clear();
       nsRegionRectIterator iter(visibleRegion);
       for (const nsRect* r = iter.Next(); r; r = iter.Next()) {
         nsRect rAncestor =
           nsLayoutUtils::TransformFrameRectToAncestor(f, *r, ReferenceFrame());