Align HitTestClippedOutByClipPath coordinate space with paint

In the paint code (ClipPathClipper), the reference box used is the one
computed by LocalReferenceBox(), and the coordinate space is adjusted
for that. In the hit-testing code however, the reference box is adjusted
instead, leading to incorrect results when the reference box is
subjected to an additional transform (a 'transform' on a <clipPath>.)

Instead, set up the reference box and coordinate space in the hit-
testing code in the same way as for paint, by translating to the correct
local coordinate space before performing the actual hit-test.

Bug: 876390
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I60acd616964a942893f0e256766aca728d14b494
Reviewed-by: Stephen Chenney <>
Commit-Queue: Fredrik Söderquist <>
Cr-Commit-Position: refs/heads/master@{#586028}
2 files changed