⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259751 in webkit


Ignore:
Timestamp:
Apr 8, 2020, 1:06:53 PM (6 years ago)
Author:
Doug Kelly
Message:

Additional cleanup from "Hit test with clipPath referencing parent element causes infinite recursion"
https://bugs.webkit.org/show_bug.cgi?id=210203
<rdar://problem/60002347>

Reviewed by Geoffrey Garen.

As suggested from the review in bug #209773, this incorporates some additional cleanup, including making the
SVGHitTestCycleDetectionScope constructor explicit, and clarifying the add/remove with the WeakHashSet, since
WeakPtr's operator* returns a reference to the template type (which is what we need).

No new tests as this is covered by existing tests and there are no functional changes.

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope):
(WebCore::SVGHitTestCycleDetectionScope::~SVGHitTestCycleDetectionScope):

  • rendering/svg/SVGRenderSupport.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r259744 r259751  
     12020-04-08  Doug Kelly  <dougk@apple.com>
     2
     3        Additional cleanup from "Hit test with clipPath referencing parent element causes infinite recursion"
     4        https://bugs.webkit.org/show_bug.cgi?id=210203
     5        <rdar://problem/60002347>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        As suggested from the review in bug #209773, this incorporates some additional cleanup, including making the
     10        SVGHitTestCycleDetectionScope constructor explicit, and clarifying the add/remove with the WeakHashSet, since
     11        WeakPtr's operator* returns a reference to the template type (which is what we need).
     12
     13        No new tests as this is covered by existing tests and there are no functional changes.
     14
     15        * rendering/svg/SVGRenderSupport.cpp:
     16        (WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope):
     17        (WebCore::SVGHitTestCycleDetectionScope::~SVGHitTestCycleDetectionScope):
     18        * rendering/svg/SVGRenderSupport.h:
     19
    1202020-04-08  Devin Rousso  <drousso@apple.com>
    221
  • trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp

    r259722 r259751  
    513513{
    514514    m_element = makeWeakPtr(&element);
    515     auto result = visitedElements().add(m_element.get());
     515    auto result = visitedElements().add(*m_element);
    516516    ASSERT_UNUSED(result, result.isNewEntry);
    517517}
     
    519519SVGHitTestCycleDetectionScope::~SVGHitTestCycleDetectionScope()
    520520{
    521     bool result = visitedElements().remove(*m_element.get());
     521    bool result = visitedElements().remove(*m_element);
    522522    ASSERT_UNUSED(result, result);
    523523}
  • trunk/Source/WebCore/rendering/svg/SVGRenderSupport.h

    r259722 r259751  
    9999    WTF_MAKE_NONCOPYABLE(SVGHitTestCycleDetectionScope);
    100100public:
    101     SVGHitTestCycleDetectionScope(const RenderElement&);
     101    explicit SVGHitTestCycleDetectionScope(const RenderElement&);
    102102    ~SVGHitTestCycleDetectionScope();
    103103    static bool isEmpty();
Note: See TracChangeset for help on using the changeset viewer.