mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 1034179 - Use the right resolution when generating a FrameMetrics object for GetOrMaybeCreateDisplayport. r=tn
This commit is contained in:
parent
295ec84ea2
commit
88dfd9001c
@ -2619,7 +2619,13 @@ CalculateFrameMetricsForDisplayPort(nsIFrame* aScrollFrame,
|
||||
nsIPresShell* presShell = presContext->PresShell();
|
||||
CSSToLayoutDeviceScale deviceScale(float(nsPresContext::AppUnitsPerCSSPixel())
|
||||
/ presContext->AppUnitsPerDevPixel());
|
||||
ParentLayerToLayerScale resolution(presShell->GetResolution().width);
|
||||
ParentLayerToLayerScale resolution;
|
||||
if (aScrollFrame == presShell->GetRootScrollFrame()) {
|
||||
// Only the root scrollable frame for a given presShell should pick up
|
||||
// the presShell's resolution. All the other frames are 1.0.
|
||||
resolution = ParentLayerToLayerScale(presShell->GetXResolution(),
|
||||
presShell->GetYResolution());
|
||||
}
|
||||
LayoutDeviceToLayerScale cumulativeResolution(presShell->GetCumulativeResolution().width);
|
||||
|
||||
metrics.mDevPixelsPerCSSPixel = deviceScale;
|
||||
|
Loading…
Reference in New Issue
Block a user