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: 5e307e2cc9a8b0e432882983637ae87feb65c0df
  • Loading branch information
marco-c committed Oct 3, 2019
1 parent dd46c21 commit 43ace17
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 43ace17

Please sign in to comment.