From 9cc20919e127e88c041f16f04e39e07c52995a6d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 25 Mar 2015 18:34:56 -0700 Subject: [PATCH] Fix some full zoom FrameMetrics changes not propagating to APZ. (bug 1147648, r=botond) --- gfx/layers/FrameMetrics.h | 10 ++++++++++ gfx/layers/apz/src/AsyncPanZoomController.cpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/gfx/layers/FrameMetrics.h b/gfx/layers/FrameMetrics.h index 2cf689faef5..37246c94013 100644 --- a/gfx/layers/FrameMetrics.h +++ b/gfx/layers/FrameMetrics.h @@ -681,6 +681,16 @@ private: // Whether or not the frame can be vertically scrolled with a mouse wheel. bool mAllowVerticalScrollWithWheel; + + // WARNING!!!! + // + // When adding new fields to FrameMetrics, the following places should be + // updated to include them (as needed): + // FrameMetrics::operator == + // AsyncPanZoomController::NotifyLayersUpdated + // The ParamTraits specialization in GfxMessageUtils.h + // + // Please add new fields above this comment. }; /** diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index c1f75869f57..35e4eb69554 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -2855,6 +2855,8 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri mFrameMetrics.SetPresShellResolution(aLayerMetrics.GetPresShellResolution()); mFrameMetrics.SetCumulativeResolution(aLayerMetrics.GetCumulativeResolution()); mFrameMetrics.SetHasScrollgrab(aLayerMetrics.GetHasScrollgrab()); + mFrameMetrics.SetLineScrollAmount(aLayerMetrics.GetLineScrollAmount()); + mFrameMetrics.SetPageScrollAmount(aLayerMetrics.GetPageScrollAmount()); if (scrollOffsetUpdated) { APZC_LOG("%p updating scroll offset from %s to %s\n", this,