Skip to content

Commit

Permalink
Bug 1488656 [wpt PR 12839] - Fix :scope selector matching in the case…
Browse files Browse the repository at this point in the history
… of DocumentFragment/ShadowRoot, a=testonly

Automatic update from web-platform-testsFix :scope selector matching in the case of DocumentFragment/ShadowRoot

When used in querySelector and querySelectorAll, :scope should match
the element or the DocumentFragment/ShadowRoot the querySelector is
called on. However, WPT adeed in crrev.com/c/1158445 shows that :scope
matches nothing when querySelector is called on shadow root, while it
works fine when querySelector is called on true element.
This CL fixes :scope selector matching process so that :scope itself
matches DocumentFragment/ShadowRoot when querySelector is called on
DocumentFragment/ShadowRoot. Tests for DocumentFragment are also added
in this CL.

Link to the spec:
https://drafts.csswg.org/selectors-4/#the-scope-pseudo

Link to related issue:
w3c/csswg-drafts#3016

Link to related CL:
crrev.com/c/1158445

Bug: 859692
Change-Id: If20fc4b122d93a553dc478be0ee958958340a34f
Reviewed-on: https://chromium-review.googlesource.com/1203472
Reviewed-by: Rune Lillesveen <futharkchromium.org>
Reviewed-by: Rakina Zata Amni <rakinachromium.org>
Commit-Queue: Momoko Sumida <momongoogle.com>
Cr-Commit-Position: refs/heads/master{#590595}

--

wpt-commits: 40529833d147d79895ace6de923d126aae7631e8
wpt-pr: 12839

UltraBlame original commit: 40c8e72fa87d6667c83a6773373cd381f928d2f6
  • Loading branch information
marco-c committed Oct 3, 2019
1 parent 62a8d53 commit e6b6738
Show file tree
Hide file tree
Showing 2 changed files with 764 additions and 66 deletions.
2 changes: 1 addition & 1 deletion testing/web-platform/meta/MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -3826841,7 +3826841,7 @@ html
:
[
"
bda0aed602aa691bba4c4089f0a4827a9b836c9e
0340f25919f34aaad07d53d1550d5155f73fb26b
"
"
testharness
Expand Down
Loading

0 comments on commit e6b6738

Please sign in to comment.