Bug 1465616 - Remove call to AlignFixedAndStickyLayers for RCD-RSF. r=botond
authorKashav Madan <kmadan@mozilla.com>
Wed, 04 Jul 2018 15:52:03 -0400
changeset 427146 3f5ca59998bfd46bfbe401e2df5f8902e151a97e
parent 427145 9e48a27950be4a7a27be47025542a053718fcc3a
child 427147 559c8997eb531eff258a0cfb3c5e9887a06c1447
push id34294
push usershindli@mozilla.com
push dateWed, 18 Jul 2018 21:44:46 +0000
treeherdermozilla-central@7ad45eaf20ca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1465616
milestone63.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 1465616 - Remove call to AlignFixedAndStickyLayers for RCD-RSF. r=botond MozReview-Commit-ID: B8HH6mbjTnv
gfx/layers/composite/AsyncCompositionManager.cpp
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -1063,19 +1063,27 @@ AsyncCompositionManager::ApplyAsyncConte
             // effects apply to fixed and sticky layers. We do this by using
             // GetTransform() as the base transform rather than GetLocalTransform(),
             // which would include those factors.
             LayerToParentLayerMatrix4x4 transformWithoutOverscrollOrOmta =
                 layer->GetTransformTyped()
               * CompleteAsyncTransform(
                   AdjustForClip(asyncTransformWithoutOverscroll, layer));
 
-            AlignFixedAndStickyLayers(layer, layer, metrics.GetScrollId(), oldTransform,
-                                      transformWithoutOverscrollOrOmta, fixedLayerMargins,
-                                      &clipPartsCache);
+            // When applying transformations to the RCD-RSF with zoom-enabled,
+            // avoid re-aligning fixed/sticky layers to make them appear static
+            // relative to the visual viewport.
+            //
+            // This is a partial fix and will require changes to how the async
+            // transform is computed, which will be done in Bug 1465618.
+            if (!metrics.IsRootContent() || !gfxPrefs::APZAllowZooming()) {
+              AlignFixedAndStickyLayers(layer, layer, metrics.GetScrollId(), oldTransform,
+                                        transformWithoutOverscrollOrOmta, fixedLayerMargins,
+                                        &clipPartsCache);
+            }
 
             // Combine the local clip with the ancestor scrollframe clip. This is not
             // included in the async transform above, since the ancestor clip should not
             // move with this APZC.
             if (scrollMetadata.HasScrollClip()) {
               ParentLayerIntRect clip = scrollMetadata.ScrollClip().GetClipRect();
               if (layer->GetParent() && layer->GetParent()->GetTransformIsPerspective()) {
                 // If our parent layer has a perspective transform, we want to apply