Closed Bug 1629278 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 22874 - Hide the .content() property for declarative shadow roots

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Mason Freed <masonfreed@chromium.org> wrote:

Hide the .content() property for declarative shadow roots

With this CL, the .content() property of a declarative shadow root
(a \<template shadowroot="open|closed"> element being parsed) will return
null. Note that this \<template> element only exists during parsing,
and upon the closing \</template> tag being encountered by the parser,
the shadowroot will be created, the \<template> contents will be moved
into the shadowroot, and the \<template> itself will be deleted. So
this change is only visible from MutationObservers and other script
that runs during parsing. This CL prevents that script from accessing
the contents of the (potentially closed) shadow root.

See point #1 at [1] for more context.

[1] https://github.com/whatwg/dom/issues/831#issuecomment-608129380

Bug: 1042130
Change-Id: Id096d1b65dc94b7a75afdc6143341eb4521da41a
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/2133308
WPT-Export-Revision: d2ee0676503dd4118b9ce2666274a9c95c43542b

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7a8bc5291980 [wpt PR 22874] - Hide the .content() property for declarative shadow roots, a=testonly https://hg.mozilla.org/integration/autoland/rev/5333249adfda [wpt PR 22874] - Update wpt metadata, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.