[webkit-changes] [WebKit/WebKit] d17545: Implement FileSystemWritableFileStream methods

Sihui noreply at github.com
Thu Jan 30 13:27:41 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d1754516e002176f1e296df7894651446ed8b043
      https://github.com/WebKit/WebKit/commit/d1754516e002176f1e296df7894651446ed8b043
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2025-01-30 (Thu, 30 Jan 2025)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-IndexedDB.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-Error.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-frames.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-windows.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-workers.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-remove.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-remove.https.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-iteration.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-removeEntry.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemFileHandle-getFile.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemFileHandle-getFile.https.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemFileHandle-move.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemFileHandle-move.https.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemWritableFileStream-write.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemWritableFileStream-write.https.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemWritableFileStream.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemWritableFileStream.https.any.worker-expected.txt
    M LayoutTests/storage/filesystemaccess/resources/writable-file-stream-seek.js
    M LayoutTests/storage/filesystemaccess/resources/writable-file-stream-truncate.js
    M LayoutTests/storage/filesystemaccess/resources/writable-file-stream-write.js
    M LayoutTests/storage/filesystemaccess/writable-file-stream-seek-expected.txt
    M LayoutTests/storage/filesystemaccess/writable-file-stream-truncate-expected.txt
    M LayoutTests/storage/filesystemaccess/writable-file-stream-write-expected.txt
    M Source/WebCore/Modules/filesystemaccess/FileSystemWritableFileStream.cpp
    M Source/WebCore/Modules/filesystemaccess/FileSystemWritableFileStream.h
    M Source/WebCore/Modules/filesystemaccess/FileSystemWritableFileStream.idl
    M Source/WebCore/Modules/streams/WritableStream.h
    M Source/WebCore/Modules/streams/WritableStream.idl
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/bindings/js/InternalWritableStream.cpp
    M Source/WebCore/bindings/js/InternalWritableStream.h
    M Source/WebCore/bindings/js/JSDOMPromiseDeferred.h
    A Source/WebCore/bindings/js/JSWritableStreamCustom.cpp

  Log Message:
  -----------
  Implement FileSystemWritableFileStream methods
https://bugs.webkit.org/show_bug.cgi?id=284735
rdar://141528850

Reviewed by Youenn Fablet.

Spec: https://fs.spec.whatwg.org/#dom-filesystemwritablefilestream-write
      https://fs.spec.whatwg.org/#dom-filesystemwritablefilestream-seek
      https://fs.spec.whatwg.org/#dom-filesystemwritablefilestream-truncate

* LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-move.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-IndexedDB.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-Error.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-frames.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-windows.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-postMessage-workers.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-remove.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemBaseHandle-remove.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-iteration.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-removeEntry.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemFileHandle-getFile.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemFileHandle-getFile.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemFileHandle-move.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemFileHandle-move.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemWritableFileStream-write.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemWritableFileStream-write.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemWritableFileStream.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemWritableFileStream.https.any.worker-expected.txt:
* LayoutTests/storage/filesystemaccess/resources/writable-file-stream-seek.js:
(async checkFileContent):
(async runWriterTest):
(async runTest):
(async test):
* LayoutTests/storage/filesystemaccess/resources/writable-file-stream-truncate.js:
(async runWriterTest):
(async runTest):
(async test):
* LayoutTests/storage/filesystemaccess/resources/writable-file-stream-write.js:
(async runTest):
(async test):
* LayoutTests/storage/filesystemaccess/writable-file-stream-seek-expected.txt:
* LayoutTests/storage/filesystemaccess/writable-file-stream-truncate-expected.txt:
* LayoutTests/storage/filesystemaccess/writable-file-stream-write-expected.txt:
* Source/WebCore/Modules/filesystemaccess/FileSystemWritableFileStream.cpp:
(WebCore::convertChunk):
(WebCore::FileSystemWritableFileStream::write):
(WebCore::FileSystemWritableFileStream::seek):
(WebCore::FileSystemWritableFileStream::truncate):
* Source/WebCore/Modules/filesystemaccess/FileSystemWritableFileStream.h:
(isType):
* Source/WebCore/Modules/filesystemaccess/FileSystemWritableFileStream.idl:
* Source/WebCore/Modules/streams/WritableStream.h:
(WebCore::WritableStream::type const):
* Source/WebCore/Modules/streams/WritableStream.idl:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/InternalWritableStream.cpp:
(WebCore::InternalWritableStream::writeChunkForBingings):
* Source/WebCore/bindings/js/InternalWritableStream.h:
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.h:
(WebCore::DOMPromiseDeferredBase::rejectWithCallback):
* Source/WebCore/bindings/js/JSWritableStreamCustom.cpp: Copied from Source/WebCore/Modules/filesystemaccess/FileSystemWritableFileStream.idl.
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

Canonical link: https://commits.webkit.org/289579@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list