[webkit-changes] [WebKit/WebKit] 6aaf9c: Implement text-representation for CounterStyle

Vitor Roriz noreply at github.com
Fri Feb 24 04:29:32 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6aaf9c99077bb6f1cc0856d5380a5bca6f6cfeaf
      https://github.com/WebKit/WebKit/commit/6aaf9c99077bb6f1cc0856d5380a5bca6f6cfeaf
  Author: Vitor Roriz <vitor.roriz at apple.com>
  Date:   2023-02-24 (Fri, 24 Feb 2023)

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

  Log Message:
  -----------
  Implement text-representation for CounterStyle
https://bugs.webkit.org/show_bug.cgi?id=249804
rdar://103648354

Reviewed by Tim Nguyen.

Implementing the text representation for the integer counter value
for a defined counter-style.

The text representation is specified at https://www.w3.org/TR/css-counter-styles-3/#counter-styles

A key point of the text representation is the algorithm used, which is
defined by the counter-style system. Each algorithm
is defined at https://www.w3.org/TR/css-counter-styles-3/#counter-style-system

* Source/WebCore/css/CSSCounterStyle.cpp:
(WebCore::CSSCounterStyle::counterForSystemCyclic):
(WebCore::CSSCounterStyle::counterForSystemFixed):
(WebCore::CSSCounterStyle::counterForSystemSymbolic):
(WebCore::CSSCounterStyle::counterForSystemAlphabetic):
(WebCore::CSSCounterStyle::counterForSystemNumeric):
(WebCore::CSSCounterStyle::counterForSystemAdditive):
(WebCore::CSSCounterStyle::initialRepresentation):
(WebCore::CSSCounterStyle::fallbackText):
(WebCore::CSSCounterStyle::text):
(WebCore::CSSCounterStyle::shouldApplyNegativeSymbols const):
(WebCore::CSSCounterStyle::applyNegativeSymbols const):
(WebCore::CSSCounterStyle::applyPadSymbols const):
(WebCore::CSSCounterStyle::createCounterStyleDecimal):
* Source/WebCore/css/CSSCounterStyle.h:
(WebCore::CSSCounterStyle::fallback const):
* Source/WebCore/css/CSSCounterStyleRegistry.cpp:
(WebCore::CSSCounterStyleRegistry::decimalCounter):
(WebCore::CSSCounterStyleRegistry::decimalCounter const): Deleted.
* Source/WebCore/css/CSSCounterStyleRegistry.h:

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




More information about the webkit-changes mailing list