Skip to content

Conversation

@sysrqb
Copy link
Contributor

@sysrqb sysrqb commented Sep 16, 2024

72e1a8685ace439f1209f8f449e73069a2398c89

Add a feature flag for supporting partitioned cookies
https://bugs.webkit.org/show_bug.cgi?id=279547
rdar://problem/135829408

Reviewed by NOBODY (OOPS!).

This patch adds a new preference and propagates preferences changes to the
Network process whenever a page is created or destroyed. This extends the
behavior we currently use for updating Blob URL partitioning state. This patch
doesn't introduce any changes in the current behavior.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/platform/network/NetworkStorageSession.cpp:
(WebCore::NetworkStorageSession::setOptInCookiePartitioningEnabled):
* Source/WebCore/platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::isOptInCookiePartitioningEnabled const):
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::setOptInCookiePartitioningEnabled const):
* Source/WebKit/NetworkProcess/NetworkProcess.h:
* Source/WebKit/NetworkProcess/NetworkProcess.messages.in:
* Source/WebKit/NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::setOptInCookiePartitioningEnabled):
* Source/WebKit/NetworkProcess/NetworkSession.h:
* Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h:
* Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.serialization.in:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addExistingWebPage):
(WebKit::WebProcessProxy::removeWebPage):
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::isOptInCookiePartitioningEnabled const):
(WebKit::WebsiteDataStore::propagateSettingUpdatesToNetworkProcess):
(WebKit::WebsiteDataStore::parameters):
(WebKit::WebsiteDataStore::updateBlobRegistryPartitioningState): Deleted.
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:

@sysrqb sysrqb self-assigned this Sep 16, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 17, 2024
@sysrqb sysrqb removed the merging-blocked Applied to prevent a change from being merged label Sep 17, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 17, 2024
@sysrqb sysrqb removed the merging-blocked Applied to prevent a change from being merged label Sep 17, 2024
@sysrqb sysrqb force-pushed the eng/Initial-Partitioned-Cookie-Support_debug branch from c3695e0 to 2f7cc78 Compare September 17, 2024 15:31
@sysrqb sysrqb added the skip-ews Applied to prevent a change from being run on EWS label Sep 17, 2024
Matthew Finkel and others added 4 commits September 17, 2024 09:00
https://bugs.webkit.org/show_bug.cgi?id=279547
rdar://problem/135829408

Reviewed by NOBODY (OOPS!).

This patch adds some initial tests that will cover support for opt-in
partitioned cookies. The test expectations will be updated in the future. This
patch also begins supporting partitioned cookies instead of blocking all
third-party cookies, when the feature is enabled. This patch doesn't introduce
any changes in the current behavior.

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-and-non-partitioned-cookie-js-not-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-and-non-partitioned-cookie-js-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-and-non-partitioned-httponly-cookie-http-header-not-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-and-non-partitioned-httponly-cookie-http-header-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-and-non-partitioned-httponly-cookie-js-not-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-and-non-partitioned-httponly-cookie-js-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-cookie-http-header-not-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-cookie-http-header-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-cookie-js-not-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-cookie-js-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-httponly-cookie-http-header-not-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-httponly-cookie-http-header-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-httponly-cookie-js-not-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/resources/iframe-set-partitioned-httponly-cookie-js-secure.html: Added.
* LayoutTests/http/tests/cookies/partitioned/set-partitioned-and-non-partitioned-cookie-expected.txt: Added.
* LayoutTests/http/tests/cookies/partitioned/set-partitioned-and-non-partitioned-cookie.html: Added.
* LayoutTests/http/tests/cookies/partitioned/set-partitioned-and-non-partitioned-cookie.https-expected.txt: Added.
* LayoutTests/http/tests/cookies/partitioned/set-partitioned-and-non-partitioned-cookie.https.html: Added.
* LayoutTests/http/tests/cookies/partitioned/set-partitioned-cookie-expected.txt: Added.
* LayoutTests/http/tests/cookies/partitioned/set-partitioned-cookie.html: Added.
* LayoutTests/http/tests/cookies/partitioned/set-partitioned-cookie.https-expected.txt: Added.
* LayoutTests/http/tests/cookies/partitioned/set-partitioned-cookie.https.html: Added.
* LayoutTests/http/tests/cookies/resources/cookie-utilities.js:
* LayoutTests/http/tests/cookies/resources/setCookies.cgi:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/platform/Cookie.h:
(WebCore::Cookie::isNull const):
(WebCore::Cookie::Cookie):
(WebCore::Cookie::isolatedCopy const):
(WebCore::Cookie::isolatedCopy):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp:
(WebKit::shouldBlockCookies):
(WebKit::WebCookieJar::cookies const):
(WebKit::WebCookieJar::setCookies):
(WebKit::WebCookieJar::cookiesEnabled):
(WebKit::WebCookieJar::cookieRequestHeaderFieldValue const):
(WebKit::WebCookieJar::getRawCookies const):
(WebKit::WebCookieJar::getCookiesAsync const):
(WebKit::WebCookieJar::setCookieAsync const):
@sysrqb sysrqb removed the skip-ews Applied to prevent a change from being run on EWS label Sep 17, 2024
@sysrqb sysrqb force-pushed the eng/Initial-Partitioned-Cookie-Support_debug branch from 2f7cc78 to 13460af Compare September 17, 2024 16:03
@sysrqb sysrqb changed the title fixup! Initial Partitioned Cookie Support https://bugs.webkit.org/show_bug.cgi?id=279547 rdar://problem/135829408 Initial Partitioned Cookie Support Sep 17, 2024
@sysrqb sysrqb added the Page Loading For bugs in page loading, including handling of network callbacks. label Sep 17, 2024
@sysrqb sysrqb changed the title Initial Partitioned Cookie Support Add a feature flag for supporting partitioned cookies Sep 19, 2024
@sysrqb sysrqb closed this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Page Loading For bugs in page loading, including handling of network callbacks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants