Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8fdcbd41b3c81a19239ffffd435b1dee937ed7bb
      
https://github.com/WebKit/WebKit/commit/8fdcbd41b3c81a19239ffffd435b1dee937ed7bb
  Author: Antti Koivisto <[email protected]>
  Date:   2025-11-06 (Thu, 06 Nov 2025)

  Changed paths:
    M LayoutTests/inspector/indexeddb/requestDatabase-expected.txt
    M LayoutTests/inspector/indexeddb/requestDatabase.html
    M Source/JavaScriptCore/bytecode/AccessCase.h
    M Source/JavaScriptCore/runtime/NativeFunction.h
    M Source/WTF/WTF.xcodeproj/project.pbxproj
    M Source/WTF/wtf/CMakeLists.txt
    M Source/WTF/wtf/Forward.h
    M Source/WTF/wtf/FunctionPtr.h
    M Source/WTF/wtf/HashFunctions.h
    M Source/WTF/wtf/Hasher.h
    M Source/WTF/wtf/ObjectIdentifier.h
    M Source/WTF/wtf/UUID.h
    M Source/WTF/wtf/Vector.h
    R Source/WTF/wtf/VectorHash.h
    M Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h
    M Source/WebCore/Modules/indexeddb/IDBKeyData.h
    M Source/WebCore/Modules/indexeddb/server/IndexValueStore.h
    M Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h
    M Source/WebCore/Modules/indexeddb/server/MemoryIndex.h
    M Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h
    M Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h
    M Source/WebCore/Modules/push-api/PushSubscriptionIdentifier.h
    M Source/WebCore/contentextensions/ContentExtensionActions.h
    M Source/WebCore/contentextensions/ContentExtensionCompiler.cpp
    M Source/WebCore/contentextensions/ContentExtensionRule.h
    M Source/WebCore/css/CSSFontFaceSet.h
    M Source/WebCore/css/parser/CSSParserContext.h
    M Source/WebCore/css/parser/CSSSelectorParserContext.h
    M Source/WebCore/dom/MessagePortIdentifier.h
    M Source/WebCore/layout/formattingContexts/grid/UnplacedGridItem.h
    M 
Source/WebCore/layout/formattingContexts/inline/text/TextBreakingPositionContext.h
    M Source/WebCore/loader/ResourceCryptographicDigest.h
    M Source/WebCore/page/ClientOrigin.h
    M Source/WebCore/page/GlobalWindowIdentifier.h
    M Source/WebCore/page/PartitionedSecurityOrigin.h
    M Source/WebCore/platform/ProcessQualified.h
    M Source/WebCore/platform/encryptedmedia/CDMProxy.h
    M Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp
    M Source/WebCore/platform/graphics/Color.h
    M Source/WebCore/platform/graphics/ColorHash.h
    M Source/WebCore/platform/graphics/FontCache.cpp
    M Source/WebCore/platform/graphics/FontCascadeCache.h
    M Source/WebCore/platform/graphics/FontPaletteValues.h
    M Source/WebCore/platform/graphics/FontTaggedSettings.h
    M Source/WebCore/platform/graphics/SystemFallbackFontCache.h
    M Source/WebCore/platform/graphics/TextRunHash.h
    M 
Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreTextCache.h
    M Source/WebCore/platform/graphics/gstreamer/eme/CDMProxyThunder.h
    M Source/WebCore/platform/graphics/skia/FontPlatformDataSkia.cpp
    M Source/WebCore/platform/network/OrganizationStorageAccessPromptQuirk.h
    M Source/WebCore/rendering/MarkedText.h
    M Source/WebCore/style/PseudoElementIdentifier.h
    M Source/WebCore/style/ResolvedScopedName.h
    M Source/WebCore/style/RuleSet.h
    M Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h
    M Source/WebCore/workers/shared/SharedWorkerKey.h
    M Source/WebKit/NetworkProcess/cache/NetworkCache.h
    M Source/WebKit/Platform/IPC/ObjectIdentifierReferenceTracker.h
    M Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
    M Tools/TestWebKitAPI/Tests/WTF/FixedVector.cpp
    M Tools/TestWebKitAPI/Tests/WTF/Vector.cpp

  Log Message:
  -----------
  Add DefaultHash for types that support Hasher
https://bugs.webkit.org/show_bug.cgi?id=302007
rdar://164090077

Reviewed by Darin Adler.

Add HasherBasedHash for types that have

void add(Hasher&, const T&);

Use it to remove a bunch of custom Hash types.

Tests: Tools/TestWebKitAPI/Tests/WTF/FixedVector.cpp
       Tools/TestWebKitAPI/Tests/WTF/Vector.cpp
* LayoutTests/inspector/indexeddb/requestDatabase-expected.txt:
* LayoutTests/inspector/indexeddb/requestDatabase.html:

Make test insensitive to hash order. ObjectIdentifier hash changed because 
add() and ObjectIdentifierGenericBaseHash::hash()
were using different hash functions.

