Changeset 251663 in webkit
- Timestamp:
- Oct 28, 2019 12:45:03 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 16 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r251662 r251663 1 2019-10-28 John Wilander <wilander@apple.com> 2 3 Storage Access API: Make the API work with the experimental 3rd-party cookie blocking 4 https://bugs.webkit.org/show_bug.cgi?id=203428 5 <rdar://problem/56626949> 6 7 Reviewed by Alex Christensen. 8 9 * http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking-database-expected.txt: Added. 10 * http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking-database.html: Added. 11 * http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking-expected.txt: Added. 12 * http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking.html: Added. 13 * http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking-database-expected.txt: Added. 14 * http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking-database.html: Added. 15 * http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking-expected.txt: Added. 16 * http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking.html: Added. 17 * http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies.html: 18 * http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-database-expected.txt: Added. 19 * http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-database.html: Added. 20 * http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-expected.txt: Added. 21 * http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie.html: Added. 22 * http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-without-cookie-database-expected.txt: Added. 23 * http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-without-cookie-database.html: Added. 24 * http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-without-cookie-expected.txt: Added. 25 * http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-without-cookie.html: Added. 26 1 27 2019-10-28 Alex Christensen <achristensen@webkit.org> 2 28 -
trunk/LayoutTests/http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies.html
r250589 r251663 1 <!-- webkit-test-runner [ useEphemeralSession=true ] -->2 1 <!DOCTYPE html> 3 2 <html> … … 26 25 function runTest() { 27 26 if (document.location.hash !== "#firstPartyCookieSet") { 28 setEnableFeature( false, function() {27 setEnableFeature(true, function() { 29 28 document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/has-storage-access-true-if-third-party-has-cookies.html#firstPartyCookieSet"; 30 29 }); -
trunk/Source/WebKit/ChangeLog
r251659 r251663 1 2019-10-28 John Wilander <wilander@apple.com> 2 3 Storage Access API: Make the API work with the experimental 3rd-party cookie blocking 4 https://bugs.webkit.org/show_bug.cgi?id=203428 5 <rdar://problem/56626949> 6 7 Reviewed by Alex Christensen. 8 9 Tests: http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking.html 10 http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking.html 11 http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie.html 12 http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-without-cookie.html 13 14 This patch adds Storage Access API support for the experimental 3rd-party cookie blocking that 15 landed in <https://trac.webkit.org/changeset/251467>. 16 17 There are three policies at play because it can be changed with the experimental setting: 18 1. The underlying cookie policy. 19 2. Shipping ITP. 20 3. The off by default, experimental 3rd-party cookie blocking. 21 22 To support them all, a CookieAccess enum was added to encode how the API should respond. 23 The enum has these values: 24 CannotRequest - This third-party cannot request storage access based on the current policy. 25 BasedOnCookiePolicy – This third-party should be treated according to the underlying cookie policy. 26 OnlyIfGranted – This third-party can and must get access through the Storage Access API. 27 28 Here's the truth table I used to work through the logic for both 29 document.hasStorageAccess() and document.requestStorageAccess(): 30 31 Access | Is | User | Has | 3rd-party | | 32 granted | prevalent | interaction | cookie | cookie block | RESULT | 33 ------------------------------------------------------------------- 34 | | | | | | false | 35 ------------------------------------------------------------------- 36 | | | | | true | false | 37 ------------------------------------------------------------------- 38 | | | | true | | true | 39 ------------------------------------------------------------------- 40 | | | | true | true | false | 41 ------------------------------------------------------------------- 42 | | | true | | | false | 43 ------------------------------------------------------------------- 44 | | | true | | true | false | 45 ------------------------------------------------------------------- 46 | | | true | true | | true | 47 ------------------------------------------------------------------- 48 | | | true | true | true | false | 49 ------------------------------------------------------------------- 50 | | true | !care | !care | !care | false | 51 ------------------------------------------------------------------- 52 | true | !care | !care | !care | !care | true | 53 ------------------------------------------------------------------- 54 55 * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: 56 (WebKit::ResourceLoadStatisticsDatabaseStore::cookieAccess const): 57 (WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess): 58 (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess): 59 (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener): 60 Extra checks removed since there's no harm in granting access 61 to a third-party that already has access by way of the underlying 62 cookie policy. Also, this is a temporary compatibility fix. 63 * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: 64 * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: 65 (WebKit::ResourceLoadStatisticsMemoryStore::cookieAccess const): 66 (WebKit::ResourceLoadStatisticsMemoryStore::hasStorageAccess): 67 (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess): 68 (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener): 69 Extra checks removed since there's no harm in granting access 70 to a third-party that already has access by way of the underlying 71 cookie policy. Also, this is a temporary compatibility fix. 72 * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: 73 * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: 74 (WebKit::ResourceLoadStatisticsStore::setIsThirdPartyCookieBlockingEnabled): 75 (WebKit::ResourceLoadStatisticsStore::isThirdPartyCookieBlockingEnabled const): 76 * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: 77 (WebKit::WebResourceLoadStatisticsStore::setIsThirdPartyCookieBlockingEnabled): 78 This is now the single path to control this setting in both ITP 79 and the network storage session. See comment below. 80 * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: 81 * NetworkProcess/NetworkProcess.cpp: 82 (WebKit::NetworkProcess::setShouldBlockThirdPartyCookiesForTesting): 83 * NetworkProcess/NetworkSession.cpp: 84 (WebKit::NetworkSession::setResourceLoadStatisticsEnabled): 85 (WebKit::NetworkSession::setIsThirdPartyCookieBlockingEnabled): 86 Restructured these so that they are initiated like the rest of the 87 parameters and only have a single path for changes so that a 88 reset to consistent state resets all the state. 89 * NetworkProcess/NetworkSession.h: 90 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 91 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): 92 1 93 2019-10-28 Alex Christensen <achristensen@webkit.org> 2 94 -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp
r251501 r251663 1194 1194 ensureResourceStatisticsForRegistrableDomain(subFrameDomain); 1195 1195 1196 switch (cookie TreatmentForOrigin(subFrameDomain)) {1197 case Cookie TreatmentResult::BlockAndPurge:1196 switch (cookieAccess(subFrameDomain)) { 1197 case CookieAccess::CannotRequest: 1198 1198 completionHandler(false); 1199 1199 return; 1200 case CookieTreatmentResult::Allow: 1201 // We should only return true if the context has asked for and been granted access. 1202 completionHandler(false); 1203 return; 1204 case CookieTreatmentResult::BlockAndKeep: 1205 // Do nothing. The below dispatch will complete the task. 1200 case CookieAccess::BasedOnCookiePolicy: 1201 RunLoop::main().dispatch([store = makeRef(store()), subFrameDomain = subFrameDomain.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable { 1202 store->hasCookies(subFrameDomain, [store = store.copyRef(), completionHandler = WTFMove(completionHandler)](bool result) mutable { 1203 store->statisticsQueue().dispatch([completionHandler = WTFMove(completionHandler), result] () mutable { 1204 completionHandler(result); 1205 }); 1206 }); 1207 }); 1208 return; 1209 case CookieAccess::OnlyIfGranted: 1210 // Handled below. 1206 1211 break; 1207 1212 }; … … 1221 1226 1222 1227 auto subFrameStatus = ensureResourceStatisticsForRegistrableDomain(subFrameDomain); 1223 auto cookieTreatmentResult = cookieTreatmentForOrigin(subFrameDomain);1224 1225 if (cookieTreatmentResult == CookieTreatmentResult::BlockAndPurge) {1228 1229 switch (cookieAccess(subFrameDomain)) { 1230 case CookieAccess::CannotRequest: 1226 1231 RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "Cannot grant storage access to %{private}s since its cookies are blocked in third-party contexts and it has not received user interaction as first-party.", subFrameDomain.string().utf8().data()); 1227 1232 completionHandler(StorageAccessStatus::CannotRequestAccess); 1228 1233 return; 1229 } 1230 1231 if (cookieTreatmentResult != CookieTreatmentResult::BlockAndKeep) { 1232 RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "No need to grant storage access to %{private}s since its cookies are not blocked in third-party contexts.", subFrameDomain.string().utf8().data()); 1234 case CookieAccess::BasedOnCookiePolicy: 1235 RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "No need to grant storage access to %{private}s since its cookies are not blocked in third-party contexts. Note that the underlying cookie policy may still block this third-party from setting cookies.", subFrameDomain.string().utf8().data()); 1233 1236 completionHandler(StorageAccessStatus::HasAccess); 1234 1237 return; 1238 case CookieAccess::OnlyIfGranted: 1239 // Handled below. 1240 break; 1235 1241 } 1236 1242 … … 1265 1271 1266 1272 if (domainInNeedOfStorageAccess == openerDomain) 1267 return;1268 1269 ensureResourceStatisticsForRegistrableDomain(domainInNeedOfStorageAccess);1270 if (cookieTreatmentForOrigin(domainInNeedOfStorageAccess) == CookieTreatmentResult::Allow)1271 1273 return; 1272 1274 … … 1789 1791 } 1790 1792 1791 ResourceLoadStatisticsDatabaseStore::CookieTreatmentResult ResourceLoadStatisticsDatabaseStore::cookieTreatmentForOrigin(const RegistrableDomain& domain) const1793 CookieAccess ResourceLoadStatisticsDatabaseStore::cookieAccess(const RegistrableDomain& domain) const 1792 1794 { 1793 1795 ASSERT(!RunLoop::isMain()); … … 1796 1798 if (statement.prepare() != SQLITE_OK 1797 1799 || statement.bindText(1, domain.string()) != SQLITE_OK) { 1798 RELEASE_LOG_ERROR_IF_ALLOWED(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::cookieTreatmentForOrigin failed to bind, error message: %{private}s", this, m_database.lastErrorMsg()); 1799 ASSERT_NOT_REACHED(); 1800 } 1801 1802 if (statement.step() != SQLITE_ROW) 1803 return CookieTreatmentResult::Allow; 1804 1800 RELEASE_LOG_ERROR_IF_ALLOWED(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::cookieAccess failed to bind, error message: %{private}s", this, m_database.lastErrorMsg()); 1801 ASSERT_NOT_REACHED(); 1802 } 1803 1804 bool hasNoEntry = statement.step() != SQLITE_ROW; 1805 if (hasNoEntry) { 1806 if (isThirdPartyCookieBlockingEnabled()) 1807 return CookieAccess::OnlyIfGranted; 1808 return CookieAccess::BasedOnCookiePolicy; 1809 } 1810 1805 1811 bool isPrevalent = !!statement.getColumnInt(0); 1806 if (!isPrevalent )1807 return Cookie TreatmentResult::Allow;1812 if (!isPrevalent && !isThirdPartyCookieBlockingEnabled()) 1813 return CookieAccess::BasedOnCookiePolicy; 1808 1814 1809 1815 bool hadUserInteraction = statement.getColumnInt(1) ? true : false; 1810 return hadUserInteraction ? CookieTreatmentResult::BlockAndKeep : CookieTreatmentResult::BlockAndPurge; 1811 } 1812 1816 if (!hadUserInteraction) 1817 return CookieAccess::CannotRequest; 1818 1819 return CookieAccess::OnlyIfGranted; 1820 } 1821 1813 1822 StorageAccessPromptWasShown ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt(unsigned requestingDomainID, const RegistrableDomain& firstPartyDomain) const 1814 1823 { -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h
r251501 r251663 194 194 bool predicateValueForDomain(WebCore::SQLiteStatement&, const RegistrableDomain&) const; 195 195 196 enum class CookieTreatmentResult { Allow, BlockAndKeep, BlockAndPurge }; 197 CookieTreatmentResult cookieTreatmentForOrigin(const RegistrableDomain&) const; 196 CookieAccess cookieAccess(const RegistrableDomain&) const; 198 197 199 198 void setPrevalentResource(const RegistrableDomain&, ResourceLoadPrevalence); -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp
r251547 r251663 213 213 } 214 214 215 CookieAccess ResourceLoadStatisticsMemoryStore::cookieAccess(const ResourceLoadStatistics& resourceStatistic) const 216 { 217 if (!isThirdPartyCookieBlockingEnabled() && !resourceStatistic.isPrevalentResource) 218 return CookieAccess::BasedOnCookiePolicy; 219 220 if (!resourceStatistic.hadUserInteraction) 221 return CookieAccess::CannotRequest; 222 223 return CookieAccess::OnlyIfGranted; 224 } 225 215 226 void ResourceLoadStatisticsMemoryStore::hasStorageAccess(const SubFrameDomain& subFrameDomain, const TopFrameDomain& topFrameDomain, Optional<FrameIdentifier> frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler) 216 227 { … … 218 229 219 230 auto& subFrameStatistic = ensureResourceStatisticsForRegistrableDomain(subFrameDomain); 220 // Return false if this domain cannot ask for storage access.221 if (shouldBlockAndPurgeCookies(subFrameStatistic)) {231 switch (cookieAccess(subFrameStatistic)) { 232 case CookieAccess::CannotRequest: 222 233 completionHandler(false); 223 234 return; 224 } 225 226 if (!shouldBlockAndKeepCookies(subFrameStatistic)) { 235 case CookieAccess::BasedOnCookiePolicy: 227 236 RunLoop::main().dispatch([store = makeRef(store()), subFrameDomain = subFrameDomain.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable { 228 237 store->hasCookies(subFrameDomain, [store = store.copyRef(), completionHandler = WTFMove(completionHandler)](bool result) mutable { … … 233 242 }); 234 243 return; 244 case CookieAccess::OnlyIfGranted: 245 // Handled below. 246 break; 235 247 } 236 248 … … 249 261 250 262 auto& subFrameStatistic = ensureResourceStatisticsForRegistrableDomain(subFrameDomain); 251 if (shouldBlockAndPurgeCookies(subFrameStatistic)) { 263 switch (cookieAccess(subFrameStatistic)) { 264 case CookieAccess::CannotRequest: 252 265 RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "Cannot grant storage access to %{public}s since its cookies are blocked in third-party contexts and it has not received user interaction as first-party.", subFrameDomain.string().utf8().data()); 253 266 completionHandler(StorageAccessStatus::CannotRequestAccess); 254 267 return; 255 } 256 257 if (!shouldBlockAndKeepCookies(subFrameStatistic)) { 258 RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "No need to grant storage access to %{public}s since its cookies are not blocked in third-party contexts.", subFrameDomain.string().utf8().data()); 268 case CookieAccess::BasedOnCookiePolicy: 269 RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "No need to grant storage access to %{public}s since its cookies are not blocked in third-party contexts. Note that the underlying cookie policy may still block this third-party from setting cookies.", subFrameDomain.string().utf8().data()); 259 270 completionHandler(StorageAccessStatus::HasAccess); 260 271 return; 272 case CookieAccess::OnlyIfGranted: 273 // Handled below. 274 break; 261 275 } 262 276 … … 284 298 285 299 if (domainInNeedOfStorageAccess == openerDomain) 286 return;287 288 auto& domainInNeedOfStorageAccessStatistic = ensureResourceStatisticsForRegistrableDomain(domainInNeedOfStorageAccess);289 auto cookiesBlockedAndPurged = shouldBlockAndPurgeCookies(domainInNeedOfStorageAccessStatistic);290 291 // The domain already has access if its cookies are not blocked.292 if (!cookiesBlockedAndPurged && !shouldBlockAndKeepCookies(domainInNeedOfStorageAccessStatistic))293 300 return; 294 301 -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h
r251391 r251663 98 98 void calculateAndSubmitTelemetry() const override; 99 99 100 CookieAccess cookieAccess(const ResourceLoadStatistics&) const; 100 101 void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<WebCore::FrameIdentifier>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) override; 101 102 void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, WebCore::FrameIdentifier, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessStatus)>&&) override; -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h
r251391 r251663 76 76 77 77 enum class OperatingDatesWindow : bool { Long, Short }; 78 enum class CookieAccess : uint8_t { CannotRequest, BasedOnCookiePolicy, OnlyIfGranted }; 78 79 79 80 // This is always constructed / used / destroyed on the WebResourceLoadStatisticsStore's statistics queue. … … 161 162 bool isDebugModeEnabled() const { return m_debugModeEnabled; }; 162 163 void setPrevalentResourceForDebugMode(const RegistrableDomain&); 164 void setIsThirdPartyCookieBlockingEnabled(bool enabled) { m_thirdPartyCookieBlockingEnabled = enabled; }; 165 bool isThirdPartyCookieBlockingEnabled() const { return m_thirdPartyCookieBlockingEnabled; }; 163 166 164 167 virtual void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<WebCore::FrameIdentifier>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) = 0; … … 268 271 bool m_debugLoggingEnabled { false }; 269 272 bool m_debugModeEnabled { false }; 273 bool m_thirdPartyCookieBlockingEnabled { false }; 270 274 bool m_dataRecordsBeingRemoved { false }; 271 275 ShouldIncludeLocalhost m_shouldIncludeLocalhost { ShouldIncludeLocalhost::Yes }; -
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
r251445 r251663 447 447 } 448 448 449 void WebResourceLoadStatisticsStore::setIsThirdPartyCookieBlockingEnabled(bool enabled) 450 { 451 ASSERT(RunLoop::isMain()); 452 453 if (m_networkSession) { 454 if (auto* storageSession = m_networkSession->networkStorageSession()) 455 storageSession->setIsThirdPartyCookieBlockingEnabled(enabled); 456 else 457 ASSERT_NOT_REACHED(); 458 } 459 460 postTask([this, enabled]() { 461 if (!m_statisticsStore) 462 return; 463 464 m_statisticsStore->setIsThirdPartyCookieBlockingEnabled(enabled); 465 }); 466 } 467 449 468 void WebResourceLoadStatisticsStore::didCreateNetworkProcess() 450 469 { -
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h
r251361 r251663 179 179 180 180 void hasCookies(const RegistrableDomain&, CompletionHandler<void(bool)>&&); 181 181 void setIsThirdPartyCookieBlockingEnabled(bool); 182 182 void didCreateNetworkProcess(); 183 183 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
r251659 r251663 1256 1256 void NetworkProcess::setShouldBlockThirdPartyCookiesForTesting(PAL::SessionID sessionID, bool enabled, CompletionHandler<void()>&& completionHandler) 1257 1257 { 1258 if (auto* networkS torageSession = storageSession(sessionID))1259 networkS torageSession->setIsThirdPartyCookieBlockingEnabled(enabled);1258 if (auto* networkSession = this->networkSession(sessionID)) 1259 networkSession->setIsThirdPartyCookieBlockingEnabled(enabled); 1260 1260 else 1261 1261 ASSERT_NOT_REACHED(); -
trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp
r250866 r251663 171 171 if (!m_resourceLoadStatisticsManualPrevalentResource.isEmpty()) 172 172 m_resourceLoadStatistics->setPrevalentResourceForDebugMode(m_resourceLoadStatisticsManualPrevalentResource, [] { }); 173 m_resourceLoadStatistics->setIsThirdPartyCookieBlockingEnabled(m_thirdPartyCookieBlockingEnabled); 173 174 } 174 175 … … 219 220 } 220 221 222 void NetworkSession::setIsThirdPartyCookieBlockingEnabled(bool enabled) 223 { 224 ASSERT(m_resourceLoadStatistics); 225 m_thirdPartyCookieBlockingEnabled = enabled; 226 if (m_resourceLoadStatistics) 227 m_resourceLoadStatistics->setIsThirdPartyCookieBlockingEnabled(m_thirdPartyCookieBlockingEnabled); 228 } 221 229 #endif // ENABLE(RESOURCE_LOAD_STATISTICS) 222 230 -
trunk/Source/WebKit/NetworkProcess/NetworkSession.h
r251213 r251663 98 98 void setShouldDowngradeReferrerForTesting(bool); 99 99 bool shouldDowngradeReferrer() const; 100 void set ShouldBlockThirdPartyCookiesForTesting(bool);100 void setIsThirdPartyCookieBlockingEnabled(bool); 101 101 #endif 102 102 void storeAdClickAttribution(WebCore::AdClickAttribution&&); … … 143 143 bool m_enableResourceLoadStatisticsLogTestingEvent; 144 144 bool m_downgradeReferrer { true }; 145 bool m_thirdPartyCookieBlockingEnabled { false }; 145 146 #endif 146 147 UniqueRef<AdClickAttributionManager> m_adClickAttribution; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r251467 r251663 1110 1110 m_enableResourceLoadStatisticsDebugMode = parameters.enableResourceLoadStatisticsDebugMode ? EnableResourceLoadStatisticsDebugMode::Yes : EnableResourceLoadStatisticsDebugMode::No; 1111 1111 m_resourceLoadStatisticsManualPrevalentResource = parameters.resourceLoadStatisticsManualPrevalentResource; 1112 storageSession->setIsThirdPartyCookieBlockingEnabled(parameters.enableThirdPartyCookieBlocking);1112 m_thirdPartyCookieBlockingEnabled = parameters.enableThirdPartyCookieBlocking; 1113 1113 setResourceLoadStatisticsEnabled(parameters.enableResourceLoadStatistics); 1114 1114 #endif -
trunk/Tools/ChangeLog
r251661 r251663 1 2019-10-28 John Wilander <wilander@apple.com> 2 3 Storage Access API: Make the API work with the experimental 3rd-party cookie blocking 4 https://bugs.webkit.org/show_bug.cgi?id=203428 5 <rdar://problem/56626949> 6 7 Reviewed by Alex Christensen. 8 9 * WebKitTestRunner/InjectedBundle/TestRunner.cpp: 10 (WTR::TestRunner::statisticsCallDidSetShouldDowngradeReferrerCallback): 11 (WTR::TestRunner::statisticsCallDidSetShouldBlockThirdPartyCookiesCallback): 12 Both of these were missing resets of their m_hasSet*Callback booleans. 13 1 14 2019-10-28 Jonathan Bedard <jbedard@apple.com> 2 15 -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
r251630 r251663 2208 2208 { 2209 2209 callTestRunnerCallback(StatisticsDidSetShouldDowngradeReferrerCallbackID); 2210 m_hasSetDowngradeReferrerCallback = false; 2210 2211 } 2211 2212 … … 2225 2226 { 2226 2227 callTestRunnerCallback(StatisticsDidSetShouldBlockThirdPartyCookiesCallbackID); 2228 m_hasSetBlockThirdPartyCookiesCallback = false; 2227 2229 } 2228 2230
Note: See TracChangeset
for help on using the changeset viewer.