[webkit-changes] [WebKit/WebKit] 0f1319: Validate name prefixes in CSSPseudoSelectors.json

Tim Nguyen noreply at github.com
Sat Jan 6 13:47:47 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0f1319b55b123c3139208eace470952f27fb33bf
      https://github.com/WebKit/WebKit/commit/0f1319b55b123c3139208eace470952f27fb33bf
  Author: Tim Nguyen <ntim at apple.com>
  Date:   2024-01-06 (Sat, 06 Jan 2024)

  Changed paths:
    M Source/WebCore/css/CSSPseudoSelectors.json
    M Source/WebCore/css/process-css-pseudo-selectors.py

  Log Message:
  -----------
  Validate name prefixes in CSSPseudoSelectors.json
https://bugs.webkit.org/show_bug.cgi?id=267170
rdar://120575956

Reviewed by Darin Adler.

- Add a list of known prefixes and validate names against it.
- Add a mechanism to restrain the number of `-webkit-` prefixes and encourage the use of `-internal-` and `-apple-` or standardized pseudos instead.
- Add an allowlist for "supports-single-colon-for-compatibility"

* Source/WebCore/css/CSSPseudoSelectors.json:
* Source/WebCore/css/process-css-pseudo-selectors.py:
(InputValidator.__init__):
(InputValidator.validate_fields.is_known_prefix):
(InputValidator.validate_fields):
(InputValidator.check_webkit_prefix_count):

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




More information about the webkit-changes mailing list