Bug 912806 - Special-case the resolution behaviour on Fennec to work around other bugs. r=tn

This commit is contained in:
Kartikaya Gupta 2013-09-11 18:17:20 -04:00
parent 13d4e37c9e
commit 7ea9a2c18b

View File

@ -680,6 +680,15 @@ static void RecordFrameMetrics(nsIFrame* aForFrame,
nsPresContext* parentContext = curPresShell->GetPresContext()->GetParentPresContext();
curPresShell = parentContext ? parentContext->GetPresShell() : nullptr;
}
#ifdef MOZ_WIDGET_ANDROID
if (presContext->IsRootContentDocument() && aScrollFrame == presShell->GetRootScrollFrame()) {
// On Android we set the resolution on a different presshell (bug 732971) so we
// need some special handling here to make things work properly. Once bug 732971 is
// fixed we should remove this ifdef block, and adjust any other pieces that need
// adjusting to make this work properly.
metrics.mResolution.scale = metrics.mCumulativeResolution.scale;
}
#endif
metrics.mDevPixelsPerCSSPixel = CSSToLayoutDeviceScale(
(float)nsPresContext::AppUnitsPerCSSPixel() / auPerDevPixel);