Bug 1822990 [wpt PR 39050] - [@scope] Allow CSSNestingType::kScope without having...
commitc1bbe5c478096862193d16cbe291c0de074e8f11
authorAnders Hartvoll Ruud <andruud@chromium.org>
Mon, 20 Mar 2023 20:19:41 +0000 (20 20:19 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 29 Mar 2023 12:52:25 +0000 (29 12:52 +0000)
tree30770cbc6db9361fee9b832b01bcff8b44dde17b
parente65bd291e2cac7a06cd440f38ae5b90944cba503
Bug 1822990 [wpt PR 39050] - [@scope] Allow CSSNestingType::kScope without having a parent rule, a=testonly

Automatic update from web-platform-tests
[@scope] Allow CSSNestingType::kScope without having a parent rule

Scopes without a <scope-start> selector are scoped to the owner node's
parent. The selectors within such @scope rules should parse according
to the behavior of CSSNestingType::kScope (i.e. relative rules allowed,
implicit :scope descendant if needed), even though there is no
parent rule. Therefore this CL changes CSSSelectorParser to check
for `nesting_type` instead of `parent_rule_for_nesting` when setting
the initial value of in_nested_style_rule.

Bug: 1280240
Change-Id: Ie8d90b8ef059e519919b89a13b93d340d0917d8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4345880
Reviewed-by: Steinar H Gunderson <sesse@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1119277}

--

wpt-commits: e9ef5fdaa91bd718b3479f437015d5c82dce85ea
wpt-pr: 39050
testing/web-platform/tests/css/css-cascade/scope-implicit.html