RESOLVED FIXED Bug 23170
[Transforms] Hit test issue with large scale() transform
https://bugs.webkit.org/show_bug.cgi?id=23170
Summary [Transforms] Hit test issue with large scale() transform
Simon Fraser (smfr)
Reported 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.
Attachments
Testcase (731 bytes, text/html)
2009-01-07 12:13 PST, Simon Fraser (smfr)
no flags
Patch (10.37 KB, patch)
2012-08-02 05:50 PDT, Allan Sandfeld Jensen
no flags
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
Patch (14.28 KB, patch)
2012-08-03 03:24 PDT, Allan Sandfeld Jensen
no flags
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
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
Patch (17.28 KB, patch)
2012-08-03 07:08 PDT, Allan Sandfeld Jensen
no flags
Archive of layout-test-results from apple-mac-5 (543.78 KB, application/zip)
2012-08-03 12:20 PDT, Build Bot
no flags
Patch (6.85 KB, patch)
2012-08-10 02:16 PDT, Allan Sandfeld Jensen
no flags
Simon Fraser (smfr)
Comment 1 2009-01-07 12:13:19 PST
Simon Fraser (smfr)
Comment 2 2009-01-07 12:13:43 PST
Created attachment 26500 [details] Testcase
Simon Fraser (smfr)
Comment 3 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().
Allan Sandfeld Jensen
Comment 4 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.
Allan Sandfeld Jensen
Comment 5 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.
Allan Sandfeld Jensen
Comment 6 2012-08-02 05:50:57 PDT
WebKit Review Bot
Comment 7 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
WebKit Review Bot
Comment 8 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
Allan Sandfeld Jensen
Comment 9 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.
Allan Sandfeld Jensen
Comment 10 2012-08-03 03:24:50 PDT
Created attachment 156306 [details] Patch Corrected mistake in FractionalLayoutUnit::floor, that resulted in many 1px differences.
WebKit Review Bot
Comment 11 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
WebKit Review Bot
Comment 12 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
WebKit Review Bot
Comment 13 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
WebKit Review Bot
Comment 14 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
Allan Sandfeld Jensen
Comment 15 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
Build Bot
Comment 16 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
Build Bot
Comment 17 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
Allan Sandfeld Jensen
Comment 18 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.
Allan Sandfeld Jensen
Comment 19 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.
Allan Sandfeld Jensen
Comment 20 2012-08-10 02:16:17 PDT
WebKit Review Bot
Comment 21 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>
WebKit Review Bot
Comment 22 2012-08-10 11:43:01 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.