Fix hover area for divs with css transforms
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Nov 2013 15:17:08 +0000 (15:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Nov 2013 15:17:08 +0000 (15:17 +0000)
commitcea59be807418a4e4ca56eb7091553e7346f5703
treed453d5c16dd4b10196e2557de544b5c69667da71
parentbb23fc432beccf63b37c5f27c5928e8bd482a1c0
Fix hover area for divs with css transforms
https://bugs.webkit.org/show_bug.cgi?id=124647

Patch by Mihai Maerean <mmaerean@adobe.com> on 2013-11-21
Reviewed by Allan Sandfeld Jensen.

Source/WebCore:

Non transformed layers are now being hit last, not through or in-between transformed layers.
The paint order says that the divs creating stacking contexts (including transforms) are painted after the
other siblings so they should be hit tested in the reverse order. Also, a rotated div in a non-rotated parent
should be hit in its entire area, not hit its parent's background, even if the z-coordinate is negative where
the mouse is located.

Test: transforms/3d/hit-testing/hover-rotated-negative-z.html

* rendering/RenderLayer.cpp:
(WebCore::computeZOffset):

LayoutTests:

* transforms/3d/hit-testing/hover-rotated-negative-z.html: Added.
* transforms/3d/hit-testing/hover-rotated-negative-z-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/transforms/3d/hit-testing/hover-rotated-negative-z-expected.txt [new file with mode: 0644]
LayoutTests/transforms/3d/hit-testing/hover-rotated-negative-z.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp