Bug 177953 - RenderSVGRoot should check the renderers inside its visualOverflowRect for hit testing if the overflow is visible
Summary: RenderSVGRoot should check the renderers inside its visualOverflowRect for hi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-10-05 11:09 PDT by Said Abou-Hallawa
Modified: 2017-10-05 14:54 PDT (History)
5 users (show)

See Also:


Attachments
test case (293 bytes, text/html)
2017-10-05 11:09 PDT, Said Abou-Hallawa
no flags Details
Patch (4.27 KB, patch)
2017-10-05 11:26 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (4.30 KB, patch)
2017-10-05 11:39 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (5.10 KB, patch)
2017-10-05 14:25 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2017-10-05 11:09:42 PDT
Created attachment 322862 [details]
test case

1. Open the attached test case.
2. Click on the green rectangle.

Result: no alert messages.
Expected: an alert message comes up when clicking the green rectangle.

NOTES: The green rectangle is an SVGRectElement inside an SVGSVGElement. The SVGRectElement positioned outside the rectangle of the root element. The SVGRectElement is drawn only because the overflow of the SVGSVGElement is set to be visible. Since the SVGRectElement is drawn, it should be accessible through elementFromPoint() and the hit testing.
Comment 1 Said Abou-Hallawa 2017-10-05 11:26:05 PDT
Created attachment 322866 [details]
Patch
Comment 2 Said Abou-Hallawa 2017-10-05 11:28:11 PDT
<rdar://problem/34788389>
Comment 3 Said Abou-Hallawa 2017-10-05 11:39:13 PDT
Created attachment 322871 [details]
Patch
Comment 4 Simon Fraser (smfr) 2017-10-05 13:03:14 PDT
Comment on attachment 322871 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=322871&action=review

> Source/WebCore/ChangeLog:5
> +        https://bugs.webkit.org/show_bug.cgi?id=177953
> +

Should be a link to the radar here.

> Source/WebCore/ChangeLog:13
> +        If an SVGElement is positioned outside the rectangle of the root element,
> +        it can still be drawn if the root element has "overflow: visible" applied.
> +        But since SVGElement can be drawn in this case, it should be accessible
> +        through nodeAtPoint() which is used for hit testing.

Does this do the right thing if another HTML element overlaps the visual overflow and has higher z-index?
Comment 5 Said Abou-Hallawa 2017-10-05 14:25:32 PDT
Created attachment 322918 [details]
Patch
Comment 6 Said Abou-Hallawa 2017-10-05 14:26:42 PDT
Comment on attachment 322871 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=322871&action=review

>> Source/WebCore/ChangeLog:13
>> +        through nodeAtPoint() which is used for hit testing.
> 
> Does this do the right thing if another HTML element overlaps the visual overflow and has higher z-index?

Yes it does. I includes this case in the new layout test which is attached to this patch.
Comment 7 WebKit Commit Bot 2017-10-05 14:54:19 PDT
Comment on attachment 322918 [details]
Patch

Clearing flags on attachment: 322918

Committed r222934: <http://trac.webkit.org/changeset/222934>
Comment 8 WebKit Commit Bot 2017-10-05 14:54:21 PDT
All reviewed patches have been landed.  Closing bug.