-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[@scope] Scope to host element if there's no owner-parent element
Implicit scopes, i.e. scopes without a <scope-start> selector, should scope to the parent element of the owner element: <div id=foo> <style> @scope { ... } /* Scoped to #foo */ </style> </div> However, there are two ShadowDOM-related cases where we don't have an owner-parent element: 1. When the <style> element appears directly below a shadow root. 2. When the stylesheet is constructed/adopted. In this case we don't even have an owner element. Currently, we handle this by never activating the scope. This CL fixes this issue by instead scoping implicit @scope rules to the shadow *host* instead of the *root*. This requires a spec change [1], therefore the tests are marked as tentative. Fixed: 1379844 [1] w3c/csswg-drafts#9178 Change-Id: I9146ffb3c6cb5e2f5697dc3d3e62cda9396709b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4778499 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/main@{#1184653}
- Loading branch information
Showing
6 changed files
with
93 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters