[webkit-changes] [WebKit/WebKit] 25213c: [CSS] @scope prelude should take nesting into account

Matthieu Dubet noreply at github.com
Fri Dec 15 08:08:49 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 25213c389f501f946d6e5516b872a69219907f81
      https://github.com/WebKit/WebKit/commit/25213c389f501f946d6e5516b872a69219907f81
  Author: Matthieu Dubet <m_dubet at apple.com>
  Date:   2023-12-15 (Fri, 15 Dec 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-cssom.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-evaluation-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-nesting-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited-cssom-expected.txt
    M Source/WebCore/css/CSSSelector.cpp
    M Source/WebCore/css/parser/CSSParserImpl.cpp
    M Source/WebCore/css/parser/CSSParserImpl.h
    M Source/WebCore/css/parser/CSSParserSelector.cpp
    M Source/WebCore/css/parser/CSSParserSelector.h

  Log Message:
  -----------
  [CSS] @scope prelude should take nesting into account
https://bugs.webkit.org/show_bug.cgi?id=266467
rdar://119711922

Reviewed by Antti Koivisto.

The <scope-start> should be prepended by either nothing,
& or :scope (depending on the outer context).

The <scope-end> should be prepended by :scope.

* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-cssom.html:

https://github.com/w3c/csswg-drafts/issues/9621

* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-evaluation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-nesting-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited-cssom-expected.txt:
* Source/WebCore/css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText const):
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::appendImplicitSelectorPseudoClassScopeIfNeeded):
(WebCore::appendImplicitSelectorNestingParentIfNeeded):
(WebCore::CSSParserImpl::appendImplicitSelectorIfNeeded):
(WebCore::CSSParserImpl::consumeScopeRule):
(WebCore::CSSParserImpl::consumeStyleRule):
* Source/WebCore/css/parser/CSSParserImpl.h:
* Source/WebCore/css/parser/CSSParserSelector.cpp:
(WebCore::CSSParserSelector::leftmostSimpleSelector const):

const version of the existing non-const one

(WebCore::CSSParserSelector::startsWithExplicitCombinator const):
* Source/WebCore/css/parser/CSSParserSelector.h:

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




More information about the webkit-changes mailing list