Bug 937896 - Remove unwanted zoom in APZC::NotifyLayersUpdated(). r=kats

This commit is contained in:
Botond Ballo 2013-11-13 14:13:40 -05:00
Родитель 4c1275513c
Коммит 493777b207
1 изменённых файлов: 2 добавлений и 6 удалений

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

@ -1284,13 +1284,9 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
aLayerMetrics.mCompositionBounds.height == mFrameMetrics.mCompositionBounds.height) {
// Remote content has sync'd up to the composition geometry
// change, so we can accept the viewport it's calculated.
CSSToScreenScale previousResolution = mFrameMetrics.CalculateIntrinsicScale();
mFrameMetrics.mViewport = aLayerMetrics.mViewport;
CSSToScreenScale newResolution = mFrameMetrics.CalculateIntrinsicScale();
if (previousResolution != newResolution) {
if (mFrameMetrics.mViewport.width != aLayerMetrics.mViewport)
needContentRepaint = true;
mFrameMetrics.mZoom.scale *= newResolution.scale / previousResolution.scale;
}
mFrameMetrics.mViewport = aLayerMetrics.mViewport;
}
if (aIsFirstPaint || isDefault) {