Changeset 220717 in webkit


Ignore:
Timestamp:
Aug 14, 2017 3:00:27 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

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.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r220714 r220717  
     12017-08-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        The none smooth stroke applied to an SVG shape breaks its hit testing
     4        https://bugs.webkit.org/show_bug.cgi?id=175506
     5
     6        Reviewed by Simon Fraser.
     7
     8        * svg/stroke/stroke-linejoin-click-expected.html: Added.
     9        * svg/stroke/stroke-linejoin-click.html: Added.
     10
    1112017-08-14  Daniel Bates  <dabates@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r220713 r220717  
     12017-08-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        The none smooth stroke applied to an SVG shape breaks its hit testing
     4        https://bugs.webkit.org/show_bug.cgi?id=175506
     5
     6        Reviewed by Simon Fraser.
     7
     8        Clear RenderSVGShape::m_path when calling RenderSVGRect::updateShapeFromElement().
     9        The m_path will be recalculated when RenderSVGShape::updateShapeFromElement()
     10        is called from RenderSVGRect::shapeDependentStrokeContains().
     11
     12        Test: svg/stroke/stroke-linejoin-click.html
     13
     14        * rendering/svg/RenderSVGRect.cpp:
     15        (WebCore::RenderSVGRect::updateShapeFromElement):
     16        * rendering/svg/RenderSVGShape.h:
     17        (WebCore::RenderSVGShape::clearPath):
     18
    1192017-08-14  Adrian Perez de Castro  <aperez@igalia.com>
    220
  • trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp

    r212562 r220717  
    5353    m_innerStrokeRect = FloatRect();
    5454    m_outerStrokeRect = FloatRect();
     55    clearPath();
    5556
    5657    SVGLengthContext lengthContext(&rectElement());
  • trunk/Source/WebCore/rendering/svg/RenderSVGShape.h

    r208668 r220717  
    6464        return *m_path;
    6565    }
     66    void clearPath() { m_path = nullptr; }
    6667
    6768protected:
Note: See TracChangeset for help on using the changeset viewer.