Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 78551d0c1acbf2e69884ad14f993d45f4ca1caed
      
https://github.com/WebKit/WebKit/commit/78551d0c1acbf2e69884ad14f993d45f4ca1caed
  Author: Sam Weinig <wei...@apple.com>
  Date:   2023-01-03 (Tue, 03 Jan 2023)

  Changed paths:
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.h
    M Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp
    M Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.h
    M Source/WebCore/css/process-css-properties.py

  Log Message:
  -----------
  Add support for custom annotations in the CSS BNF syntax
https://bugs.webkit.org/show_bug.cgi?id=250010
rdar://103817055

Reviewed by Simon Fraser.

Adds suppport for a custom syntax to annotate the CSS property grammar
BNF to allow passing additional information to the generators on a per
term basis. The syntax is of the form `@(foo-bar baz)`. That is an '@'
symbol followed by a space separated list of identifiers inside a pair
of parentheses.

In this initial commit, it is used to annotate a '#' multiplier as:

  "normal | <variation-tag-value>#@(no-single-item-opt)"

This will tell the code generators to not use the default behavior of
stashing a single item list as the item itself, but rather to always
return a list.

* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeFontVariationTag): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeFontVariationSettings): Deleted.
* Source/WebCore/css/parser/CSSPropertyParserHelpers.h:
* Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp:
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontTag):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFeatureTagValue):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFeatureSettings):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeVariationTagValue):
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFeatureTag): Deleted.
* Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.h:
* Source/WebCore/css/process-css-properties.py:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to