mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix tiling computing the wrong displayport size when using containerless scrolling. (bug 1121108, r=botond)
--HG-- extra : rebase_source : a2c4071e13cd4c7917ee0876e9b1f2b61dd760d7
This commit is contained in:
parent
b771065286
commit
f8b5850175
@ -70,10 +70,21 @@ GetTransformToAncestorsParentLayer(Layer* aStart, const LayerMetricsWrapper& aAn
|
|||||||
ancestorParent ? iter != ancestorParent : iter.IsValid();
|
ancestorParent ? iter != ancestorParent : iter.IsValid();
|
||||||
iter = iter.GetParent()) {
|
iter = iter.GetParent()) {
|
||||||
transform = transform * iter.GetTransform();
|
transform = transform * iter.GetTransform();
|
||||||
// If the layer has a pres shell resolution, the compositor will apply
|
|
||||||
// a scale to scale to this transform. Apply it here too.
|
if (gfxPrefs::LayoutUseContainersForRootFrames()) {
|
||||||
const FrameMetrics& metrics = iter.Metrics();
|
// When scrolling containers, layout adds a post-scale into the transform
|
||||||
transform.PostScale(metrics.mPresShellResolution, metrics.mPresShellResolution, 1.f);
|
// of the displayport-ancestor (which we pick up in GetTransform() above)
|
||||||
|
// to cancel out the pres shell resolution (for historical reasons). The
|
||||||
|
// compositor in turn cancels out this post-scale (i.e., scales by the
|
||||||
|
// pres shell resolution), and to get correct calculations, we need to do
|
||||||
|
// so here, too.
|
||||||
|
//
|
||||||
|
// With containerless scrolling, the offending post-scale is on the
|
||||||
|
// parent layer of the displayport-ancestor, which we don't reach in this
|
||||||
|
// loop, so we don't need to worry about it.
|
||||||
|
const FrameMetrics& metrics = iter.Metrics();
|
||||||
|
transform.PostScale(metrics.mPresShellResolution, metrics.mPresShellResolution, 1.f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return transform;
|
return transform;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user