diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index 41a8507a32c4..b708f3d9116b 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -1068,9 +1068,17 @@ AsyncCompositionManager::ApplyAsyncContentTransformToTree(Layer *aLayer, * 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