зеркало из https://github.com/mozilla/gecko-dev.git
Bug 968222 - Update zoom scale in APZC upon orientation change. r=botond,kats
From f60ff14c5fdd1f7fef29ea5b2d7b4c8fa5710157 Mon Sep 17 00:00:00 2001 --- gfx/layers/ipc/AsyncPanZoomController.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
This commit is contained in:
Родитель
3d6b8ab2eb
Коммит
5ee0e76945
|
@ -1656,11 +1656,17 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
|
|||
// If we're not taking the aLayerMetrics wholesale we still need to pull
|
||||
// in some things into our local mFrameMetrics because these things are
|
||||
// determined by Gecko and our copy in mFrameMetrics may be stale.
|
||||
|
||||
if (mFrameMetrics.mCompositionBounds.width == aLayerMetrics.mCompositionBounds.width) {
|
||||
float parentResolutionChange = aLayerMetrics.GetParentResolution().scale
|
||||
/ mFrameMetrics.GetParentResolution().scale;
|
||||
mFrameMetrics.mZoom.scale *= parentResolutionChange;
|
||||
} else {
|
||||
// Take the new zoom as composition width got changed (i.e. due to orientation change)
|
||||
mFrameMetrics.mZoom.scale = aLayerMetrics.mZoom.scale;
|
||||
}
|
||||
mFrameMetrics.mScrollableRect = aLayerMetrics.mScrollableRect;
|
||||
mFrameMetrics.mCompositionBounds = aLayerMetrics.mCompositionBounds;
|
||||
float parentResolutionChange = aLayerMetrics.GetParentResolution().scale
|
||||
/ mFrameMetrics.GetParentResolution().scale;
|
||||
mFrameMetrics.mZoom.scale *= parentResolutionChange;
|
||||
mFrameMetrics.mResolution = aLayerMetrics.mResolution;
|
||||
mFrameMetrics.mCumulativeResolution = aLayerMetrics.mCumulativeResolution;
|
||||
mFrameMetrics.mHasScrollgrab = aLayerMetrics.mHasScrollgrab;
|
||||
|
|
Загрузка…
Ссылка в новой задаче