Commit 139fc914 authored by chrishtr@chromium.org's avatar chrishtr@chromium.org

Correct the squashing origin w.r.t. the transformed ancestor to take into...

Correct the squashing origin w.r.t. the transformed ancestor to take into account rounding to integer
offsets.

Review URL: https://codereview.chromium.org/345613004

git-svn-id: svn://svn.chromium.org/blink/trunk@176457 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 400f8a96
......@@ -50,8 +50,8 @@ CASE 2, hovering over the outer div
(bounds 276.00 276.00)
(drawsContent 1)
(repaint rects
(rect 0.00 0.00 131.00 131.00)
(rect 0.00 0.00 131.00 131.00)
(rect 0.00 0.00 132.00 132.00)
(rect 0.00 0.00 132.00 132.00)
)
)
)
......@@ -83,10 +83,10 @@ CASE 3, hovering over the inner div
(bounds 276.00 276.00)
(drawsContent 1)
(repaint rects
(rect 17.00 20.00 87.00 87.00)
(rect 17.00 20.00 87.00 87.00)
(rect 0.00 0.00 131.00 131.00)
(rect 0.00 0.00 131.00 131.00)
(rect 18.00 21.00 87.00 87.00)
(rect 18.00 21.00 87.00 87.00)
(rect 0.00 0.00 132.00 132.00)
(rect 0.00 0.00 132.00 132.00)
)
)
)
......
......@@ -551,9 +551,6 @@ void CompositedLayerMapping::updateSquashingLayerGeometry(const LayoutPoint& off
totalSquashBounds.unite(squashedBounds);
}
*offsetFromTransformedAncestor = referenceOffsetFromTransformedAncestor;
offsetFromTransformedAncestor->moveBy(totalSquashBounds.location());
// The totalSquashBounds is positioned with respect to referenceLayer of this CompositedLayerMapping.
// But the squashingLayer needs to be positioned with respect to the ancestor CompositedLayerMapping.
// The conversion between referenceLayer and the ancestor CLM is already computed as
......@@ -566,6 +563,9 @@ void CompositedLayerMapping::updateSquashingLayerGeometry(const LayoutPoint& off
squashingLayer->setPosition(squashLayerBounds.location());
squashingLayer->setSize(squashLayerBounds.size());
*offsetFromTransformedAncestor = referenceOffsetFromTransformedAncestor;
offsetFromTransformedAncestor->move(squashLayerOriginInOwningLayerSpace);
// Now that the squashing bounds are known, we can convert the RenderLayer painting offsets
// from CLM owning layer space to the squashing layer space.
//
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment