[webkit-changes] [WebKit/WebKit] e3a1c7: Drop some unnecessary work from ~Element()

Chris Dumez noreply at github.com
Thu Mar 9 14:12:23 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e3a1c73970eebd3325cc5ea0625632f4379a3be1
      https://github.com/WebKit/WebKit/commit/e3a1c73970eebd3325cc5ea0625632f4379a3be1
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-03-09 (Thu, 09 Mar 2023)

  Changed paths:
    M Source/WebCore/css/typedom/InlineStylePropertyMap.cpp
    M Source/WebCore/css/typedom/InlineStylePropertyMap.h
    M Source/WebCore/css/typedom/StylePropertyMap.h
    M Source/WebCore/dom/Element.cpp

  Log Message:
  -----------
  Drop some unnecessary work from ~Element()
https://bugs.webkit.org/show_bug.cgi?id=253657

Reviewed by Ryosuke Niwa.

Use a WeakPtr for InlineStylePropertyMap::m_element so the the Element
destructor doesn't have to reset this pointer.

Also, stop calling Document::removeElementWithLangAttrMatchingDocumentElement()
since Document::m_elementsWithLangAttrMatchingDocumentElement is a WeakHashSet.

* Source/WebCore/css/typedom/InlineStylePropertyMap.cpp:
(WebCore::InlineStylePropertyMap::InlineStylePropertyMap):
(WebCore::InlineStylePropertyMap::clearElement): Deleted.
* Source/WebCore/css/typedom/InlineStylePropertyMap.h:
* Source/WebCore/css/typedom/StylePropertyMap.h:
(WebCore::StylePropertyMap::clearElement): Deleted.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::~Element):

Canonical link: https://commits.webkit.org/261468@main




More information about the webkit-changes mailing list