[wpt-sync] Sync PR 63321 - Apply latest spec changes for createParserOptions
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox160 fixed)
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
|
194.25 KB,
text/plain
|
Details |
Sync web-platform-tests PR 63321 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63321
Details from upstream follow.
Noam Rosenthal <nrosenthal@chromium.org> wrote:
Apply latest spec changes for createParserOptions
This aligns with:
Key changes:
- Remove default
= {}fromSetHTMLUnsafeOptions.sanitizerand
ParseHTMLUnsafeOptions.sanitizerin IDL,
and only populatesanitizer
on the dictionary passed tocreateParserOptionswhen provided.- Update
TrustedTypePolicy.createParserOptionsand
CreateParserOptionsCallbackto accept optional
SetHTMLUnsafeOptionsand variadicany... args, passing
"TrustedHTMLParserOptions"and the
sink name when invoked on the default policy.- Require default policy
createParserOptionsvetting when author
supplied parser options specifyrunScripts: trueor a non-empty
sanitizer, even
when the input is already aTrustedHTML. (This is a breaking
change! but still protected by the flag)- Allow any
TrustedHTMLParserOptions(even without a sanitizer) to
satisfy Trusted Types enforcement for HTML fragment sinks, and use
TrustedTypesCheckForFragmentinDocument.parseHTMLUnsafe.- Bypass
createParserOptionsand ignore sanitization in XML
documents,
always requiringTrustedHTMLfor XML fragment sinks.Bug: 491743369
Change-Id: Ia0b35e3f8720dc318aacafc117098fb3db508b30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8496967
Reviewed-by: Daniel Vogelheim \<vogelheim@chromium.org>
Commit-Queue: Noam Rosenthal \<nrosenthal@google.com>
Cr-Commit-Position: refs/heads/main@{#1712499}
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=101161
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 77 tests and 43 subtests
Status Summary
Firefox
OK : 9[GitHub] 76[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: 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 75[GitHub] 2047[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]
FAIL: 459[GitHub] 1874[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]
Chrome
OK : 9
PASS: 335
FAIL: 199
Safari
OK : 9
PASS: 71
FAIL: 463
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
Firefox-only Failures
- /sanitizer-api/sethtml-with-trustedtypes.tentative.html [wpt.fyi]
- Element.parseHTMLUnsafe: createParserOptions can remove a sanitizer:
FAIL
- Element.parseHTMLUnsafe: createParserOptions can remove a sanitizer:
(See attachment for full changes)
Comment 4•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a158e7688437
https://hg.mozilla.org/mozilla-central/rev/bc672233c007
Description
•