зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset b643b1b8a326 (bug 1729680) for causing Mochitest failures. CLOSED TREE
This commit is contained in:
Родитель
df1e6b47fa
Коммит
8d028dff49
|
@ -8766,12 +8766,20 @@ ScrollMetadata nsLayoutUtils::ComputeScrollMetadata(
|
||||||
// The cumulative resolution is the resolution at which the scroll frame's
|
// The cumulative resolution is the resolution at which the scroll frame's
|
||||||
// content is actually rendered. It includes the pres shell resolutions of
|
// content is actually rendered. It includes the pres shell resolutions of
|
||||||
// all the pres shells from here up to the root, as well as any css-driven
|
// all the pres shells from here up to the root, as well as any css-driven
|
||||||
// resolution.
|
// resolution. We don't need to compute it as it's already stored in the
|
||||||
LayoutDeviceToLayerScale2D cumulativeResolution(
|
// container parameters... except if we're in WebRender in which case we
|
||||||
|
// don't have a aContainerParameters. In that case we're also not rasterizing
|
||||||
|
// in Gecko anyway, so the only resolution we care about here is the presShell
|
||||||
|
// resolution which we need to propagate to WebRender.
|
||||||
|
metrics.SetCumulativeResolution(LayoutDeviceToLayerScale2D(
|
||||||
|
LayoutDeviceToLayerScale(presShell->GetCumulativeResolution())));
|
||||||
|
|
||||||
|
LayoutDeviceToScreenScale2D resolutionToScreen(
|
||||||
presShell->GetCumulativeResolution() *
|
presShell->GetCumulativeResolution() *
|
||||||
nsLayoutUtils::GetTransformToAncestorScale(aScrollFrame ? aScrollFrame
|
nsLayoutUtils::GetTransformToAncestorScale(aScrollFrame ? aScrollFrame
|
||||||
: aForFrame));
|
: aForFrame));
|
||||||
metrics.SetCumulativeResolution(cumulativeResolution);
|
metrics.SetExtraResolution(metrics.GetCumulativeResolution() /
|
||||||
|
resolutionToScreen);
|
||||||
|
|
||||||
metrics.SetDevPixelsPerCSSPixel(presContext->CSSToDevPixelScale());
|
metrics.SetDevPixelsPerCSSPixel(presContext->CSSToDevPixelScale());
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче