Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 056a4b83b63f8dc0051d764f3ceb4c0455d2b376
      
https://github.com/WebKit/WebKit/commit/056a4b83b63f8dc0051d764f3ceb4c0455d2b376
  Author: Tim Nguyen <[email protected]>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M Source/WebCore/css/CSSCounterStyleRegistry.cpp
    M Source/WebCore/css/CSSCounterStyleRegistry.h
    M Source/WebCore/rendering/RenderListOutsideMarker.cpp

  Log Message:
  -----------
  [CSS symbols() function] Memoize counter styles
https://bugs.webkit.org/show_bug.cgi?id=324794
rdar://188057244

Reviewed by Anne van Kesteren.

Avoid re-creating the CSSRegisteredCounterStyle object for symbols() functions 
by memo-izing them like we do for normal counter styles.
This saves the cost of having to recreate them when rendering every element 
that uses the same symbols() function.

For now, use a Vector of pairs to avoid having to define HashTraits for 
SymbolsFunction.
This is cheap because we don't expect a huge number of different symbols() 
functions to be used on the same page.

Rename CounterStyleMap to NamedCounterStyleMap to differentiate it from the 
SymbolsFunction map.

* Source/WebCore/css/CSSCounterStyleRegistry.cpp:
(WebCore::CSSCounterStyleRegistry::resolvedCounterStyle):
(WebCore::CSSCounterStyleRegistry::resolveExtendsReference):
(WebCore::CSSCounterStyleRegistry::resolveFallbackReference):
(WebCore::CSSCounterStyleRegistry::counterStyle):
(WebCore::CSSCounterStyleRegistry::userAgentCounterStyles):
(WebCore::CSSCounterStyleRegistry::clearAuthorCounterStyles):
* Source/WebCore/css/CSSCounterStyleRegistry.h:
* Source/WebCore/rendering/RenderListOutsideMarker.cpp:
(WebCore::listMarkerTextContent):

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



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

Reply via email to