Bug 82059 - Incorrect foreignObject hit test results when overlapping other SVG elements
Summary: Incorrect foreignObject hit test results when overlapping other SVG elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Florin Malita
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-23 09:10 PDT by Florin Malita
Modified: 2012-03-28 14:01 PDT (History)
2 users (show)

See Also:


Attachments
Blue div clicks are not detected in the overlapping region. (429 bytes, image/svg+xml)
2012-03-23 09:10 PDT, Florin Malita
no flags Details
Patch (5.18 KB, patch)
2012-03-27 14:15 PDT, Florin Malita
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florin Malita 2012-03-23 09:10:43 PDT
Created attachment 133498 [details]
Blue div clicks are not detected in the overlapping region.

http://code.google.com/p/chromium/issues/detail?id=116908

The generic phased subtree hit testing logic doesn't play nice with FO's stacking context. The FO content is flattened so a HitTestForeground query needs to also check for children background hits, etc.

For the attached example, clicking on the blue div in the overlapping region ends up firing a foreground hit on the underlying red rect.
Comment 1 Florin Malita 2012-03-27 14:15:48 PDT
Created attachment 134135 [details]
Patch
Comment 2 Nikolas Zimmermann 2012-03-28 05:19:09 PDT
Comment on attachment 134135 [details]
Patch

r=me. You're doing all of this from the Foreground phase, due the FOs stacking context. The only renderer that used to care about phases like HitTestFloat or HotTestChildBlockBackgrounds is RenderSVGFo. Now that this dependency is gone, we can completely avoid painting() the whole SVG subtree in non-foreground phases (still exceptions are needed for PaintPhaseSelection I think) - that would save a lot of time! Can you look into this? (Easy approach, early return in RenderSVGRoot::paint if phase is not foreground, then see what tests breaks :-)
Comment 3 Florin Malita 2012-03-28 07:02:35 PDT
(In reply to comment #2)
> we can completely avoid painting() the whole SVG subtree in non-foreground phases (still exceptions are needed for PaintPhaseSelection I think) - that would save a lot of time! Can you look into this? (Easy approach, early return in RenderSVGRoot::paint if phase is not foreground, then see what tests breaks :-)

Sure thing, thanks.
Comment 4 WebKit Review Bot 2012-03-28 14:00:59 PDT
Comment on attachment 134135 [details]
Patch

Clearing flags on attachment: 134135

Committed r112438: <http://trac.webkit.org/changeset/112438>
Comment 5 WebKit Review Bot 2012-03-28 14:01:03 PDT
All reviewed patches have been landed.  Closing bug.