Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f93fe13c4e39cd71963a90e66272433242eb7d7a
      
https://github.com/WebKit/WebKit/commit/f93fe13c4e39cd71963a90e66272433242eb7d7a
  Author: Rupin Mittal <[email protected]>
  Date:   2026-03-28 (Sat, 28 Mar 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getAll-options.any-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getAll-options.any.serviceworker-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getAll-options.any.sharedworker-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getAll-options.any.worker-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.any-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.any.serviceworker-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.any.sharedworker-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.any.worker-expected.txt
    A Source/WebCore/Modules/indexeddb/IDBGetAllOptions.cpp
    M Source/WebCore/Modules/indexeddb/IDBGetAllOptions.h
    M Source/WebCore/Modules/indexeddb/IDBIndex.cpp
    M Source/WebCore/Modules/indexeddb/IDBIndex.h
    M Source/WebCore/Modules/indexeddb/IDBIndex.idl
    M Source/WebCore/Modules/mediastream/VideoTrackGenerator.cpp
    M Source/WebCore/Modules/mediastream/VideoTrackGenerator.h
    M Source/WebCore/Modules/streams/ReadableByteStreamController.cpp
    M Source/WebCore/Modules/streams/ReadableStream.cpp
    M Source/WebCore/Modules/streams/StreamTransferUtilities.cpp
    M Source/WebCore/Modules/webtransport/DatagramSink.cpp
    M Source/WebCore/Modules/webxr/WebXRWebGLSwapchain.cpp
    M Source/WebCore/Modules/webxr/WebXRWebGLSwapchain.h
    M Source/WebCore/Modules/webxr/XRWebGLLayerBacking.h
    M Source/WebCore/Modules/webxr/XRWebGLProjectionLayerBacking.cpp
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj

  Log Message:
  -----------
  [IndexedDB API] Support IDBGetAllOptions in IDBIndex::getAll()
https://bugs.webkit.org/show_bug.cgi?id=310862
rdar://173478298

Reviewed by Brady Eidson.

In https://commits.webkit.org/310051@main we added support for IDBGetAllOptions
in IDBIndex::getAllKeys(). Here we reuse the logic added there to add support in
IDBIndex::getAll() as well.

That commit added logic to getAllKeys() to parse the input in case its an
IDBGetAllOptions object. We factor out that logic into it's own function called
parseGetAllOptions() so that getAll() can use it as well. We put it in
IDBGetAllOptions.cpp because IDBObjectStore will need it later as well.

With that, we can use the parsed cursor direction instead of hardcoding "next".
The previous patch already introduced the logic to plumb this direction down 
from
IDBTransaction::requestGetAllIndexRecords to 
SQLiteIDBBackingStore::getAllIndexRecords.

Since doGetAll() and doGetAllKeys() are identical, we remove the duplicated code
by combining them into one function doGetAllShared().

Also fix unified source build issues.

* 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getAll-options.any-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getAll-options.any.serviceworker-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getAll-options.any.sharedworker-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getAll-options.any.worker-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.any-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.any.serviceworker-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.any.sharedworker-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.any.worker-expected.txt:
* Source/WebCore/Modules/indexeddb/IDBGetAllOptions.cpp: Added.
(WebCore::parseGetAllOptions):

Put the logic for parsing IDBGetAllOptions here.
https://w3c.github.io/IndexedDB/#create-a-request-to-retrieve-multiple-items 
(Step 9).

* Source/WebCore/Modules/indexeddb/IDBGetAllOptions.h:
* Source/WebCore/Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::doGetAllShared):

The implementation of doGetAll() and doGetAllKeys() is now shared here.

(WebCore::IDBIndex::getAll):
(WebCore::IDBIndex::getAllKeys):
(WebCore::IDBIndex::doGetAll): Deleted.
(WebCore::IDBIndex::doGetAllKeys): Deleted.

Use parseGetAllOptions() if we support IDBGetAllOptions.

* Source/WebCore/Modules/indexeddb/IDBIndex.h:
* Source/WebCore/Modules/indexeddb/IDBIndex.idl:
* Source/WebCore/Modules/mediastream/VideoTrackGenerator.cpp:
* Source/WebCore/Modules/mediastream/VideoTrackGenerator.h:
* Source/WebCore/Modules/streams/ReadableByteStreamController.cpp:
* Source/WebCore/Modules/streams/ReadableStream.cpp:
* Source/WebCore/Modules/streams/StreamTransferUtilities.cpp:
* Source/WebCore/Modules/webtransport/DatagramSink.cpp:
* Source/WebCore/Modules/webxr/WebXRWebGLSwapchain.cpp:
(WebCore::WebXRWebGLStaticImageSwapchain::context):
* Source/WebCore/Modules/webxr/WebXRWebGLSwapchain.h:
(WebCore::WebXRWebGLSwapchain::context): Deleted.
* Source/WebCore/Modules/webxr/XRWebGLLayerBacking.h:
* Source/WebCore/Modules/webxr/XRWebGLProjectionLayerBacking.cpp:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

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



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

Reply via email to