[webkit-changes] [WebKit/WebKit] 140b74: Fix @counter-style behavior for empty-string symbol.

Vitor Roriz noreply at github.com
Wed Mar 22 10:34:46 PDT 2023


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

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/empty-string-symbol-expected-mismatch.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/empty-string-symbol-notref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/empty-string-symbol.html
    M Source/WebCore/css/CSSCounterStyle.cpp

  Log Message:
  -----------
  Fix @counter-style behavior for empty-string symbol.
https://bugs.webkit.org/show_bug.cgi?id=254269
rdar://107053810

For a system that accepts a single symbol, like cyclic,
if we input a symbol that is an empty string, the text
representation is being considered invalid and it is
falling back to 'decimal'.
This is is wrong, since empty string is a valid string.

This happens because we were checking against isEmpty()
instead of isNull().

Reviewed by Chris Dumez.

* LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/empty-string-symbol-expected-mismatch.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/empty-string-symbol-notref.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/empty-string-symbol-notref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/counter-style-at-rule/empty-string-symbol.html: Added.
* Source/WebCore/css/CSSCounterStyle.cpp:
(WebCore::CSSCounterStyle::counterForSystemFixed const):
(WebCore::CSSCounterStyle::text):

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




More information about the webkit-changes mailing list