Closed Bug 2077629 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63214 - Mark scripts in frameless XML documents as already started

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Joey Arhar <jarhar@chromium.org> wrote:

Mark scripts in frameless XML documents as already started

XSLTProcessor.transformToDocument() creates a frameless Document and
populates it via Document::SetContent(). For XML output,
XMLDocumentParser and XMLDocumentParserRs do not create a script_runner_
when the document has no frame, so ScriptLoader::PrepareScript() is
never called during parsing. Because ShouldMarkScriptAlreadyStarted()
previously only checked for DOMParser, XMLHttpRequest, and fragment
parsing, script elements in XML-output transformToDocument() results
were left with already_started set to false and would execute if later
cloned or imported into an active document.

Update ShouldMarkScriptAlreadyStarted() in both XML parsers to also
check !document_->GetFrame() so that scripts in frameless XML documents
are marked already started upon creation.

Fixed: 565252325
Change-Id: Ia09b96f447c8d8857a7bd2385e87191efd4c3126

Reviewed-on: https://chromium-review.googlesource.com/8494597
WPT-Export-Revision: febc501705631b97268b698b31d5c78a077e349b

CI Results

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

Total 17 tests and 5 subtests

Status Summary

Firefox

OK : 1[GitHub] 6[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, 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: 8[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 9[GitHub] 203[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 205[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 2[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 3[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
FAIL: 9

Safari

OK : 1
PASS: 9

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

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