[webkit-changes] [WebKit/WebKit] 9ae242: Implement the get(name) function in Cookie Store API

Rupin Mittal noreply at github.com
Tue Jul 11 13:27:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9ae242a9a2f095eed7c17d453874a733bd57ce92
      https://github.com/WebKit/WebKit/commit/9ae242a9a2f095eed7c17d453874a733bd57ce92
  Author: Rupin Mittal <rupin at apple.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_get_arguments.https.any-expected.txt
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Modules/cookie-store/CookieListItem.idl
    M Source/WebCore/Modules/cookie-store/CookieStore.cpp
    M Source/WebCore/Modules/cookie-store/CookieStore.h
    M Source/WebCore/Modules/cookie-store/CookieStore.idl
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/loader/CookieJar.cpp
    M Source/WebCore/loader/CookieJar.h
    M Source/WebCore/page/LocalDOMWindow.cpp
    M Source/WebCore/platform/network/NetworkStorageSession.h
    M Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
    M Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
    M Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp
    M Source/WebKit/WebProcess/WebPage/WebCookieJar.h

  Log Message:
  -----------
  Implement the get(name) function in Cookie Store API
https://bugs.webkit.org/show_bug.cgi?id=259071

Reviewed by Chris Dumez.

CookieStore (on the WebProcess side), will make an IPC to the
Network Process (via WebCookieJar) and will pass the relevant
CookieStoreGetOptions through the IPC. The Network process will
retrieve the stored cookies, filter them using the provided
options and will asynchronously resolve the promise with a
vector of the filtered cookies. In the get(name) function, the
promise is resolved with only the first cookie in the vector
(if there are any at all).

* Source/WebCore/Headers.cmake:
* Source/WebCore/Modules/cookie-store/CookieListItem.idl:
* Source/WebCore/Modules/cookie-store/CookieStore.cpp:
(WebCore::CookieStore::create):
(WebCore::CookieStore::CookieStore):
(WebCore::CookieStore::get):
(WebCore::CookieStore::activeDOMObjectName const):
(WebCore::CookieStore::scriptExecutionContext const):
* Source/WebCore/Modules/cookie-store/CookieStore.h:
* Source/WebCore/Modules/cookie-store/CookieStore.idl:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/loader/CookieJar.h:
* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::cookieStore):
* Source/WebCore/platform/network/NetworkStorageSession.h:
* Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::vectorOfCookiesForSession const):
(WebCore::NetworkStorageSession::vectorOfCookiesForDOM const):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::cookiesForDOMAsync):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp:
(WebKit::WebCookieJar::getCookiesAsync const):
* Source/WebKit/WebProcess/WebPage/WebCookieJar.h:

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




More information about the webkit-changes mailing list