Skip to content

Conversation

@RupinMittal
Copy link
Contributor

@RupinMittal RupinMittal commented Aug 10, 2023

5e29d99

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

aafa456

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ⏳ 🧪 api-mac ✅ 🛠 gtk
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🧪 gtk-wk2
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2
✅ 🛠 tv-sim
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@RupinMittal RupinMittal self-assigned this Aug 10, 2023
@RupinMittal RupinMittal added the WebKit API For issues and bugs in the Web Kit public embedding APIs label Aug 10, 2023
@RupinMittal RupinMittal requested a review from cdumez August 10, 2023 17:36
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 10, 2023
@RupinMittal RupinMittal removed the merging-blocked Applied to prevent a change from being merged label Aug 10, 2023
@RupinMittal RupinMittal marked this pull request as ready for review August 10, 2023 21:48
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 10, 2023
@RupinMittal RupinMittal removed the merging-blocked Applied to prevent a change from being merged label Aug 10, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 11, 2023
@cdumez
Copy link
Contributor

cdumez commented Aug 11, 2023

Please look into EWS failures.

@RupinMittal RupinMittal removed the merging-blocked Applied to prevent a change from being merged label Aug 11, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 11, 2023
@RupinMittal RupinMittal removed the merging-blocked Applied to prevent a change from being merged label Aug 11, 2023
Copy link
Contributor

@cdumez cdumez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming the bots are happy.

@RupinMittal RupinMittal added the merge-queue Applied to send a pull request to merge-queue label Aug 13, 2023
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
@webkit-commit-queue
Copy link
Collaborator

Committed 266850@main (5e29d99): https://commits.webkit.org/266850@main

Reviewed commits have been landed. Closing PR #16568 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 5e29d99 into WebKit:main Aug 13, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebKit API For issues and bugs in the Web Kit public embedding APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants