Bug 1189565 - Only factor in the async zoom change. r=kats

--HG--
extra : commitid : CjuuLbwyk5M
This commit is contained in:
Benoit Girard 2015-09-16 13:42:24 -04:00
Родитель 30a1ad2268
Коммит 2881f47a4c
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -2844,7 +2844,14 @@ Matrix4x4 AsyncPanZoomController::GetTransformToLastDispatchedPaint() const {
* mLastContentPaintMetrics.GetDevPixelsPerCSSPixel()
* mLastContentPaintMetrics.GetCumulativeResolution();
gfxSize zoomChange = mLastContentPaintMetrics.GetZoom() / mLastDispatchedPaintMetrics.GetZoom();
// We're interested in the async zoom change. Factor out the content scale
// that may change when dragging the window to a monitor with a different
// content scale.
LayoutDeviceToParentLayerScale2D lastContentZoom =
mLastContentPaintMetrics.GetZoom() / mLastContentPaintMetrics.GetDevPixelsPerCSSPixel();
LayoutDeviceToParentLayerScale2D lastDispatchedZoom =
mLastDispatchedPaintMetrics.GetZoom() / mLastDispatchedPaintMetrics.GetDevPixelsPerCSSPixel();
gfxSize zoomChange = lastContentZoom / lastDispatchedZoom;
return Matrix4x4::Translation(scrollChange.x, scrollChange.y, 0).
PostScale(zoomChange.width, zoomChange.height, 1);