[webkit-changes] [WebKit/WebKit] 7f6950: [CSS] Serialize invalid selectors inside <forgivin...

Matthieu Dubet noreply at github.com
Thu Aug 10 07:59:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7f6950788ad1839fe563ce11c29b6b396d74bdac
      https://github.com/WebKit/WebKit/commit/7f6950788ad1839fe563ce11c29b6b396d74bdac
  Author: Matthieu Dubet <m_dubet at apple.com>
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/cssom-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/nest-containing-forgiving-expected.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/nest-containing-forgiving-ref.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/nest-containing-forgiving.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-parsing.html
    M LayoutTests/imported/w3c/web-platform-tests/css/selectors/is-where-error-recovery.html
    M LayoutTests/imported/w3c/web-platform-tests/css/selectors/is-where-parsing.html
    M LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has-disallow-nesting-has-inside-has.html
    M LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has.html
    M Source/WebCore/css/CSSSelector.cpp
    M Source/WebCore/css/CSSSelector.h
    M Source/WebCore/css/SelectorChecker.cpp
    M Source/WebCore/css/parser/CSSSelectorParser.cpp
    M Source/WebCore/css/parser/CSSSelectorParser.h
    M Source/WebCore/cssjit/SelectorCompiler.cpp
    M Source/WebCore/style/RuleSet.cpp
    M Source/WebCore/style/RuleSetBuilder.cpp

  Log Message:
  -----------
  [CSS] Serialize invalid selectors inside <forgiving-selector-list>
https://bugs.webkit.org/show_bug.cgi?id=258688
rdar://111861948

Reviewed by Antti Koivisto and Darin Adler.

For the serialization round-trip to work with the presence of invalid
selectors containing a nesting selector, the spec mandates that
invalid selectors inside forgiving selector list (such as :is(..) or :where(...))
should be kept in serialization (and be considered when deciding whether a selector
is "nest-containing" or not).

https://github.com/w3c/csswg-drafts/issues/8356#issuecomment-1642840607

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/cssom-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/nest-containing-forgiving-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/nest-containing-forgiving-ref.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/nest-containing-forgiving.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-parsing.html:
* LayoutTests/imported/w3c/web-platform-tests/css/selectors/is-where-error-recovery.html:
* LayoutTests/imported/w3c/web-platform-tests/css/selectors/is-where-parsing.html:
* LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has-disallow-nesting-has-inside-has.html:
* LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has.html:
* Source/WebCore/css/CSSSelector.cpp:
(WebCore::simpleSelectorSpecificity):
(WebCore::CSSSelector::selectorText const):
(WebCore::CSSSelector::hasExplicitNestingParent const):
* Source/WebCore/css/CSSSelector.h:
* Source/WebCore/css/SelectorChecker.cpp:
(WebCore::canMatchHoverOrActiveInQuirksMode):
(WebCore::SelectorChecker::checkOne const):
* Source/WebCore/css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumeForgivingSelectorList):
* Source/WebCore/css/parser/CSSSelectorParser.h:
* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::constructFragmentsInternal):
* Source/WebCore/style/RuleSet.cpp:
(WebCore::Style::RuleSet::addRule):
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::resolveSelectorListWithNesting):

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




More information about the webkit-changes mailing list