Closed Bug 1984951 Opened 7 months ago Closed 7 months ago

[wpt-sync] Sync PR 54493 - FileAPI: Add IDL defaults to Blob.slice

Categories

(Core :: DOM: File, task, P4)

task

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Suyeon Ji <zeesuyeon@gmail.com> wrote:

FileAPI: Add IDL defaults to Blob.slice

This patch sets default values on Blob.slice parameters. The current
blink implementation signature uses non-optional int64_t, so when
JavaScript passes undefined, the binding converts it to 0. As a result,
calls like
new Blob(["abcd"]).slice(undefined, undefined,"text/plain")
ended up with start=0 and end=0, returning an empty Blob
instead of the full range.

With these defaults, the overload for missing arguments is no longer
needed and has been removed.

WebKit specifies IDL defaults and Firefox uses optional parameters to
provide this behavior.

https://www.w3.org/TR/FileAPI

Bug: 423048785
Change-Id: I1abbbce110597644081aacbbd4c99afe90ce69f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6840976
Reviewed-by: Jinho Bang \<zino@chromium.org>
Commit-Queue: Jinho Bang \<zino@chromium.org>
Reviewed-by: Mingyu Lei \<leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1505714}

Component: web-platform-tests → DOM: File
Product: Testing → Core

CI Results

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

Total 19 tests and 8 subtests

Status Summary

Firefox

OK : 2[GitHub] 17[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-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
PASS: 2[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 300[GitHub] 494[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-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]

Chrome

OK : 2
PASS: 296
FAIL: 4

Safari

OK : 2
PASS: 288
FAIL: 12

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

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