Bug 866265 - Fix setting the resolution on hi-dpi B2G devices (followup to bug 883646). r=kentuckyfriedtakahe

This commit is contained in:
Kartikaya Gupta 2013-07-03 09:03:28 -04:00
parent 0f4cee0b63
commit 32ed87d2b3

View File

@ -1529,7 +1529,10 @@ TabChild::ProcessUpdateFrame(const FrameMetrics& aFrameMetrics)
utils->SetScrollPositionClampingScrollPortSize(
cssCompositedRect.width, cssCompositedRect.height);
ScrollWindowTo(window, aFrameMetrics.mScrollOffset);
CSSToScreenScale resolution = aFrameMetrics.CalculateResolution();
LayoutDeviceToLayerScale resolution =
aFrameMetrics.CalculateResolution()
/ aFrameMetrics.mDevPixelsPerCSSPixel
* ScreenToLayerScale(1);
utils->SetResolution(resolution.scale, resolution.scale);
nsCOMPtr<nsIDOMDocument> domDoc;