* Source/JavaScriptCore/bytecode/AccessCase.h:
* Source/JavaScriptCore/runtime/NativeFunction.h:
(JSC::NativeFunctionHash::hash): Deleted.
(JSC::NativeFunctionHash::equal): Deleted.
(JSC::TaggedNativeFunctionHash::hash): Deleted.
(JSC::TaggedNativeFunctionHash::equal): Deleted.
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/Forward.h:
* Source/WTF/wtf/FunctionPtr.h:
* Source/WTF/wtf/HashFunctions.h:
(WTF::isSafeToCompareToHashTableEmptyOrDeletedValue):
(WTF::requires):
* Source/WTF/wtf/Hasher.h:
(WTF::requires):
(WTF::HasherBasedHash::hash):
(WTF::HasherBasedHash::equal):
* Source/WTF/wtf/ObjectIdentifier.h:
(WTF::ObjectIdentifierGenericBaseHash<uint64_t>::hash): Deleted.
(WTF::ObjectIdentifierGenericBaseHash<uint64_t>::equal): Deleted.
(WTF::ObjectIdentifierGenericBaseHash<UUID>::hash): Deleted.
(WTF::ObjectIdentifierGenericBaseHash<UUID>::equal): Deleted.
* Source/WTF/wtf/UUID.h:
(WTF::UUIDHash::hash): Deleted.
(WTF::UUIDHash::equal): Deleted.
* Source/WTF/wtf/Vector.h:
* Source/WTF/wtf/VectorHash.h: Removed.
* Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h:
(WebCore::IDBDatabaseIdentifierHash::hash): Deleted.
(WebCore::IDBDatabaseIdentifierHash::equal): Deleted.
* Source/WebCore/Modules/indexeddb/IDBKeyData.h:
(WebCore::IDBKeyDataHash::hash): Deleted.
(WebCore::IDBKeyDataHash::equal): Deleted.
* Source/WebCore/Modules/indexeddb/server/IndexValueStore.h:
* Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
* Source/WebCore/Modules/indexeddb/server/MemoryIndex.h:
* Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h:
* Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h:
(WebCore::IDBResourceIdentifierHash::hash): Deleted.
(WebCore::IDBResourceIdentifierHash::equal): Deleted.
* Source/WebCore/Modules/push-api/PushSubscriptionIdentifier.h:
(WTF::PushSubscriptionSetIdentifierHash::hash): Deleted.
(WTF::PushSubscriptionSetIdentifierHash::equal): Deleted.
* Source/WebCore/contentextensions/ContentExtensionActions.h:
(WTF::DefaultHash<WebCore::ContentExtensions::RedirectAction>::hash): Deleted.
(WTF::DefaultHash<WebCore::ContentExtensions::RedirectAction>::equal): Deleted.
(WTF::DefaultHash<WebCore::ContentExtensions::ModifyHeadersAction>::hash): 
Deleted.
(WTF::DefaultHash<WebCore::ContentExtensions::ModifyHeadersAction>::equal): 
Deleted.
* Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:
* Source/WebCore/contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::TriggerHash::hash): Deleted.
(WebCore::ContentExtensions::TriggerHash::equal): Deleted.
* Source/WebCore/css/CSSFontFaceSet.h:
* Source/WebCore/css/parser/CSSParserContext.h:
(WebCore::CSSParserContextHash::hash): Deleted.
(WebCore::CSSParserContextHash::equal): Deleted.
* Source/WebCore/css/parser/CSSSelectorParserContext.h:
(WebCore::CSSSelectorParserContextHash::hash): Deleted.
(WebCore::CSSSelectorParserContextHash::equal): Deleted.
* Source/WebCore/dom/MessagePortIdentifier.h:
(WTF::MessagePortIdentifierHash::hash): Deleted.
(WTF::MessagePortIdentifierHash::equal): Deleted.
* Source/WebCore/layout/formattingContexts/grid/UnplacedGridItem.h:
(WTF::DefaultHash<WebCore::Layout::UnplacedGridItem>::hash): Deleted.
(WTF::DefaultHash<WebCore::Layout::UnplacedGridItem>::equal): Deleted.
* 
Source/WebCore/layout/formattingContexts/inline/text/TextBreakingPositionContext.h:
(WebCore::Layout::TextBreakingPositionContextHash::hash): Deleted.
(WebCore::Layout::TextBreakingPositionContextHash::equal): Deleted.
* Source/WebCore/loader/ResourceCryptographicDigest.h:
(WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::hash): Deleted.
(WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::equal): Deleted.
* Source/WebCore/page/ClientOrigin.h:
(WTF::ClientOriginKeyHash::hash): Deleted.
(WTF::ClientOriginKeyHash::equal): Deleted.
* Source/WebCore/page/GlobalWindowIdentifier.h:
(WTF::GlobalWindowIdentifierHash::hash): Deleted.
(WTF::GlobalWindowIdentifierHash::equal): Deleted.
* Source/WebCore/page/PartitionedSecurityOrigin.h:
(WTF::PartitionedSecurityOriginHash::hash): Deleted.
(WTF::PartitionedSecurityOriginHash::equal): Deleted.
* Source/WebCore/platform/ProcessQualified.h:
(WTF::DefaultHash<WebCore::ProcessQualified<T>>::hash): Deleted.
(WTF::DefaultHash<WebCore::ProcessQualified<T>>::equal): Deleted.
* Source/WebCore/platform/encryptedmedia/CDMProxy.h:
* Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp:
* Source/WebCore/platform/graphics/Color.h:
* Source/WebCore/platform/graphics/ColorHash.h:
(WTF::ColorHash::hash): Deleted.
(WTF::ColorHash::equal): Deleted.
* Source/WebCore/platform/graphics/FontCache.cpp:
(WebCore::FontPlatformDataCacheKeyHash::hash): Deleted.
(WebCore::FontPlatformDataCacheKeyHash::equal): Deleted.
* Source/WebCore/platform/graphics/FontCascadeCache.h:
(WTF::DefaultHash<WebCore::FontDescriptionKey>::hash): Deleted.
(WTF::DefaultHash<WebCore::FontDescriptionKey>::equal): Deleted.
(WebCore::FontCascadeCacheKeyHash::hash): Deleted.
(WebCore::FontCascadeCacheKeyHash::equal): Deleted.
* Source/WebCore/platform/graphics/FontPaletteValues.h:
(WTF::DefaultHash<WebCore::FontPaletteValues>::hash): Deleted.
(WTF::DefaultHash<WebCore::FontPaletteValues>::equal): Deleted.
* Source/WebCore/platform/graphics/FontTaggedSettings.h:
(WebCore::FourCharacterTagHash::hash): Deleted.
(WebCore::FourCharacterTagHash::equal): Deleted.
* Source/WebCore/platform/graphics/SystemFallbackFontCache.h:
(WebCore::CharacterFallbackMapKeyHash::hash): Deleted.
(WebCore::CharacterFallbackMapKeyHash::equal): Deleted.
* Source/WebCore/platform/graphics/TextRunHash.h:
(WebCore::TextRunHash::hash): Deleted.
(WebCore::TextRunHash::equal): Deleted.
* Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreTextCache.h:
(WebCore::FontFamilySpecificationKeyHash::hash): Deleted.
(WebCore::FontFamilySpecificationKeyHash::equal): Deleted.
* Source/WebCore/platform/network/OrganizationStorageAccessPromptQuirk.h:
(WebCore::operator==):
(WebCore::OrganizationStorageAccessPromptQuirkHash::hash): Deleted.
(WebCore::OrganizationStorageAccessPromptQuirkHash::equal): Deleted.
* Source/WebCore/rendering/MarkedText.h:
(WTF::DefaultHash<WebCore::MarkedText>::hash): Deleted.
(WTF::DefaultHash<WebCore::MarkedText>::equal): Deleted.
* Source/WebCore/style/PseudoElementIdentifier.h:
(WTF::DefaultHash<WebCore::Style::PseudoElementIdentifier>::hash): Deleted.
(WTF::DefaultHash<WebCore::Style::PseudoElementIdentifier>::equal): Deleted.
(WTF::DefaultHash<std::optional<WebCore::Style::PseudoElementIdentifier>>::hash):
 Deleted.
