Use localToContainerPoint when checking mapToContainer result

The mapToContainer method is calculating the value in relation
to the container, but when we verify the result we calculate
the localToAbsolute value. This doesn't take the container
into account so we get the wrong values.

BUG=371640

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175163 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2c871c9e
...@@ -125,7 +125,7 @@ FloatPoint RenderGeometryMap::mapToContainer(const FloatPoint& p, const RenderLa ...@@ -125,7 +125,7 @@ FloatPoint RenderGeometryMap::mapToContainer(const FloatPoint& p, const RenderLa
// therefore not necessarily expected to be correct here. This is ok, // therefore not necessarily expected to be correct here. This is ok,
// because they will be recomputed if the layer becomes visible. // because they will be recomputed if the layer becomes visible.
if (!layer || !layer->subtreeIsInvisible()) { if (!layer || !layer->subtreeIsInvisible()) {
FloatPoint rendererMappedResult = lastRenderer->localToAbsolute(p, m_mapCoordinatesFlags); FloatPoint rendererMappedResult = lastRenderer->localToContainerPoint(p, container, m_mapCoordinatesFlags);
ASSERT(roundedIntPoint(rendererMappedResult) == roundedIntPoint(result)); ASSERT(roundedIntPoint(rendererMappedResult) == roundedIntPoint(result));
} }
......
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