Bug 124647 - Fix hover area for divs with css transforms
Summary: Fix hover area for divs with css transforms
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mihai Maerean
URL:
Keywords: AdobeTracked
Depends on:
Blocks:
 
Reported: 2013-11-20 01:49 PST by Mihai Maerean
Modified: 2013-11-22 09:07 PST (History)
8 users (show)

See Also:


Attachments
layout test (1.45 KB, text/html)
2013-11-20 01:58 PST, Mihai Maerean
no flags Details
patch (4.30 KB, patch)
2013-11-21 01:46 PST, Mihai Maerean
no flags Details | Formatted Diff | Diff
patch. incorporates the feedback. (5.07 KB, patch)
2013-11-21 02:22 PST, Mihai Maerean
no flags Details | Formatted Diff | Diff
layout test that fails even with the fix. (1.90 KB, text/html)
2013-11-22 09:02 PST, Mihai Maerean
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Maerean 2013-11-20 01:49:24 PST
The hover area on witch the :hover state is activated is only a portion of the div when the div has css transforms.
Comment 1 Mihai Maerean 2013-11-20 01:58:26 PST
Created attachment 217409 [details]
layout test

The onclick handler is also affected by this bug, it doesn't fire when clicking the area that doesn't trigger the :hover state.
Comment 2 Mihai Maerean 2013-11-21 01:46:49 PST
Created attachment 217533 [details]
patch
Comment 3 Mihai Maerean 2013-11-21 02:22:50 PST
Created attachment 217538 [details]
patch. incorporates the feedback.
Comment 4 WebKit Commit Bot 2013-11-21 07:14:44 PST
Comment on attachment 217538 [details]
patch. incorporates the feedback.

Clearing flags on attachment: 217538

Committed r159626: <http://trac.webkit.org/changeset/159626>
Comment 5 WebKit Commit Bot 2013-11-21 07:14:47 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Simon Fraser (smfr) 2013-11-21 11:01:39 PST
Can you make a testcase where the transformed element overlaps its parent div, and give the parent an rgba() color. I want to see if they visibly intersect.
Comment 7 Simon Fraser (smfr) 2013-11-21 11:02:57 PST
I'm not yet convinced that this patch is correct. Allan, please don't review in areas where you don't have expertise.
Comment 8 Mihai Maerean 2013-11-21 12:37:26 PST
(In reply to comment #6)
> Can you make a testcase where the transformed element overlaps its parent div, and give the parent an rgba() color. I want to see if they visibly intersect.

Using Web Inspector, I have added the background-color to the parent div and the 2 divs don't visibly intersect, meaning the negative Z coordinates of the rotated child are painted on top of the background color of the parent.

Do you want me to add this background-color property to the layout test file?
Comment 9 Mihai Maerean 2013-11-22 09:02:49 PST
Created attachment 217690 [details]
layout test that fails even with the fix.
Comment 10 Mihai Maerean 2013-11-22 09:07:10 PST
I have logged https://bugs.webkit.org/show_bug.cgi?id=124777 to fix the problem shown by the attached layout test.