Bug 1152049 - Apply all scroll clips when computing plugin clips in content. r=tn
authorMarkus Stange <mstange@themasta.com>
Thu, 24 Dec 2015 12:02:05 +0100
changeset 277567 7116fd86bc65
parent 277566 058b21faea53
child 277568 dd9728713ebb
push id29823
push userryanvm@gmail.com
push dateSat, 26 Dec 2015 01:16:54 +0000
treeherdermozilla-central@691f2e687e46 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1152049
milestone46.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 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,20 @@ 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.
+      // We hide windowed plugins during APZ scrolling, so there never is an
+      // async transform that we need to take into account when clipping.
+      visibleRegion.And(*aVisibleRegion, GetScrollClippedBoundsUpTo(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());