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:
David Anderson 2015-01-14 14:19:59 -08:00
Родитель a9391d3408
Коммит 448bb8b7ea
1 изменённых файлов: 15 добавлений и 4 удалений

Просмотреть файл

@ -70,10 +70,21 @@ GetTransformToAncestorsParentLayer(Layer* aStart, const LayerMetricsWrapper& aAn
ancestorParent ? iter != ancestorParent : iter.IsValid();
iter = iter.GetParent()) {
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.
const FrameMetrics& metrics = iter.Metrics();
transform.PostScale(metrics.mPresShellResolution, metrics.mPresShellResolution, 1.f);
if (gfxPrefs::LayoutUseContainersForRootFrames()) {
// When scrolling containers, layout adds a post-scale into the transform
// 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;
}