Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1488656 [wpt PR 12839] - Fix :scope selector matching in the case…
… 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