Closed Bug 2079085 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63321 - Apply latest spec changes for createParserOptions

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])

Attachments

(1 file)

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 = {} from SetHTMLUnsafeOptions.sanitizer and
    ParseHTMLUnsafeOptions.sanitizer in IDL,
    and only populate sanitizer
    on the dictionary passed to createParserOptions when provided.
  • Update TrustedTypePolicy.createParserOptions and
    CreateParserOptionsCallback to accept optional
    SetHTMLUnsafeOptions and variadic any... args, passing
    "TrustedHTMLParserOptions" and the
    sink name when invoked on the default policy.
  • Require default policy createParserOptions vetting when author
    supplied parser options specify runScripts: true or a non-empty
    sanitizer, even
    when the input is already a TrustedHTML. (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
    TrustedTypesCheckForFragment in Document.parseHTMLUnsafe.
  • Bypass createParserOptions and ignore sanitization in XML
    documents,
    always requiring TrustedHTML for 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}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Attached file Notable wpt changes —

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

(See attachment for full changes)

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.

Attachment

General

Created:
Updated:
Size: