[webkit-changes] [WebKit/WebKit] b1867c: counter() integration with counter-styles

Vitor Roriz noreply at github.com
Wed Mar 22 12:59:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b1867c1e91684237ff93db475bf762fdf4b08536
      https://github.com/WebKit/WebKit/commit/b1867c1e91684237ff93db475bf762fdf4b08536
  Author: Vitor Roriz <vitor.roriz at apple.com>
  Date:   2023-03-22 (Wed, 22 Mar 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    R LayoutTests/css2.1/t1202-counter-01-b.html
    M LayoutTests/css2.1/t1202-counter-16-f.html
    R LayoutTests/css2.1/t1202-counters-01-b.html
    M LayoutTests/css2.1/t1202-counters-18-f.html
    M LayoutTests/fast/css/counters/counter-cssText-expected.txt
    M LayoutTests/fast/css/counters/counter-cssText.html
    M LayoutTests/fast/css/counters/getCounterValue-expected.txt
    M LayoutTests/fast/css/counters/getCounterValue.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/content-invalid-expected.txt
    R LayoutTests/platform/glib/css2.1/t1202-counter-01-b-expected.txt
    R LayoutTests/platform/glib/css2.1/t1202-counters-01-b-expected.txt
    M LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt
    R LayoutTests/platform/gtk/css2.1/t1202-counter-01-b-expected.png
    R LayoutTests/platform/gtk/css2.1/t1202-counters-01-b-expected.png
    R LayoutTests/platform/ios/css2.1/t1202-counter-01-b-expected.txt
    R LayoutTests/platform/ios/css2.1/t1202-counters-01-b-expected.txt
    R LayoutTests/platform/mac/css2.1/t1202-counter-01-b-expected.png
    R LayoutTests/platform/mac/css2.1/t1202-counter-01-b-expected.txt
    R LayoutTests/platform/mac/css2.1/t1202-counters-01-b-expected.png
    R LayoutTests/platform/mac/css2.1/t1202-counters-01-b-expected.txt
    R LayoutTests/platform/wincairo/css2.1/t1202-counter-01-b-expected.txt
    R LayoutTests/platform/wincairo/css2.1/t1202-counters-01-b-expected.txt
    M Source/WebCore/css/CSSCounterStyleRegistry.cpp
    M Source/WebCore/css/CSSCounterStyleRegistry.h
    M Source/WebCore/css/CSSCounterValue.cpp
    M Source/WebCore/css/CSSCounterValue.h
    M Source/WebCore/css/DeprecatedCSSOMCounter.h
    M Source/WebCore/css/DeprecatedCSSOMPrimitiveValue.cpp
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
    M Source/WebCore/rendering/RenderCounter.cpp
    M Source/WebCore/rendering/RenderCounter.h
    M Source/WebCore/rendering/RenderListMarker.cpp
    M Source/WebCore/rendering/style/CounterContent.h
    M Source/WebCore/style/StyleBuilderCustom.h

  Log Message:
  -----------
  counter() integration with counter-styles
https://bugs.webkit.org/show_bug.cgi?id=253920
rdar://106084053

Integrating counter() function with counter-styles defined.
We are also updating the counter() behavior regarding 'none'.
Before, 'none' would generate a empty string counter. However,
the spec was updated and 'none' no longer generates a valid counter.

Reviewed by Tim Nguyen.

* LayoutTests/TestExpectations:
* LayoutTests/css2.1/t1202-counter-16-f.html:
* LayoutTests/css2.1/t1202-counters-18-f.html:
- These tests are updated because list-style-type now accepts a custom-ident.
Therefore, the custom-ident uknowntype no longer produces a invalid counter,
since it will point to a counter-style that does not exist, which falls back to decimal.
that does not exist, we should fallback to decimal.

* LayoutTests/fast/css/counters/counter-cssText-expected.txt:
* LayoutTests/fast/css/counters/counter-cssText.html:
* LayoutTests/fast/css/counters/getCounterValue-expected.txt:
* LayoutTests/fast/css/counters/getCounterValue.html:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/content-invalid-expected.txt:
- Updating expectations for 'none' not generating a valid counter.

* LayoutTests/platform/glib/css2.1/t1202-counter-01-b-expected.txt: Removed.
* LayoutTests/platform/glib/css2.1/t1202-counters-01-b-expected.txt: Removed.
* LayoutTests/css2.1/t1202-counter-01-b.html: Removed.
* LayoutTests/css2.1/t1202-counters-01-b.html: Removed.
* LayoutTests/platform/gtk/css2.1/t1202-counter-01-b-expected.png: Removed.
* LayoutTests/platform/gtk/css2.1/t1202-counters-01-b-expected.png: Removed.
* LayoutTests/platform/ios/css2.1/t1202-counter-01-b-expected.txt: Removed.
* LayoutTests/platform/ios/css2.1/t1202-counters-01-b-expected.txt: Removed.
* LayoutTests/platform/mac/css2.1/t1202-counter-01-b-expected.png: Removed.
* LayoutTests/platform/mac/css2.1/t1202-counter-01-b-expected.txt: Removed.
* LayoutTests/platform/mac/css2.1/t1202-counters-01-b-expected.png: Removed.
* LayoutTests/platform/mac/css2.1/t1202-counters-01-b-expected.txt: Removed.
* LayoutTests/platform/wincairo/css2.1/t1202-counter-01-b-expected.txt: Removed.
* LayoutTests/platform/wincairo/css2.1/t1202-counters-01-b-expected.txt: Removed.
- We are removing 2 tests and its -expected files since these were covering the
outdated counter(none) behavior. The invalid behavior is already covered by
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/content-invalid.html

* Source/WebCore/css/CSSCounterStyle.cpp:
(WebCore::CSSCounterStyle::text):
* Source/WebCore/css/CSSCounterStyleRegistry.cpp:
(WebCore::CSSCounterStyleRegistry::resolvedCounterStyle):
* Source/WebCore/css/CSSCounterStyleRegistry.h:
* Source/WebCore/css/CSSCounterValue.cpp:
(WebCore::CSSCounterValue::CSSCounterValue):
(WebCore::CSSCounterValue::create):
(WebCore::CSSCounterValue::equals const):
(WebCore::CSSCounterValue::customCSSText const):
(WebCore::CSSCounterValue::counterStyleCSSText const):
* Source/WebCore/css/CSSCounterValue.h:
(WebCore::CSSCounterValue::counterStyle const):
(WebCore::CSSCounterValue::listStyle const): Deleted.
* Source/WebCore/css/DeprecatedCSSOMCounter.h:
* Source/WebCore/css/DeprecatedCSSOMPrimitiveValue.cpp:
(WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue const):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeCounterContent):
(WebCore::CSSPropertyParserHelpers::consumeContent):
* Source/WebCore/rendering/RenderCounter.cpp:
(WebCore::RenderCounter::originalText const):
(WebCore::RenderCounter::counterStyle const):
* Source/WebCore/rendering/RenderCounter.h:
* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::listMarkerText):
(WebCore::RenderListMarker::counterStyle const):
* Source/WebCore/rendering/style/CounterContent.h:
(WebCore::CounterContent::CounterContent):
(WebCore::CounterContent::listStyleType const):
(WebCore::operator==):
(WebCore::CounterContent::listStyle const): Deleted.
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueContent):

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




More information about the webkit-changes mailing list