(WTF::DefaultHash<std::optional<WebCore::Style::PseudoElementIdentifier>>::equal):
 Deleted.
* Source/WebCore/style/ResolvedScopedName.h:
(WTF::DefaultHash<WebCore::Style::ResolvedScopedName>::hash): Deleted.
(WTF::DefaultHash<WebCore::Style::ResolvedScopedName>::equal): Deleted.
* Source/WebCore/style/RuleSet.h:
* Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h:
(WTF::ServiceWorkerRegistrationKeyHash::hash): Deleted.
(WTF::ServiceWorkerRegistrationKeyHash::equal): Deleted.
* Source/WebCore/workers/shared/SharedWorkerKey.h:
(WTF::DefaultHash<WebCore::SharedWorkerKey>::hash): Deleted.
(WTF::DefaultHash<WebCore::SharedWorkerKey>::equal): Deleted.
* Source/WebKit/NetworkProcess/cache/NetworkCache.h:
(WTF::GlobalFrameIDHash::hash): Deleted.
(WTF::GlobalFrameIDHash::equal): Deleted.
* Source/WebKit/Platform/IPC/ObjectIdentifierReferenceTracker.h:
(WTF::DefaultHash<IPC::ObjectIdentifierReference<T>>::hash): Deleted.
(WTF::DefaultHash<IPC::ObjectIdentifierReference<T>>::equal): Deleted.
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.h:
* Tools/TestWebKitAPI/Tests/WTF/FixedVector.cpp:
* Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:

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



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

Reply via email to