Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5ef0287a820b4ff1f131496361719b29759a9e89
      
https://github.com/WebKit/WebKit/commit/5ef0287a820b4ff1f131496361719b29759a9e89
  Author: Geoffrey Garen <[email protected]>
  Date:   2025-12-12 (Fri, 12 Dec 2025)

  Changed paths:
    M Source/WTF/wtf/Forward.h
    M Source/WTF/wtf/GetPtr.h
    M Source/WTF/wtf/HashMap.h
    M Source/WTF/wtf/HashSet.h
    M Source/WTF/wtf/HashTable.h
    M Source/WTF/wtf/ListHashSet.h
    M Source/WTF/wtf/StdLibExtras.h
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/page/LocalFrameView.h
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/RenderLayerBacking.h
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.h
    M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceContainer.cpp
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceContainer.h

  Log Message:
  -----------
  Migrate RenderLayer to WeakKey hash tables
https://bugs.webkit.org/show_bug.cgi?id=304034
rdar://166334471

Reviewed by Sam Weinig.

This decouples RenderLayer from any particular WeakPtr implementation, so it can
switch to a more efficient implementation.

* Source/WTF/wtf/Forward.h: Declare canonical names for our new WeakKey hash
table types.

* Source/WTF/wtf/GetPtr.h:
* Source/WTF/wtf/HashMap.h:
(WTF::M>::computeSize const):
(WTF::M>::isEmptyIgnoringNullReferences const):
(WTF::M>::removeWeakNullEntries):
* Source/WTF/wtf/HashSet.h:
(WTF::shouldValidateKey>::computeSize const):
(WTF::shouldValidateKey>::isEmptyIgnoringNullReferences const):
(WTF::shouldValidateKey>::removeWeakNullEntries):
* Source/WTF/wtf/HashTable.h: Pushed weak table helper functions into HashTable
to create a single choke point where we decide to shrink a weak table based on
weak null keys.

(WTF::Malloc>::computeSize const):
(WTF::Malloc>::isEmptyIgnoringNullReferences const):
(WTF::Malloc>::removeWeakNullEntries const):
(WTF::Malloc>::removeIf):
(WTF::Malloc>::takeIf):
(WTF::Malloc>::computeBestTableSize):
(WTF::Malloc>::checkTableConsistencyExceptSize const):
(WTF::Malloc>::removeWeakNullEntries): Deleted.
* Source/WTF/wtf/ListHashSet.h: Boilerplate changes to make interfaces agnostic
about whether you look up by RenderLayer* or RenderLayer&. This reduces
RenderLayer code churn in this patch.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to