Changeset 285565 in webkit
- Timestamp:
- Nov 9, 2021, 10:52:44 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/ios-wk2/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/TestExpectations (modified) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/wtf/PlatformHave.h (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (modified) (2 diffs)
-
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h (modified) (1 diff)
-
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r285564 r285565 1 2021-11-09 Chris Dumez <cdumez@apple.com> 2 3 [macOS] Enable NSURLSession partitioning based on first-party domain at CFNetwork level 4 https://bugs.webkit.org/show_bug.cgi?id=230750 5 <rdar://problem/83159358> 6 7 Reviewed by Alex Christensen. 8 9 Skip a few ITP session partitioning tests on newer OSes now that session partitioning 10 happens for all first-party domains at CFNetwork level on these OSes. 11 12 * platform/ios-wk2/TestExpectations: 13 * platform/mac-wk2/TestExpectations: 14 1 15 2021-11-09 Ben Nham <nham@apple.com> 2 16 -
trunk/LayoutTests/platform/ios-wk2/TestExpectations
r285497 r285565 2167 2167 editing/selection/ios/hide-selection-in-tiny-contenteditable.html [ Pass Failure ] 2168 2168 2169 # On iOS15+, CFNetwork does full NSURLSession partitioning based on first-party domains and ITP session partitioning is thus disabled. 2170 http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.py [ Skip ] 2171 http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py [ Skip ] 2172 2169 2173 # These tests fail/timeout on iPhone 12 simulator 2170 2174 fast/events/ios/viewport-no-width-value-allows-double-tap.html [ Skip ] -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r285307 r285565 326 326 http/wpt/mediarecorder/set-srcObject-MediaStream-Blob.html [ Pass Failure Timeout ] 327 327 [ BigSur+ ] http/wpt/mediarecorder/video-rotation.html [ Pass Failure Timeout ] 328 329 # On Monterey+, CFNetwork does full NSURLSession partitioning based on first-party domains and ITP session partitioning is thus disabled. 330 [ Monterey+ ] http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.py [ Skip ] 331 [ Monterey+ ] http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py [ Skip ] 328 332 329 333 # rdar://76909385 -
trunk/Source/WTF/ChangeLog
r285549 r285565 1 2021-11-09 Chris Dumez <cdumez@apple.com> 2 3 [macOS] Enable NSURLSession partitioning based on first-party domain at CFNetwork level 4 https://bugs.webkit.org/show_bug.cgi?id=230750 5 <rdar://problem/83159358> 6 7 Reviewed by Alex Christensen. 8 9 Add HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN) build time flag that is true 10 on newer Apple OSes where CFNetwork does NSURLSession partitioning based on first-party domain for 11 us. 12 13 * wtf/PlatformHave.h: 14 1 15 2021-11-09 Megan Gardner <megan_gardner@apple.com> 2 16 -
trunk/Source/WTF/wtf/PlatformHave.h
r285521 r285565 959 959 #define HAVE_CFNETWORK_NSURLSESSION_ATTRIBUTED_BUNDLE_IDENTIFIER 1 960 960 #define HAVE_CFNETWORK_NSURLSESSION_HSTS_WITH_UNTRUSTED_ROOT 1 961 #define HAVE_CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN 1 961 962 #define HAVE_AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN 1 962 963 #define HAVE_IMAGE_RESTRICTED_DECODING 1 -
trunk/Source/WebKit/ChangeLog
r285563 r285565 1 2021-11-09 Chris Dumez <cdumez@apple.com> 2 3 [macOS] Enable NSURLSession partitioning based on first-party domain at CFNetwork level 4 https://bugs.webkit.org/show_bug.cgi?id=230750 5 <rdar://problem/83159358> 6 7 Reviewed by Alex Christensen. 8 9 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: 10 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): 11 (overrideAttributionContext): Deleted. 12 Stop disabling CFNetwork NSURLSession partitioning based on first-party domain on 13 macOS. 14 15 * NetworkProcess/cocoa/NetworkSessionCocoa.h: 16 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 17 (WebKit::NetworkSessionCocoa::sessionWrapperForTask): 18 (WebKit::NetworkSessionCocoa::hasIsolatedSession const): 19 (WebKit::NetworkSessionCocoa::clearIsolatedSessions): 20 (WebKit::NetworkSessionCocoa::invalidateAndCancelSessionSet): 21 Disable ITP session partitioning of certain prevalent domains on platforms where 22 CFNetwork already does full partitioning of all domains (now that it is enabled 23 on macOS 12+ and iOS15+). 24 1 25 2021-11-09 Per Arne Vollan <pvollan@apple.com> 2 26 -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
r284819 r285565 58 58 #import <WebKitAdditions/NetworkDataTaskCocoaAdditions.h> 59 59 #else 60 static void overrideAttributionContext(NSMutableURLRequest *) { }61 60 static void processPCMRequest(WebCore::PrivateClickMeasurement::PcmDataCarried, NSMutableURLRequest *) { } 62 61 #endif … … 344 343 mutableRequest.get().attribution = request.isAppInitiated() ? NSURLRequestAttributionDeveloper : NSURLRequestAttributionUser; 345 344 #endif 346 347 overrideAttributionContext(mutableRequest.get());348 345 349 346 nsRequest = mutableRequest; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h
r285404 r285565 80 80 } 81 81 82 SessionWrapper& isolatedSession(WebCore::StoredCredentialsPolicy, const WebCore::RegistrableDomain&, NavigatingToAppBoundDomain, NetworkSessionCocoa&);83 82 SessionWrapper& initializeEphemeralStatelessSessionIfNeeded(NavigatingToAppBoundDomain, NetworkSessionCocoa&); 84 83 84 #if !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN) 85 SessionWrapper& isolatedSession(WebCore::StoredCredentialsPolicy, const WebCore::RegistrableDomain&, NavigatingToAppBoundDomain, NetworkSessionCocoa&); 85 86 HashMap<WebCore::RegistrableDomain, std::unique_ptr<IsolatedSession>> isolatedSessions; 87 #endif 88 86 89 std::unique_ptr<IsolatedSession> appBoundSession; 87 90 -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r285404 r285565 1420 1420 if (isParentProcessAFullWebBrowser(networkProcess())) 1421 1421 shouldBeConsideredAppBound = NavigatingToAppBoundDomain::No; 1422 #if ENABLE(INTELLIGENT_TRACKING_PREVENTION) 1422 // This ITP partitioning is unnecessary on newer platforms since CFNetwork already has full partioning based on first-party domains. 1423 #if ENABLE(INTELLIGENT_TRACKING_PREVENTION) && !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN) 1423 1424 if (auto* storageSession = networkStorageSession()) { 1424 1425 auto firstParty = WebCore::RegistrableDomain(request.firstPartyForCookies()); … … 1427 1428 } else 1428 1429 ASSERT_NOT_REACHED(); 1430 #else 1431 UNUSED_PARAM(request); 1429 1432 #endif 1430 1433 … … 1491 1494 #endif 1492 1495 1496 #if !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN) 1493 1497 SessionWrapper& NetworkSessionCocoa::isolatedSession(WebPageProxyIdentifier webPageProxyID, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, const WebCore::RegistrableDomain& firstPartyDomain, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain) 1494 1498 { 1495 1499 return sessionSetForPage(webPageProxyID).isolatedSession(storedCredentialsPolicy, firstPartyDomain, isNavigatingToAppBoundDomain, *this); 1496 1500 } 1497 1501 #endif 1502 1503 #if !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN) 1498 1504 SessionWrapper& SessionSet::isolatedSession(WebCore::StoredCredentialsPolicy storedCredentialsPolicy, const WebCore::RegistrableDomain& firstPartyDomain, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain, NetworkSessionCocoa& session) 1499 1505 { … … 1538 1544 return sessionWrapper; 1539 1545 } 1546 #endif 1547 1540 1548 1541 1549 bool NetworkSessionCocoa::hasIsolatedSession(const WebCore::RegistrableDomain& domain) const 1542 1550 { 1551 #if HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN) 1552 UNUSED_PARAM(domain); 1553 return true; 1554 #else 1543 1555 if (m_defaultSessionSet->isolatedSessions.contains(domain)) 1544 1556 return true; … … 1549 1561 1550 1562 return false; 1563 #endif 1551 1564 } 1552 1565 1553 1566 void NetworkSessionCocoa::clearIsolatedSessions() 1554 1567 { 1568 #if !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN) 1555 1569 m_defaultSessionSet->isolatedSessions.clear(); 1556 1570 for (auto& sessionSet : m_perPageSessionSets.values()) 1557 1571 sessionSet->isolatedSessions.clear(); 1572 #endif 1558 1573 } 1559 1574 … … 1567 1582 [sessionSet.ephemeralStatelessSession.delegate sessionInvalidated]; 1568 1583 1584 #if !HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN) 1569 1585 for (auto& session : sessionSet.isolatedSessions.values()) { 1570 1586 [session->sessionWithCredentialStorage.session invalidateAndCancel]; … … 1574 1590 } 1575 1591 sessionSet.isolatedSessions.clear(); 1592 #endif 1576 1593 1577 1594 if (sessionSet.appBoundSession) {
Note:
See TracChangeset
for help on using the changeset viewer.