WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
175506
The none smooth stroke applied to an SVG shape breaks its hit testing
https://bugs.webkit.org/show_bug.cgi?id=175506
Summary
The none smooth stroke applied to an SVG shape breaks its hit testing
Said Abou-Hallawa
Reported
2017-08-11 18:27:26 PDT
Created
attachment 317983
[details]
test case Open the attached test case and try on click multiple times on the bottom right border of the two rectangles. The two rectangles are supposed to move 10px down and 10px down. Result: The red rectangle seems to respond only on its original rectangle in spite of its movement. This can be seen if you hover its border after the first click. The cursor should change to the move shape but it does not. So the only way to move it to after the first click is to keep the mouse position still and do not move it. The green rectangle works as expected. The reason is the red rectangle has the attribute stroke-linejoin="round". This makes the function RenderSVGRect::shapeDependentStrokeContains() falls back to the slow path through calling RenderSVGShape::shapeDependentStrokeContains() which uses m_path to check whether the stroke contains the point or not. The bug is m_path gets only updated in RenderSVGRect::shapeDependentStrokeContains() when it is null. When RenderSVGRect::updateShapeFromElement() changes the renderer rectangles because of changing the 'x' and the 'y' attributes, the RenderSVGShape::m_path stays as is with the old rectangle. The fix is to make RenderSVGRect::updateShapeFromElement() clear RenderSVGShape::m_path so it is recalculated by RenderSVGRect::shapeDependentStrokeContains() when it is needed.
Attachments
test case
(1.07 KB, text/html)
2017-08-11 18:27 PDT
,
Said Abou-Hallawa
no flags
Details
Patch
(4.54 KB, patch)
2017-08-11 18:52 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2017-08-11 18:52:50 PDT
Created
attachment 317986
[details]
Patch
Said Abou-Hallawa
Comment 2
2017-08-11 18:53:54 PDT
<
rdar://problem/33698146
>
WebKit Commit Bot
Comment 3
2017-08-14 15:00:31 PDT
Comment on
attachment 317986
[details]
Patch Clearing flags on attachment: 317986 Committed
r220717
: <
http://trac.webkit.org/changeset/220717
>
WebKit Commit Bot
Comment 4
2017-08-14 15:00:33 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug