Changeset 283397 in webkit
- Timestamp:
- Oct 1, 2021, 1:45:06 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 10 edited
- 2 copied
- 2 moved
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-expected.txt (moved) (moved from trunk/LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction-expected.txt ) (2 diffs)
-
LayoutTests/http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.py (copied) (copied from trunk/LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py ) (3 diffs)
-
LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-expected.txt (copied) (copied from trunk/LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction-expected.txt ) (1 diff)
-
LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py (moved) (moved from trunk/LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py ) (4 diffs)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/fetch/connection-pool/network-partition-key-expected.txt (modified) (1 diff)
-
LayoutTests/platform/gtk/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/connection-pool (deleted)
-
LayoutTests/platform/wpe/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/workers/service/server/SWServer.cpp (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h (modified) (1 diff)
-
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r283395 r283397 1 2021-10-01 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, reverting r283274. 4 5 Broke HSTS.CrossOriginRedirect API test 6 7 Reverted changeset: 8 9 "Use isolated NSURLSessions for each first party registrable 10 domain" 11 https://bugs.webkit.org/show_bug.cgi?id=230750 12 https://commits.webkit.org/r283274 13 1 14 2021-10-01 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/LayoutTests/http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-expected.txt
r283396 r283397 1 Tests that the session is switched upon top frame navigation to a prevalent resource without user interaction.1 Tests that the session is not switched upon top frame navigation to a prevalent resource without user interaction. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". … … 6 6 PASS Should have and has the session cookie. 7 7 PASS Should have and has the persistent cookie. 8 PASS Origin has isolated session.8 PASS Origin has no isolated session. 9 9 PASS successfullyParsed is true 10 10 -
trunk/LayoutTests/http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.py
r283396 r283397 17 17 <body onload="runTest()"> 18 18 <script> 19 description("Tests that the session is switched upon top frame navigation to a prevalent resource without user interaction.");19 description("Tests that the session is not switched upon top frame navigation to a prevalent resource without user interaction."); 20 20 jsTestIsAsync = true; 21 21 … … 74 74 runTest(); 75 75 }); 76 break;77 76 case "#step1": 78 77 setSessionCookie(); 79 78 setPersistentCookie(); 80 79 checkCookies(true, true); 81 if (testRunner.hasStatisticsIsolatedSession(prevalentOrigin)) 82 testPassed("Origin has isolated session."); 83 else { 84 testFailed("Origin has no isolated session."); 80 if (testRunner.hasStatisticsIsolatedSession(prevalentOrigin)) { 81 testFailed("Origin has isolated session."); 85 82 setEnableFeature(false, finishJSTest); 86 } 87 document.location.href = nonPrevalentOrigin + "/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py#step2"; 83 } else 84 testPassed("Origin has no isolated session."); 85 document.location.href = nonPrevalentOrigin + "/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.py#step2"; 88 86 break; 89 87 case "#step2": … … 100 98 break; 101 99 case "#step3": 102 document.location.href = prevalentOrigin + "/resourceLoadStatistics/ switch-session-on-navigation-to-prevalent-without-interaction.py#step4";100 document.location.href = prevalentOrigin + "/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.py#step4"; 103 101 break; 104 102 case "#step4": 105 103 checkCookies(true, true); 106 104 if (testRunner.hasStatisticsIsolatedSession(prevalentOrigin)) 107 test Passed("Origin has isolated session.");105 testFailed("Origin has isolated session."); 108 106 else 109 test Failed("Origin has no isolated session.");107 testPassed("Origin has no isolated session."); 110 108 setEnableFeature(false, finishJSTest); 111 109 break; -
trunk/LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-expected.txt
r283396 r283397 1 Tests that the session is switched upon top frame navigation to a prevalent resource with outuser interaction.1 Tests that the session is switched upon top frame navigation to a prevalent resource with user interaction. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -
trunk/LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py
r283396 r283397 17 17 <body onload="runTest()"> 18 18 <script> 19 description("Tests that the session is switched upon top frame navigation to a prevalent resource with outuser interaction.");19 description("Tests that the session is switched upon top frame navigation to a prevalent resource with user interaction."); 20 20 jsTestIsAsync = true; 21 21 … … 67 67 if (document.location.origin !== prevalentOrigin) 68 68 testFailed("Test is not starting out on " + prevalentOrigin + "."); 69 70 69 setEnableFeature(true, function () { 71 70 if (testRunner.isStatisticsPrevalentResource(prevalentOrigin)) … … 76 75 break; 77 76 case "#step1": 78 setSessionCookie(); 79 setPersistentCookie(); 80 checkCookies(true, true); 81 if (testRunner.hasStatisticsIsolatedSession(prevalentOrigin)) 82 testPassed("Origin has isolated session."); 83 else { 84 testFailed("Origin has no isolated session."); 85 setEnableFeature(false, finishJSTest); 86 } 87 document.location.href = nonPrevalentOrigin + "/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-without-interaction.py#step2"; 77 testRunner.setStatisticsHasHadUserInteraction(prevalentOrigin, true, function() { 78 setSessionCookie(); 79 setPersistentCookie(); 80 checkCookies(true, true); 81 if (testRunner.hasStatisticsIsolatedSession(prevalentOrigin)) { 82 testFailed("Origin has isolated session."); 83 setEnableFeature(false, finishJSTest); 84 } else 85 testPassed("Origin has no isolated session."); 86 document.location.href = nonPrevalentOrigin + "/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py#step2"; 87 }); 88 88 break; 89 89 case "#step2": … … 100 100 break; 101 101 case "#step3": 102 document.location.href = prevalentOrigin + "/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with out-interaction.py#step4";102 document.location.href = prevalentOrigin + "/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py#step4"; 103 103 break; 104 104 case "#step4": -
trunk/LayoutTests/imported/w3c/ChangeLog
r283377 r283397 1 2021-10-01 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, reverting r283274. 4 5 Broke HSTS.CrossOriginRedirect API test 6 7 Reverted changeset: 8 9 "Use isolated NSURLSessions for each first party registrable 10 domain" 11 https://bugs.webkit.org/show_bug.cgi?id=230750 12 https://commits.webkit.org/r283274 13 1 14 2021-10-01 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/connection-pool/network-partition-key-expected.txt
r283274 r283397 1 1 2 2 3 PASS With credentials 4 PASS Without credentials 5 PASS Cross-site resources with credentials 6 PASS Cross-site resources without credentials 7 PASS Iframes 8 PASS Workers 9 PASS Workers with cross-site resources 3 FAIL With credentials promise_test: Unhandled rejection with value: "assert_equals: Socket unexpectedly reused expected \"ok\" but got \"Multiple partition IDs used on a socket\"" 4 FAIL Without credentials promise_test: Unhandled rejection with value: "assert_equals: Socket unexpectedly reused expected \"ok\" but got \"Multiple partition IDs used on a socket\"" 5 FAIL Cross-site resources with credentials promise_test: Unhandled rejection with value: "assert_equals: Socket unexpectedly reused expected \"ok\" but got \"Multiple partition IDs used on a socket\"" 6 FAIL Cross-site resources without credentials promise_test: Unhandled rejection with value: "assert_equals: Socket unexpectedly reused expected \"ok\" but got \"Multiple partition IDs used on a socket\"" 7 FAIL Iframes promise_test: Unhandled rejection with value: "assert_equals: Socket unexpectedly reused expected \"ok\" but got \"Multiple partition IDs used on a socket\"" 8 FAIL Workers promise_test: Unhandled rejection with value: "assert_equals: Socket unexpectedly reused expected \"ok\" but got \"Multiple partition IDs used on a socket\"" 9 FAIL Workers with cross-site resources promise_test: Unhandled rejection with value: "assert_equals: Socket unexpectedly reused expected \"ok\" but got \"Multiple partition IDs used on a socket\"" 10 10 FAIL CSP sandbox promise_test: Unhandled rejection with value: "assert_equals: Socket unexpectedly reused expected \"ok\" but got \"Multiple partition IDs used on a socket\"" 11 11 FAIL about:blank from opaque origin iframe promise_test: Unhandled rejection with value: "assert_equals: Socket unexpectedly reused expected \"ok\" but got \"Multiple partition IDs used on a socket\"" -
trunk/LayoutTests/platform/gtk/TestExpectations
r283274 r283397 896 896 897 897 webkit.org/b/209727 fast/forms/placeholder-content-line-height.html [ ImageOnlyFailure ] 898 899 webkit.org/b/210487 http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py [ Failure ] 898 900 899 901 webkit.org/b/210796 http/tests/resourceLoadStatistics/standalone-web-application-exempt-from-website-data-deletion.html [ Failure ] -
trunk/LayoutTests/platform/wpe/TestExpectations
r283358 r283397 601 601 webkit.org/b/210262 fast/selectors/text-field-selection-stroke-color.html [ ImageOnlyFailure ] 602 602 webkit.org/b/210262 fast/selectors/text-field-selection-text-shadow.html [ ImageOnlyFailure ] 603 604 webkit.org/b/210487 http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py [ Failure ] 603 605 604 606 webkit.org/b/211563 fast/text-indicator/text-indicator-estimated-color-with-implicit-newline.html [ Failure ] -
trunk/Source/WebCore/ChangeLog
r283394 r283397 1 2021-10-01 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, reverting r283274. 4 5 Broke HSTS.CrossOriginRedirect API test 6 7 Reverted changeset: 8 9 "Use isolated NSURLSessions for each first party registrable 10 domain" 11 https://bugs.webkit.org/show_bug.cgi?id=230750 12 https://commits.webkit.org/r283274 13 1 14 2021-10-01 Kate Cheney <katherine_cheney@apple.com> 2 15 -
trunk/Source/WebCore/workers/service/server/SWServer.cpp
r283295 r283397 442 442 URL static inline originURL(const SecurityOrigin& origin) 443 443 { 444 return URL(URL(), origin.data().toString()); 444 URL url; 445 url.setProtocol(origin.protocol()); 446 url.setHost(origin.host()); 447 url.setPort(origin.port()); 448 return url; 445 449 } 446 450 -
trunk/Source/WebKit/ChangeLog
r283396 r283397 1 2021-10-01 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, reverting r283274. 4 5 Broke HSTS.CrossOriginRedirect API test 6 7 Reverted changeset: 8 9 "Use isolated NSURLSessions for each first party registrable 10 domain" 11 https://bugs.webkit.org/show_bug.cgi?id=230750 12 https://commits.webkit.org/r283274 13 1 14 2021-10-01 Brent Fulgham <bfulgham@apple.com> 2 15 -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h
r283274 r283397 70 70 SessionWrapper sessionWithCredentialStorage; 71 71 SessionWrapper sessionWithoutCredentialStorage; 72 MonotonicTime lastUsed;72 WallTime lastUsed; 73 73 }; 74 74 -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r283376 r283397 97 97 CFStringRef const WebKit2HTTPProxyDefaultsKey = static_cast<CFStringRef>(@"WebKit2HTTPProxy"); 98 98 CFStringRef const WebKit2HTTPSProxyDefaultsKey = static_cast<CFStringRef>(@"WebKit2HTTPSProxy"); 99 100 constexpr unsigned maxNumberOfIsolatedSessions { 10 }; 99 101 100 102 static NSURLSessionResponseDisposition toNSURLSessionResponseDisposition(WebCore::PolicyAction disposition) … … 1425 1427 if (isParentProcessAFullWebBrowser(networkProcess())) 1426 1428 shouldBeConsideredAppBound = NavigatingToAppBoundDomain::No; 1429 #if ENABLE(INTELLIGENT_TRACKING_PREVENTION) 1430 if (auto* storageSession = networkStorageSession()) { 1431 auto firstParty = WebCore::RegistrableDomain(request.firstPartyForCookies()); 1432 if (storageSession->shouldBlockThirdPartyCookiesButKeepFirstPartyCookiesFor(firstParty)) 1433 return sessionSetForPage(webPageProxyID).isolatedSession(storedCredentialsPolicy, firstParty, shouldBeConsideredAppBound, *this); 1434 } else 1435 ASSERT_NOT_REACHED(); 1436 #endif 1427 1437 1428 1438 #if ENABLE(APP_BOUND_DOMAINS) … … 1431 1441 #endif 1432 1442 1433 auto firstParty = WebCore::RegistrableDomain(request.firstPartyForCookies()); 1434 if (firstParty.isEmpty()) 1435 firstParty = WebCore::RegistrableDomain(request.url()); 1436 1437 return sessionSetForPage(webPageProxyID).isolatedSession(storedCredentialsPolicy, firstParty, shouldBeConsideredAppBound, *this); 1443 switch (storedCredentialsPolicy) { 1444 case WebCore::StoredCredentialsPolicy::Use: 1445 return sessionSetForPage(webPageProxyID).sessionWithCredentialStorage; 1446 case WebCore::StoredCredentialsPolicy::DoNotUse: 1447 return sessionSetForPage(webPageProxyID).sessionWithoutCredentialStorage; 1448 case WebCore::StoredCredentialsPolicy::EphemeralStateless: 1449 return initializeEphemeralStatelessSessionIfNeeded(webPageProxyID, NavigatingToAppBoundDomain::No); 1450 } 1438 1451 } 1439 1452 … … 1492 1505 SessionWrapper& SessionSet::isolatedSession(WebCore::StoredCredentialsPolicy storedCredentialsPolicy, const WebCore::RegistrableDomain firstPartyDomain, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain, NetworkSessionCocoa& session) 1493 1506 { 1494 auto addResult= isolatedSessions.ensure(firstPartyDomain, [this, &session, isNavigatingToAppBoundDomain] {1507 auto& entry = isolatedSessions.ensure(firstPartyDomain, [this, &session, isNavigatingToAppBoundDomain] { 1495 1508 auto newEntry = makeUnique<IsolatedSession>(); 1496 1509 newEntry->sessionWithCredentialStorage.initialize(sessionWithCredentialStorage.session.get().configuration, session, WebCore::StoredCredentialsPolicy::Use, isNavigatingToAppBoundDomain); 1497 1510 newEntry->sessionWithoutCredentialStorage.initialize(sessionWithoutCredentialStorage.session.get().configuration, session, WebCore::StoredCredentialsPolicy::DoNotUse, isNavigatingToAppBoundDomain); 1498 1511 return newEntry; 1499 }); 1500 1501 auto now = MonotonicTime::now(); 1502 auto& isolatedSession = addResult.iterator->value; 1503 isolatedSession->lastUsed = now; 1512 }).iterator->value; 1513 1514 entry->lastUsed = WallTime::now(); 1504 1515 1505 1516 auto& sessionWrapper = [&] (auto storedCredentialsPolicy) -> SessionWrapper& { … … 1507 1518 case WebCore::StoredCredentialsPolicy::Use: 1508 1519 LOG(NetworkSession, "Using isolated NSURLSession with credential storage."); 1509 return isolatedSession->sessionWithCredentialStorage;1520 return entry->sessionWithCredentialStorage; 1510 1521 case WebCore::StoredCredentialsPolicy::DoNotUse: 1511 1522 LOG(NetworkSession, "Using isolated NSURLSession without credential storage."); 1512 return isolatedSession->sessionWithoutCredentialStorage;1523 return entry->sessionWithoutCredentialStorage; 1513 1524 case WebCore::StoredCredentialsPolicy::EphemeralStateless: 1514 1525 return initializeEphemeralStatelessSessionIfNeeded(isNavigatingToAppBoundDomain, session); … … 1516 1527 } (storedCredentialsPolicy); 1517 1528 1518 if (addResult.isNewEntry) { 1519 isolatedSessions.removeIf([&](auto& entry) { 1520 return (now - entry.value->lastUsed) > 10_min; 1521 }); 1522 } 1529 if (isolatedSessions.size() > maxNumberOfIsolatedSessions) { 1530 WebCore::RegistrableDomain keyToRemove; 1531 auto oldestTimestamp = WallTime::now(); 1532 for (auto& key : isolatedSessions.keys()) { 1533 auto timestamp = isolatedSessions.get(key)->lastUsed; 1534 if (timestamp < oldestTimestamp) { 1535 oldestTimestamp = timestamp; 1536 keyToRemove = key; 1537 } 1538 } 1539 LOG(NetworkSession, "About to remove isolated NSURLSession."); 1540 isolatedSessions.remove(keyToRemove); 1541 } 1542 1543 RELEASE_ASSERT(isolatedSessions.size() <= maxNumberOfIsolatedSessions); 1523 1544 1524 1545 return sessionWrapper;
Note:
See TracChangeset
for help on using the changeset viewer.