[webkit-changes] [WebKit/WebKit] 2e241f: Integrate RenderListMarker with @counter-style

Vitor Roriz noreply at github.com
Fri Mar 3 04:46:36 PST 2023


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

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/support/ref-common.css
    M LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/support/test-common.css
    M LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/list-style-type-expected.txt
    M Source/WebCore/css/CSSCounterStyle.cpp
    M Source/WebCore/css/CSSCounterStyle.h
    M Source/WebCore/css/CSSCounterStyleRegistry.cpp
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/css/counterStyles.css
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
    M Source/WebCore/html/HTMLLIElement.cpp
    M Source/WebCore/html/HTMLUListElement.cpp
    M Source/WebCore/rendering/RenderListMarker.cpp
    M Source/WebCore/rendering/style/RenderStyle.cpp
    M Source/WebCore/rendering/style/RenderStyleConstants.h
    M Source/WebCore/style/StyleBuilderCustom.h

  Log Message:
  -----------
  Integrate RenderListMarker with @counter-style
https://bugs.webkit.org/show_bug.cgi?id=253158
rdar://102988393

Reviewed by Tim Nguyen.

This patch integrates RenderListMarker with
the parsed counter-style at-rules and fixes
some bugs catched during rendering.

Since we are wiring things up here, we can stop
skipping the related tests.

Some tests will still fail because we are missing:
- Support to shadow DOM scope.
- Integration with counters() function.
- Integration with symbols() function.
- Complex predefined symbols.
- Allowing redefinition of predefined symbols.
- Bug on wpt references regarding prefix/suffix fallback.
The missing items are linked to their issues in TestExpectations.

* LayoutTests/TestExpectations:
- Stop skipping the related tests. We are also tagging the tests
that we still fail due to missing feature/wpt bugs and we are
linking the relevant issues.

* LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/support/ref-common.css:
(div, p):
* LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/support/test-common.css:
(li, p):
- Avoid fuzziness in the relevant tests. This change is also pushed to WPT (https://github.com/web-platform-tests/wpt/pull/38773)

* Source/WebCore/css/CSSCounterStyle.cpp:
(WebCore::CSSCounterStyle::counterForSystemCyclic const):
(WebCore::CSSCounterStyle::applyPadSymbols const):
- Fixing bugs in padding and cyclic-system.

* Source/WebCore/css/CSSCounterStyleRegistry.cpp:
(WebCore::CSSCounterStyleRegistry::resolveExtendsReference):
- We were forgetting to pass the map for reference resolution
during the resolution of author rules, which would make the
user agent map to be used instead, by default.

* Source/WebCore/css/CSSProperties.json:
- Enabling custom-ident parsing in list-style-type.

* Source/WebCore/css/counterStyles.css:
(@counter-style cjk-decimal):
(@counter-style disclosure-open):
(@counter-style disclosure-closed):
- Update the symbols for disclosure open/closed.

* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleAdditiveSymbols):
- Fixing bug where we would not invalidate additive-symbol with missing symbol.
This would cause a crash during rendering.

* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::rareInheritedDataChangeRequiresLayout):
- listStyleStringValue change now requires layout, since it defines the name of the counter-style.
* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::updateContent):
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueListStyleType):
- Rendering Marker according to counter-style.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/list-style-type-expected.txt:
- We have new tests passing after fixing presentation hint mapping for LI and UL elements.

* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

* Source/WebCore/html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::collectPresentationalHintsForAttribute):
* Source/WebCore/html/HTMLUListElement.cpp:
(WebCore::HTMLUListElement::collectPresentationalHintsForAttribute):
- Fixing presentational hint mapping for LI and UL elements.

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




More information about the webkit-changes mailing list