[webkit-changes] [WebKit/WebKit] 7a3b46: Update whitespace expectations for custom properti...

Antti Koivisto noreply at github.com
Thu Jan 12 23:20:17 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7a3b462e1d002afff41928f1324c7a9477426d19
      https://github.com/WebKit/WebKit/commit/7a3b462e1d002afff41928f1324c7a9477426d19
  Author: Antti Koivisto <antti at apple.com>
  Date:   2023-01-12 (Thu, 12 Jan 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-typedom-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-typedom.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/var-reference-registered-properties-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/var-reference-registered-properties.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-definition-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-definition.html

  Log Message:
  -----------
  Update whitespace expectations for custom properties to match CSS Syntax Level 3 in some WPTs
https://bugs.webkit.org/show_bug.cgi?id=250506
rdar://104162464

Reviewed by Sam Weinig.

Tokenization and parsing for whitespaces described in CSS Syntax Module Level 3 matches the current WebKit behavior in custom properties.
Some WPTs still have wrong expectations.

Chrome fails in leading/trailing cases while Firefox fails in trailing and whitespace collapsing cases.

Both leading and trailing whitespaces should be stripped:

https://drafts.csswg.org/css-syntax/#consume-declaration

    ...
    4. While the next input token is a <whitespace-token>, consume the next input token.
    ...
    7. While the last token in decl’s value is a <whitespace-token>, remove that token.

Middle whitespaces collapse to a single <whitespace-token> during tokenization:

https://drafts.csswg.org/css-syntax/#consume-token

    whitespace
    Consume as much whitespace as possible. Return a <whitespace-token>.

* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-typedom-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-typedom.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/var-reference-registered-properties-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/var-reference-registered-properties.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-definition-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-definition.html:

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




More information about the webkit-changes mailing list