diff --git a/gfx/layers/LayerMetricsWrapper.h b/gfx/layers/LayerMetricsWrapper.h index 68cd5651aff1..f357581829f5 100644 --- a/gfx/layers/LayerMetricsWrapper.h +++ b/gfx/layers/LayerMetricsWrapper.h @@ -335,7 +335,11 @@ public: { MOZ_ASSERT(IsValid()); - return mLayer->GetClipRect(); + if (AtBottomLayer()) { + return mLayer->GetClipRect(); + } + + return nullptr; } bool GetForceDispatchToContentRegion() const { diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index 6e4abbaf167d..47ce8d2f140f 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -227,7 +227,8 @@ ComputeClipRegion(GeckoContentController* aController, clipRegion = nsIntRegion(*aLayer.GetClipRect()); } else { // if there is no clip on this layer (which should only happen for the - // root scrollable layer in a process) fall back to using the comp + // root scrollable layer in a process, or for some of the LayerMetrics + // expansions of a multi-metrics layer), fall back to using the comp // bounds which should be equivalent. clipRegion = nsIntRegion(ParentLayerIntRect::ToUntyped( RoundedToInt(aLayer.Metrics().mCompositionBounds)));