Bug 200140

Summary: Disabled SVG shapes should not be hit-tested
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: SVGAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: clopez, commit-queue, dino, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, kondapallykalyan, pdr, schenney, sergio, simon.fraser, thorton, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 200143    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Said Abou-Hallawa 2019-07-25 15:19:19 PDT
Failed WPT test: http://web-platform-tests.live/svg/shapes/scripted/disabled-shapes-not-hit.svg

When an SVG shape is disabled because of incorrect dimension, this shape should not be hit by Document.elementFromPoint(). Examples for such shapes are:

<circle/>
<circle r="0"/>
<circle r="-10"/>
<circle style="r: 0"/>
<circle style="r: -10px"/>
<circle style="r: calc(-10px)"/>
Comment 1 Said Abou-Hallawa 2019-11-04 12:52:57 PST
Created attachment 382762 [details]
Patch
Comment 2 Said Abou-Hallawa 2019-11-04 17:03:02 PST
Created attachment 382790 [details]
Patch
Comment 3 Said Abou-Hallawa 2019-11-05 11:07:33 PST
Created attachment 382835 [details]
Patch
Comment 4 WebKit Commit Bot 2019-11-05 12:10:09 PST
Comment on attachment 382835 [details]
Patch

Clearing flags on attachment: 382835

Committed r252069: <https://trac.webkit.org/changeset/252069>
Comment 5 WebKit Commit Bot 2019-11-05 12:10:11 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-11-05 12:11:14 PST
<rdar://problem/56913777>
Comment 7 Carlos Alberto Lopez Perez 2020-03-16 21:34:42 PDT
Comment on attachment 382835 [details]
Patch

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

> LayoutTests/imported/w3c/web-platform-tests/svg/import/types-dom-08-f-manual.svg:138
> -        drawString( "[rect4] " + bbox.x + " " + bbox.y + " " + bbox.width + " " + bbox.height, verifyBBox( bbox, 10, 10, 400, 0, 1 / 65535 ));
> +        drawString( "[rect4] " + bbox.x + " " + bbox.y + " " + bbox.width + " " + bbox.height, verifyBBox( bbox, 0, 0, 0, 0, 1 / 65535 ));

I wonder about this change? Has it been made on purpose? Has it been exported to WPT?
I can't see this change on the original test file in WPT <https://github.com/web-platform-tests/wpt/blob/master/svg/import/types-dom-08-f-manual.svg?short_path=cd6bbcc#L138>