Bug 938312 - Wrong orientation when starting browser in landscape mode. r=kats

This commit is contained in:
Vivien Nicolas 2013-12-05 16:15:39 +01:00
parent 82b47a5cb4
commit 8f4d132bf3

View File

@ -1418,7 +1418,9 @@ void AsyncPanZoomController::UpdateCompositionBounds(const ScreenIntRect& aCompo
if (aCompositionBounds.width && aCompositionBounds.height &&
oldCompositionBounds.width && oldCompositionBounds.height) {
float adjustmentFactor = float(aCompositionBounds.width) / float(oldCompositionBounds.width);
mFrameMetrics.mZoom.scale *= adjustmentFactor;
mFrameMetrics.mZoom.scale =
clamped(mFrameMetrics.mZoom.scale * adjustmentFactor,
mMinZoom.scale, mMaxZoom.scale);
// Repaint on a rotation so that our new resolution gets properly updated.
RequestContentRepaint();