Closed Bug 1730299 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 30567 - Don't let attachShadow() succeed subsequent times for declarative shadow roots

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Dan Clark <daniec@microsoft.com>' wrote:

Don't let attachShadow() succeed subsequent times for declarative shadow roots

Currently, attachShadow() can be called any number of times for a
shadow host with a declarative shadow root, and each time the shadow
will be emptied out and returned.

The correct behavior is to only do this the first time attachShadow()
is called, and then throw errors an subsequent attempts. Implement
this behavior by clearing the declarative shadow root flag for
roots returned from Element::attachShadow.

Change-Id: I5d3d31fc8eaa09e5866191135743fe3f610accaa
Reviewed-on: https://chromium-review.googlesource.com/3154852
WPT-Export-Revision: c80084886e6c3f84fa394cfe9ab367661904e6f6

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 636 subtests

Status Summary

Firefox

OK : 1
PASS: 572
FAIL: 64

Chrome

OK : 1
PASS: 572
FAIL: 64

Safari

OK : 1
PASS: 572
FAIL: 64

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html
Declarative Shadow DOM as a child of <article>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <aside>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <blockquote>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <div>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <footer>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h1>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h2>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h3>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h4>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h5>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h6>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <header>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <nav>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <p>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <section>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <span>, with mode=open, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <article>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <aside>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <blockquote>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <div>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <footer>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h1>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h2>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h3>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h4>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h5>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h6>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <header>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <nav>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <p>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <section>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <span>, with mode=closed, delegatesFocus=false. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <article>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <aside>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <blockquote>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <div>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <footer>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h1>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h2>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h3>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h4>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h5>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h6>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <header>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <nav>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <p>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <section>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <span>, with mode=open, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <article>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <aside>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <blockquote>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <div>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <footer>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h1>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h2>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h3>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h4>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h5>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <h6>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <header>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <nav>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <p>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <section>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)
Declarative Shadow DOM as a child of <span>, with mode=closed, delegatesFocus=true. Should be safelisted.: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/25306102d9e3
[wpt PR 30567] - Don't let attachShadow() succeed subsequent times for declarative shadow roots, a=testonly
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1be034ea6e8a
[wpt PR 30567] - Don't let attachShadow() succeed subsequent times for declarative shadow roots, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.