Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5809a27bdb93d2b3ee4e580653ec42c33e7722d1
https://github.com/WebKit/WebKit/commit/5809a27bdb93d2b3ee4e580653ec42c33e7722d1
Author: Chris Dumez <[email protected]>
Date: 2026-01-12 (Mon, 12 Jan 2026)
Changed paths:
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyleBase.h
M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
M Source/WebCore/style/computed/StyleComputedStyle.cpp
M Source/WebCore/style/computed/StyleComputedStyleBase.cpp
M Source/WebCore/style/computed/StyleComputedStyleBase.h
Log Message:
-----------
Avoid heap-allocating PseudoStyleCache since it is a HashMap
https://bugs.webkit.org/show_bug.cgi?id=305302
Reviewed by Darin Adler.
Avoid heap-allocating PseudoStyleCache since it is a HashMap and a
HashMap is already essentially a pointer. This avoid unnecessary heap
allocation and extra pointer dereference.
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::copyPseudoElementsFrom):
* Source/WebCore/rendering/style/RenderStyleBase.h:
(WebCore::RenderStyleBase::hasCachedPseudoStyles const):
(WebCore::RenderStyleBase::cachedPseudoStyles const):
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::pseudoStyleCacheIsInvalid):
* Source/WebCore/style/computed/StyleComputedStyle.cpp:
* Source/WebCore/style/computed/StyleComputedStyleBase.cpp:
(WebCore::Style::ComputedStyleBase::getCachedPseudoStyle const):
(WebCore::Style::ComputedStyleBase::addCachedPseudoStyle):
* Source/WebCore/style/computed/StyleComputedStyleBase.h:
(WebCore::Style::ComputedStyleBase::hasCachedPseudoStyles const):
(WebCore::Style::ComputedStyleBase::cachedPseudoStyles const):
Canonical link: https://commits.webkit.org/305491@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications