[webkit-changes] [WebKit/WebKit] 94521c: Document::m_inDocumentShadowRoots should be a Weak...

Ryosuke Niwa noreply at github.com
Fri Jan 27 22:10:16 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 94521c7aa5ab9dd914b8ea579099dfba5813ba09
      https://github.com/WebKit/WebKit/commit/94521c7aa5ab9dd914b8ea579099dfba5813ba09
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M Source/WTF/wtf/WeakListHashSet.h
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/style/StyleScope.cpp
    M Source/WebCore/style/StyleTreeResolver.cpp
    M Source/WebCore/testing/Internals.cpp

  Log Message:
  -----------
  Document::m_inDocumentShadowRoots should be a WeakListHashSet
https://bugs.webkit.org/show_bug.cgi?id=251286

Reviewed by Chris Dumez.

Use WeakListHashSet for Document::m_inDocumentShadowRoots instead of ListHashSet of raw pointers.

* Source/WTF/wtf/WeakListHashSet.h:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::didInsertInDocumentShadowRoot):
(WebCore::Document::didRemoveInDocumentShadowRoot):
* Source/WebCore/dom/Document.h:
(WebCore::Document::inDocumentShadowRoots const):
(WebCore::Document:: const): Deleted.
* Source/WebCore/style/StyleScope.cpp:
(WebCore::Style::Scope::releaseMemory):
(WebCore::Style::Scope::flushPendingDescendantUpdates):
(WebCore::Style::Scope::collectResolverScopes):
(WebCore::Style::Scope::didChangeStyleSheetEnvironment):
(WebCore::Style::Scope::didChangeViewportSize):
(WebCore::Style::Scope::invalidateMatchedDeclarationsCache):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::Scope::Scope):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::dumpStyleResolvers):

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




More information about the webkit-changes mailing list