Bug 23170 - [Transforms] Hit test issue with large scale() transform
Summary: [Transforms] Hit test issue with large scale() transform
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Allan Sandfeld Jensen
URL:
Keywords: InRadar
Depends on: 60318 93475
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-07 12:12 PST by Simon Fraser (smfr)
Modified: 2012-08-10 11:43 PDT (History)
11 users (show)

See Also:


Attachments
Testcase (731 bytes, text/html)
2009-01-07 12:13 PST, Simon Fraser (smfr)
no flags Details
Patch (10.37 KB, patch)
2012-08-02 05:50 PDT, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from gce-cr-linux-03 (1.60 MB, application/zip)
2012-08-02 08:54 PDT, WebKit Review Bot
no flags Details
Patch (14.28 KB, patch)
2012-08-03 03:24 PDT, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from gce-cr-linux-06 (406.95 KB, application/zip)
2012-08-03 05:44 PDT, WebKit Review Bot
no flags Details
Archive of layout-test-results from gce-cr-linux-03 (497.20 KB, application/zip)
2012-08-03 06:50 PDT, WebKit Review Bot
no flags Details
Patch (17.28 KB, patch)
2012-08-03 07:08 PDT, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from apple-mac-5 (543.78 KB, application/zip)
2012-08-03 12:20 PDT, Build Bot
no flags Details
Patch (6.85 KB, patch)
2012-08-10 02:16 PDT, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2009-01-07 12:12:56 PST
The attached testcase shows a hit testing issue when an element has a large scale() transform. This is probably a rounding issue.
Comment 1 Simon Fraser (smfr) 2009-01-07 12:13:19 PST
<rdar://problem/6478048>
Comment 2 Simon Fraser (smfr) 2009-01-07 12:13:43 PST
Created attachment 26500 [details]
Testcase
Comment 3 Simon Fraser (smfr) 2009-01-07 12:49:17 PST
To fix this we need to use FloatPoints for hit testing in RenderLayer, and down through RenderObject::hitTest() and RenderObject::nodeAtPoint().
Comment 4 Allan Sandfeld Jensen 2012-08-02 01:51:12 PDT
(In reply to comment #3)
> To fix this we need to use FloatPoints for hit testing in RenderLayer, and down through RenderObject::hitTest() and RenderObject::nodeAtPoint().

Since I added support for transforms to rect-based hit-testing we actually have a floatpoint copy of the point, which is used whenever new transforms are applied.
Comment 5 Allan Sandfeld Jensen 2012-08-02 05:43:27 PDT
Actually this bug does and did not depend on subpixel layout at all. This is all caused by bad rounding. Once the bad rounding is scaled up x60, the last 30px in width and height becomes unhittable.
Comment 6 Allan Sandfeld Jensen 2012-08-02 05:50:57 PDT
Created attachment 156054 [details]
Patch
Comment 7 WebKit Review Bot 2012-08-02 08:54:38 PDT
Comment on attachment 156054 [details]
Patch

Attachment 156054 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13430027

New failing tests:
css1/box_properties/margin_right.html
css2.1/t0803-c5502-mrgn-r-01-c-a.html
css2.1/20110323/absolute-non-replaced-width-007.htm
css1/box_properties/float_elements_in_series.html
css2.1/t0804-c5507-padn-r-01-c-a.html
css1/box_properties/clear_float.html
compositing/reflections/deeply-nested-reflections.html
compositing/reflections/nested-reflection.html
compositing/reflections/nested-reflection-anchor-point.html
css2.1/t0804-c5507-padn-r-00-c-ag.html
compositing/reflections/nested-reflection-transformed2.html
compositing/rtl/rtl-fixed.html
css2.1/20110323/absolute-non-replaced-width-009.htm
compositing/reflections/reflection-ordering.html
css2.1/20110323/absolute-non-replaced-width-012.htm
compositing/reflections/nested-reflection-size-change.html
css2.1/20110323/absolute-non-replaced-width-021.htm
compositing/shadows/shadow-drawing.html
compositing/reflections/nested-reflection-mask-change.html
css2.1/20110323/absolute-non-replaced-width-005.htm
compositing/reflections/nested-reflection-transformed.html
compositing/rtl/rtl-absolute.html
css1/box_properties/float_on_text_elements.html
css1/text_properties/text_align.html
css2.1/20110323/absolute-non-replaced-width-002.htm
compositing/reflections/nested-reflection-opacity.html
css2.1/t0803-c5502-mrgn-r-00-c-ag.html
compositing/reflections/nested-reflection-animated.html
Comment 8 WebKit Review Bot 2012-08-02 08:54:46 PDT
Created attachment 156100 [details]
Archive of layout-test-results from gce-cr-linux-03

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-03  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Comment 9 Allan Sandfeld Jensen 2012-08-02 10:35:24 PDT
Comment on attachment 156054 [details]
Patch

Needs move investigation, and I will probably leave some of the bugs unfixed to minimize the number of affected test-cases.
Comment 10 Allan Sandfeld Jensen 2012-08-03 03:24:50 PDT
Created attachment 156306 [details]
Patch

Corrected mistake in FractionalLayoutUnit::floor, that resulted in many 1px differences.
Comment 11 WebKit Review Bot 2012-08-03 05:44:02 PDT
Comment on attachment 156306 [details]
Patch

Attachment 156306 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13431312

New failing tests:
fast/block/float/overhanging-tall-block.html
transforms/3d/hit-testing/perspective-clipped.html
fast/html/details-writing-mode.html
Comment 12 WebKit Review Bot 2012-08-03 05:44:07 PDT
Created attachment 156337 [details]
Archive of layout-test-results from gce-cr-linux-06

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-06  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Comment 13 WebKit Review Bot 2012-08-03 06:49:58 PDT
Comment on attachment 156306 [details]
Patch

Attachment 156306 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13431336

New failing tests:
fast/block/float/overhanging-tall-block.html
transforms/3d/hit-testing/perspective-clipped.html
fast/html/details-writing-mode.html
Comment 14 WebKit Review Bot 2012-08-03 06:50:03 PDT
Created attachment 156357 [details]
Archive of layout-test-results from gce-cr-linux-03

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-03  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Comment 15 Allan Sandfeld Jensen 2012-08-03 07:08:23 PDT
Created attachment 156362 [details]
Patch

Skip two bening changes in Chromium, and modified one test that was incorrect under higher accuracy
Comment 16 Build Bot 2012-08-03 12:20:06 PDT
Comment on attachment 156362 [details]
Patch

Attachment 156362 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13423895

New failing tests:
fast/block/float/overhanging-tall-block.html
Comment 17 Build Bot 2012-08-03 12:20:10 PDT
Created attachment 156430 [details]
Archive of layout-test-results from apple-mac-5

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: apple-mac-5  Port: <class 'webkitpy.common.config.ports.MacPort'>  Platform: Mac OS X 10.7.4
Comment 18 Allan Sandfeld Jensen 2012-08-06 03:01:02 PDT
(In reply to comment #16)
> (From update of attachment 156362 [details])
> Attachment 156362 [details] did not pass mac-ews (mac):
> Output: http://queues.webkit.org/results/13423895
> 
> New failing tests:
> fast/block/float/overhanging-tall-block.html

I will update the mac baseline before landing, but will leave the current patch for review. The logic behind it is unchanged.
Comment 19 Allan Sandfeld Jensen 2012-08-08 07:13:31 PDT
I have split the part of the patch out that corrects floored rounding into bug #93475 and uploaded a patch there. 

The patch here will need to be rebased once that lands. The only remaining part of the patch will be the changes in HitTestResult.cpp.
Comment 20 Allan Sandfeld Jensen 2012-08-10 02:16:17 PDT
Created attachment 157684 [details]
Patch
Comment 21 WebKit Review Bot 2012-08-10 11:42:54 PDT
Comment on attachment 157684 [details]
Patch

Clearing flags on attachment: 157684

Committed r125306: <http://trac.webkit.org/changeset/125306>
Comment 22 WebKit Review Bot 2012-08-10 11:43:01 PDT
All reviewed patches have been landed.  Closing bug.