[webkit-changes] [WebKit/WebKit] 5e29d9: Add the change event for the Cookie Store API

Rupin Mittal noreply at github.com
Sat Aug 12 19:54:02 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5e29d991fbf6dd8193d81b5fd706b2224ed7caf2
      https://github.com/WebKit/WebKit/commit/5e29d991fbf6dd8193d81b5fd706b2224ed7caf2
  Author: Rupin Mittal <rupin at apple.com>
  Date:   2023-08-12 (Sat, 12 Aug 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/cookie-store/change_eventhandler_for_document_cookie.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/cookie-store/change_eventhandler_for_http_cookie_and_set_cookie_headers.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_event_basic.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_event_delete.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_event_overwrite.https.window-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/cookie-store/httponly_cookies.https.window-expected.txt
    A LayoutTests/platform/mac-monterey/imported/w3c/web-platform-tests/cookie-store/change_eventhandler_for_document_cookie.https.window-expected.txt
    A LayoutTests/platform/mac-monterey/imported/w3c/web-platform-tests/cookie-store/change_eventhandler_for_http_cookie_and_set_cookie_headers.https.window-expected.txt
    M Source/WebCore/Modules/cookie-store/CookieChangeEvent.idl
    M Source/WebCore/Modules/cookie-store/CookieListItem.h
    M Source/WebCore/Modules/cookie-store/CookieStore.cpp
    M Source/WebCore/Modules/cookie-store/CookieStore.h
    M Source/WebCore/loader/CookieJar.h

  Log Message:
  -----------
  Add the change event for the Cookie Store API
https://bugs.webkit.org/show_bug.cgi?id=260028

Reviewed by Chris Dumez.

CookieStore now subclasses CookieChangeListener so that when an
event listener changes, it can register (or unregister) itself
as a listener. If it is registered and a cookie changed, the
relevant function (cookiesAdded or cookiesDeleted) will be called
to fire a change event.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/cookie-store/change_eventhandler_for_document_cookie.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/cookie-store/change_eventhandler_for_http_cookie_and_set_cookie_headers.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_event_basic.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_event_delete.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_event_overwrite.https.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/cookie-store/httponly_cookies.https.window-expected.txt:
* LayoutTests/platform/mac-monterey/imported/w3c/web-platform-tests/cookie-store/change_eventhandler_for_document_cookie.https.window-expected.txt: Added.
* LayoutTests/platform/mac-monterey/imported/w3c/web-platform-tests/cookie-store/change_eventhandler_for_http_cookie_and_set_cookie_headers.https.window-expected.txt: Added.
* Source/WebCore/Modules/cookie-store/CookieChangeEvent.idl:
* Source/WebCore/Modules/cookie-store/CookieListItem.h:
(WebCore::CookieListItem::CookieListItem):
* Source/WebCore/Modules/cookie-store/CookieStore.cpp:
(WebCore::CookieStore::CookieStore):
(WebCore::CookieStore::get):
(WebCore::CookieStore::getAll):
(WebCore::CookieStore::set):
(WebCore::CookieStore::cookiesAdded):
(WebCore::CookieStore::cookiesDeleted):
(WebCore::CookieStore::stop):
(WebCore::CookieStore::virtualHasPendingActivity const):
(WebCore::CookieStore::eventListenersDidChange):
* Source/WebCore/Modules/cookie-store/CookieStore.h:
* Source/WebCore/loader/CookieJar.h:

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




More information about the webkit-changes mailing list