Closed Bug 2079488 Opened 1 month ago Closed 1 month ago

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

Categories

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

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Ahmad Saleem <ahmad.saleem792+github@gmail.com> wrote:

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

WebKit export from bug: DataTransfer treats any format starting with "text/plain" (e.g. "text/plainfoo") as text/plain

<pre>
DataTransfer treats any format starting with "text/plain" (e.g. "text/plainfoo") as text/plain

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

normalizeType() mapped every format that started with "text/plain" to text/plain,
because the check had no ";". As a result, setData("text/plainfoo", ...) overwrote
the text/plain item, getData("text/plainfoo") returned the text/plain data, and
clearData("text/plainfoo") removed text/plain.

The HTML spec only normalizes the exact strings "text" and "url". This patch
matches "text/plain" exactly, or requires a ";" after "text/plain", the same way
the text/uri-list and text/html checks next to it already do. This matches Blink.
Formats with MIME parameters, such as "text/plain;charset=utf-8", still map to
text/plain.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=326468">https://bugs.webkit.org/show_bug.cgi?id=326468</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/322954@main">https://commits.webkit.org/322954@main</a>
</pre>

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 9 tests and 2 subtests

Status Summary

Firefox

OK : 1[GitHub] 9[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: 10[GitHub] 33[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: 10

Chrome

OK : 1
PASS: 10

Safari

OK : 1
PASS: 1
FAIL: 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.