Closed Bug 2091172 Opened 20 days ago Closed 8 days ago

[wpt-sync] Sync PR 64946 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=330732

Categories

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

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Anne van Kesteren <annevk@annevk.nl> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=330732

WebKit export from bug: Create a window'<!---->s custom element registry together with the window

<pre>
Create a window's custom element registry together with the window

WebKit created a window's custom element registry on first customElements
access, while documents and shadow roots store their registry before then.
Shadow roots that were attached, cloned, or adopted, and template contents that
were imported, before that first access kept a null registry, so their custom
elements never upgraded.

Create the registry together with the window, and again when the window is
reused for a new document. As a window now always has a registry, remove
ensureCustomElementRegistry() and the code that worked around a missing one:
updating connected shadow roots once it was created, creating it before
returning a registry to bindings, and null checks.

Since <a href="https://commits.webkit.org/296637@main">296637@main</a> the fast HTML fragment parser is not used when a registry is
passed, as it does not associate the elements it creates with a scoped
registry. A global registry needs no association, as elements find it through
their tree scope, so use the fast parser with one too. Otherwise every
innerHTML would now take the slow path.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=330732">https://bugs.webkit.org/show_bug.cgi?id=330732</a>
</pre>

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

CI Results

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

Total 41 tests and 1975 subtests

Status Summary

Firefox

OK : 1[GitHub] 41[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 16[GitHub] 2470[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 2

Chrome

OK : 1
PASS: 10
FAIL: 6

Safari

OK : 1
PASS: 7
FAIL: 9

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.