Closed Bug 1488656 Opened Last year Closed Last year

[wpt-sync] Sync PR 12839 - Fix :scope selector matching in the case of DocumentFragment/ShadowRoot

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 12839 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/12839
Details from upstream follow.

Momoko Sumida <momon@google.com> wrote:
>  Fix :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:
>  https://github.com/w3c/csswg-drafts/issues/3016
>  
>  Link to related CL:
>  crrev.com/c/1158445
>  
>  Bug: 859692
>  Change-Id: If20fc4b122d93a553dc478be0ee958958340a34f
>  
>  Reviewed-on: https://chromium-review.googlesource.com/1203472
>  WPT-Export-Revision: 725646573b533911debd393a6edc500b6eb64a9e
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 1 tests and 9 subtests
OK     : 1
PASS   : 3
FAIL   : 6

New tests that have failures or other problems:
/css/selectors/scope-selector.html
    Selecting descendants of document fragment with :scope should work: FAIL
    Selecting descendants of nested shadow root with :scope should work: FAIL
    Selecting direct child of document fragment with :scope should work: FAIL
    Selecting direct child of nested shadow root with :scope should work: FAIL
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5e307e2cc9a8
[wpt PR 12839] - Fix :scope selector matching in the case of DocumentFragment/ShadowRoot, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/4ccd436a9778
[wpt PR 12839] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/5e307e2cc9a8
https://hg.mozilla.org/mozilla-central/rev/4ccd436a9778
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/40c8e72fa87d
[wpt PR 12839] - Fix :scope selector matching in the case of DocumentFragment/ShadowRoot, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/3f769ef4c0b8
[wpt PR 12839] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/40c8e72fa87d
https://hg.mozilla.org/mozilla-central/rev/3f769ef4c0b8
Status: REOPENED → RESOLVED
Closed: Last yearLast year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Flags: needinfo?(james)

Looks like not fixed on 64.0.2. Any problems?

You need to log in before you can comment on or make changes to this bug.