-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
::backdrop is tree-abiding and should be allowed after ::slotted()
https://bugs.webkit.org/show_bug.cgi?id=265611 Reviewed by Tim Nguyen. This patch is to align WebKIt with Blink / Chromium and Web-Specification [1]: Merge: https://chromium-review.googlesource.com/c/chromium/src/+/4778566 [1] https://drafts.csswg.org/css-position-4/#backdrop When ::backdrop was moved into css-position, it was made tree-abiding, which means that '::slotted()::backdrop' should be allowed. This PR also syncs WPT test from upstream: Upstream Hash: web-platform-tests/wpt@3e2d8fc * Source/WebCore/css/parser/CSSSelectorParser.cpp: (isTreeAbidingPseudoElement): * LayoutTests/imported/w3c/web-platform-tests/css/css-position/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/css/css-position/backdrop-tree-abiding-slotted.html: Add Test Case * LayoutTests/imported/w3c/web-platform-tests/css/css-position/backdrop-tree-abiding-slotted-expected.txt: Add Test Case Expectation Canonical link: https://commits.webkit.org/271366@main
- Loading branch information
1 parent
9ab66ea
commit 01864fd
Showing
4 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...ported/w3c/web-platform-tests/css/css-position/backdrop-tree-abiding-slotted-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
PASS ::backdrop is tree-abiding and should be allowed after ::slotted() | ||
|
28 changes: 28 additions & 0 deletions
28
...Tests/imported/w3c/web-platform-tests/css/css-position/backdrop-tree-abiding-slotted.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS Position Test: ::backdrop is tree abiding, allowed after ::slotted</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-position-4/#backdrop"> | ||
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#tree-abiding"> | ||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#slotted-pseudo"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/declarative-shadow-dom-polyfill.js"></script> | ||
<div> | ||
<template shadowrootmode="open"> | ||
<style> | ||
::slotted(dialog)::backdrop { | ||
background-color: green; | ||
} | ||
</style> | ||
<slot></slot> | ||
</template> | ||
<dialog id="target"></dialog> | ||
</div> | ||
<script> | ||
const target = document.getElementById("target"); | ||
target.showModal(); | ||
|
||
test(() => { | ||
assert_equals(getComputedStyle(target, "::backdrop").backgroundColor, "rgb(0, 128, 0)"); | ||
}, "::backdrop is tree-abiding and should be allowed after ::slotted()"); | ||
</script> |
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