The none smooth stroke applied to an SVG shape breaks its hit testing
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Aug 2017 22:00:27 +0000 (22:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Aug 2017 22:00:27 +0000 (22:00 +0000)
commitde5b222e7df28795b4f2f1ffddd65e0243fc3229
tree9d12b0f0381b8d7623ac66394f62e7d95e6fb83e
parentc1561e7c2982287987184d037ce67b0f2cf1518d
The none smooth stroke applied to an SVG shape breaks its hit testing
https://bugs.webkit.org/show_bug.cgi?id=175506

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-08-14
Reviewed by Simon Fraser.

Source/WebCore:

Clear RenderSVGShape::m_path when calling RenderSVGRect::updateShapeFromElement().
The m_path will be recalculated when RenderSVGShape::updateShapeFromElement()
is called from RenderSVGRect::shapeDependentStrokeContains().

Test: svg/stroke/stroke-linejoin-click.html

* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::updateShapeFromElement):
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::clearPath):

LayoutTests:

* svg/stroke/stroke-linejoin-click-expected.html: Added.
* svg/stroke/stroke-linejoin-click.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/stroke/stroke-linejoin-click-expected.html [new file with mode: 0644]
LayoutTests/svg/stroke/stroke-linejoin-click.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGRect.cpp
Source/WebCore/rendering/svg/RenderSVGShape.h