Bug 1267438 - Do not propagate the scroll clip to APZC's copy of ScrollMetadata. r=kats
MozReview-Commit-ID: 9E1QGnoxUjN
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -3506,17 +3506,20 @@ void AsyncPanZoomController::NotifyLayer
mFrameMetrics.SetCompositionBounds(aLayerMetrics.GetCompositionBounds());
mFrameMetrics.SetRootCompositionSize(aLayerMetrics.GetRootCompositionSize());
mFrameMetrics.SetPresShellResolution(aLayerMetrics.GetPresShellResolution());
mFrameMetrics.SetCumulativeResolution(aLayerMetrics.GetCumulativeResolution());
mScrollMetadata.SetHasScrollgrab(aScrollMetadata.GetHasScrollgrab());
mScrollMetadata.SetLineScrollAmount(aScrollMetadata.GetLineScrollAmount());
mScrollMetadata.SetPageScrollAmount(aScrollMetadata.GetPageScrollAmount());
mScrollMetadata.SetSnapInfo(ScrollSnapInfo(aScrollMetadata.GetSnapInfo()));
- mScrollMetadata.SetScrollClip(aScrollMetadata.GetScrollClip());
+ // The scroll clip can differ between layers associated a given scroll frame,
+ // so APZC (which keeps a single copy of ScrollMetadata per scroll frame)
+ // has no business using it.
+ mScrollMetadata.SetScrollClip(Nothing());
mScrollMetadata.SetIsLayersIdRoot(aScrollMetadata.IsLayersIdRoot());
mScrollMetadata.SetUsesContainerScrolling(aScrollMetadata.UsesContainerScrolling());
mFrameMetrics.SetIsScrollInfoLayer(aLayerMetrics.IsScrollInfoLayer());
mScrollMetadata.SetForceDisableApz(aScrollMetadata.IsApzForceDisabled());
if (scrollOffsetUpdated) {
APZC_LOG("%p updating scroll offset from %s to %s\n", this,
ToString(mFrameMetrics.GetScrollOffset()).c_str(),