Closed Bug 1978788 Opened 19 days ago Closed 13 days ago

[wpt-sync] Sync PR 53917 - Patching: parse in fragment mode but inserting directly to target

Categories

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

task

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Noam Rosenthal <nrosenthal@chromium.org> wrote:

Patching: parse in fragment mode but inserting directly to target

Fragment parsing mode
(https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-parsing-algorithm)
is a mode that sets up the parser correctly when parsing into a fragment
and we know the target of the fragment.

When patching, we use the same mechanism of setting up the parser, but
instead of parsing into a fragment we parse directly into the context
node.

Note that the fragment parsing algorithm spec doesn't actually require
a fragment as a parameter, it is used in the implementation as a way
to avoid creating an intermediate root element. This CL modifies the
places in the parser that expect a fragment root to expect the target
of fragment parsing instead, which may be any container node.

Bug: 431374376
Change-Id: If082086d5e999f159894f2506c9dc49d2ea1c7ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6772497
Commit-Queue: Noam Rosenthal \<nrosenthal@google.com>
Reviewed-by: Philip Jägenstedt \<foolip@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1490668}

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

CI Results

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

Total 4 tests and 3 subtests

Status Summary

Firefox

OK : 4
FAIL : 6

Chrome

OK : 3
PASS : 4
FAIL : 1
ERROR: 1

Safari

OK : 4
FAIL : 6

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

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