• commit-queue@webkit.org's avatar
    Fix hit testing for divs with a hierarchy of css transformed and non-transformed elements · d0333353
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=124777
    
    Patch by Mihai Maerean <mmaerean@adobe.com> on 2013-12-17
    Reviewed by Darin Adler.
    
    Source/WebCore:
    
    After bug #124647, the hit test will still behave incorrectly for transformed divs with non
    transformed siblings that are all inside a transformed element (tested by the
    hover-rotated-with-children-negative-z.html layout test).
    
    The fix is to not take zOffset into account during hit-testing when child layers are in the
    same 3D rendering context. Only when preserve3d is true, should hit-testing compute the
    zOffset of the layers with transformations and, when two layers overlap, to return the layer
    with the highest zOffset.
    
    The patch includes the work of a.renevier from https://codereview.chromium.org/79943002/
    
    Tests: transforms/3d/hit-testing/hover-rotated-with-children-negative-z.html
           transforms/3d/hit-testing/negative-zoffset-hit-test.html
           transforms/3d/hit-testing/overlapping-layers-hit-test.html
    
    * rendering/RenderLayer.cpp:
    (WebCore::computeZOffset):
    (WebCore::RenderLayer::hitTestLayer):
    
    LayoutTests:
    
    * transforms/3d/hit-testing/hover-rotated-with-children-negative-z.html: Added.
    * transforms/3d/hit-testing/hover-rotated-with-children-negative-z-expected.txt: Added.
    * transforms/3d/hit-testing/negative-zoffset-hit-test.html: Added.
    * transforms/3d/hit-testing/negative-zoffset-hit-test-expected.txt: Added.
    * transforms/3d/hit-testing/overlapping-layers-hit-test.html: Added.
    * transforms/3d/hit-testing/overlapping-layers-hit-test-expected.txt: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    d0333353
Name
Last commit
Last update
..
2d Loading commit data...
3d Loading commit data...
cssmatrix-2d-interface-expected.txt Loading commit data...
cssmatrix-2d-interface.xhtml Loading commit data...
cssmatrix-3d-interface-expected.txt Loading commit data...
cssmatrix-3d-interface.xhtml Loading commit data...
no_transform_hit_testing-expected.txt Loading commit data...
no_transform_hit_testing.html Loading commit data...
svg-vs-css.xhtml Loading commit data...