Changeset 274228 in webkit
- Timestamp:
- Mar 10, 2021, 12:09:30 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp (modified) (4 diffs)
-
Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h (modified) (2 diffs)
-
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h (modified) (3 diffs)
-
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (modified) (3 diffs)
-
Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h (modified) (2 diffs)
-
Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h (modified) (3 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r274227 r274228 1 2021-03-10 Brent Fulgham <bfulgham@apple.com> 2 3 [Cocoa] Add additional bundle ID property to WKWebViewConfiguration 4 https://bugs.webkit.org/show_bug.cgi?id=222919 5 <rdar://problem/75013854> 6 7 Reviewed by Alex Christensen. 8 9 Add an additional property to _WKWebsiteDataStoreConfiguration to help thread the correct bundle 10 ID of the driving application to lower levels of WebKit so that we can provide better messaging 11 when a remote service (e.g., Safari View Controller or ASWebAuthenticationSession) is used. Currently 12 we often lack context and have to report a generic "web content" message that doesn't help a user 13 understand which app is actually requesting the load. 14 15 We cannot use either of the existing bundle ID's for this purpose since we always indicate 'com.apple.Safari' 16 as the source application to ensure proper handling of web traffic in lower levels of the system Network stack, 17 and sourceApplicationSecondaryIdentifier is used for Apple Pay purposes and cannot be repurposed for this task. 18 19 This first patch adds the property. A follow-up patch will flesh out the implementation. 20 21 * NetworkProcess/NetworkSessionCreationParameters.cpp: 22 (WebKit::NetworkSessionCreationParameters::encode const): 23 (WebKit::NetworkSessionCreationParameters::decode): 24 * NetworkProcess/NetworkSessionCreationParameters.h: 25 * NetworkProcess/cocoa/NetworkSessionCocoa.h: 26 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 27 (WebKit::NetworkSessionCocoa::attributedBundleIdentifier const): 28 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): 29 * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: 30 * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: 31 (-[_WKWebsiteDataStoreConfiguration setAttributedBundleIdentifier:]): 32 (-[_WKWebsiteDataStoreConfiguration attributedBundleIdentifier]): 33 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: 34 (WebKit::WebsiteDataStore::platformSetNetworkParameters): 35 * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: 36 (WebKit::WebsiteDataStoreConfiguration::copy): 37 * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: 38 (WebKit::WebsiteDataStoreConfiguration::attributedBundleIdentifier const): 39 (WebKit::WebsiteDataStoreConfiguration::setAttributedBundleIdentifier): 40 1 41 2021-03-09 Darin Adler <darin@apple.com> 2 42 -
trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp
r271714 r274228 1 1 /* 2 * Copyright (C) 2018-202 0Apple Inc. All rights reserved.2 * Copyright (C) 2018-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 48 48 encoder << sourceApplicationBundleIdentifier; 49 49 encoder << sourceApplicationSecondaryIdentifier; 50 encoder << attributedBundleIdentifier; 50 51 encoder << shouldLogCookieInformation; 51 52 encoder << httpProxy; … … 121 122 return WTF::nullopt; 122 123 124 Optional<String> attributedBundleIdentifier; 125 decoder >> attributedBundleIdentifier; 126 if (!attributedBundleIdentifier) 127 return WTF::nullopt; 128 123 129 Optional<bool> shouldLogCookieInformation; 124 130 decoder >> shouldLogCookieInformation; … … 296 302 , WTFMove(*sourceApplicationBundleIdentifier) 297 303 , WTFMove(*sourceApplicationSecondaryIdentifier) 304 , WTFMove(*attributedBundleIdentifier) 298 305 , WTFMove(*shouldLogCookieInformation) 299 306 , WTFMove(*httpProxy) -
trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h
r271714 r274228 1 1 /* 2 * Copyright (C) 2017-202 0Apple Inc. All rights reserved.2 * Copyright (C) 2017-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 61 61 String sourceApplicationBundleIdentifier; 62 62 String sourceApplicationSecondaryIdentifier; 63 String attributedBundleIdentifier; 63 64 bool shouldLogCookieInformation { false }; 64 65 URL httpProxy; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h
r270249 r274228 1 1 /* 2 * Copyright (C) 2016-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2016-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 76 76 const String& sourceApplicationBundleIdentifier() const; 77 77 const String& sourceApplicationSecondaryIdentifier() const; 78 const String& attributedBundleIdentifier() const; 78 79 #if PLATFORM(IOS_FAMILY) 79 80 const String& dataConnectionServiceType() const; … … 148 149 String m_sourceApplicationBundleIdentifier; 149 150 String m_sourceApplicationSecondaryIdentifier; 151 String m_attributedBundleIdentifier; 150 152 RetainPtr<CFDictionaryRef> m_proxyConfiguration; 151 153 RetainPtr<DMFWebsitePolicyMonitor> m_deviceManagementPolicyMonitor; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r274161 r274228 1 1 /* 2 * Copyright (C) 2015-202 0Apple Inc. All rights reserved.2 * Copyright (C) 2015-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 1149 1149 } 1150 1150 1151 const String& NetworkSessionCocoa::attributedBundleIdentifier() const 1152 { 1153 return m_attributedBundleIdentifier; 1154 } 1155 1151 1156 #if PLATFORM(IOS_FAMILY) 1152 1157 const String& NetworkSessionCocoa::dataConnectionServiceType() const … … 1223 1228 , m_sourceApplicationBundleIdentifier(parameters.sourceApplicationBundleIdentifier) 1224 1229 , m_sourceApplicationSecondaryIdentifier(parameters.sourceApplicationSecondaryIdentifier) 1230 , m_attributedBundleIdentifier(parameters.attributedBundleIdentifier) 1225 1231 , m_proxyConfiguration(parameters.proxyConfiguration) 1226 1232 , m_shouldLogCookieInformation(parameters.shouldLogCookieInformation) -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h
r271813 r274228 1 1 /* 2 * Copyright (C) 2017-202 0Apple Inc. All rights reserved.2 * Copyright (C) 2017-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 40 40 @property (nonatomic, nullable, copy) NSString *sourceApplicationBundleIdentifier WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 41 41 @property (nonatomic, nullable, copy) NSString *sourceApplicationSecondaryIdentifier WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 42 @property (nonatomic, nullable, copy) NSString *attributedBundleIdentifier WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 42 43 @property (nonatomic, nullable, copy, setter=setHTTPProxy:) NSURL *httpProxy WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 43 44 @property (nonatomic, nullable, copy, setter=setHTTPSProxy:) NSURL *httpsProxy WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm
r274227 r274228 1 1 /* 2 * Copyright (C) 2017 Apple Inc. All rights reserved.2 * Copyright (C) 2017-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 243 243 } 244 244 245 - (void)setAttributedBundleIdentifier:(NSString *)identifier 246 { 247 _configuration->setAttributedBundleIdentifier(identifier); 248 } 249 250 - (NSString *)attributedBundleIdentifier 251 { 252 return _configuration->attributedBundleIdentifier(); 253 } 254 245 255 - (NSURL *)applicationCacheDirectory 246 256 { -
trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
r273610 r274228 1 1 /* 2 * Copyright (C) 2015-202 0Apple Inc. All rights reserved.2 * Copyright (C) 2015-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 168 168 parameters.networkSessionParameters.sourceApplicationBundleIdentifier = configuration().sourceApplicationBundleIdentifier(); 169 169 parameters.networkSessionParameters.sourceApplicationSecondaryIdentifier = configuration().sourceApplicationSecondaryIdentifier(); 170 parameters.networkSessionParameters.attributedBundleIdentifier = configuration().attributedBundleIdentifier(); 170 171 parameters.networkSessionParameters.shouldLogCookieInformation = shouldLogCookieInformation; 171 172 parameters.networkSessionParameters.httpProxy = WTFMove(httpProxy); -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp
r268214 r274228 1 1 /* 2 * Copyright (C) 2018 Apple Inc. All rights reserved.2 * Copyright (C) 2018-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 78 78 copy->m_sourceApplicationBundleIdentifier = this->m_sourceApplicationBundleIdentifier; 79 79 copy->m_sourceApplicationSecondaryIdentifier = this->m_sourceApplicationSecondaryIdentifier; 80 copy->m_attributedBundleIdentifier = this->m_attributedBundleIdentifier; 80 81 copy->m_httpProxy = this->m_httpProxy; 81 82 copy->m_httpsProxy = this->m_httpsProxy; -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h
r268214 r274228 1 1 /* 2 * Copyright (C) 2018 Apple Inc. All rights reserved.2 * Copyright (C) 2018-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 134 134 void setSourceApplicationSecondaryIdentifier(String&& identifier) { m_sourceApplicationSecondaryIdentifier = WTFMove(identifier); } 135 135 136 const String& attributedBundleIdentifier() const { return m_attributedBundleIdentifier; } 137 void setAttributedBundleIdentifier(String&& identifier) { m_attributedBundleIdentifier = WTFMove(identifier); } 138 136 139 const URL& httpProxy() const { return m_httpProxy; } 137 140 void setHTTPProxy(URL&& proxy) { m_httpProxy = WTFMove(proxy); } … … 195 198 String m_sourceApplicationBundleIdentifier; 196 199 String m_sourceApplicationSecondaryIdentifier; 200 String m_attributedBundleIdentifier; 197 201 String m_boundInterfaceIdentifier; 198 202 String m_dataConnectionServiceType; -
trunk/Tools/ChangeLog
r274220 r274228 1 2021-03-10 Brent Fulgham <bfulgham@apple.com> 2 3 [Cocoa] Add additional bundle ID property to WKWebViewConfiguration 4 https://bugs.webkit.org/show_bug.cgi?id=222919 5 <rdar://problem/75013854> 6 7 Reviewed by Alex Christensen. 8 9 Update existing SettingNonPersistentDataStorePathsThrowsException test with new property. 10 11 * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: 12 (TestWebKitAPI::TEST): 13 1 14 2021-03-10 Sam Sneddon <gsnedders@apple.com> 2 15 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm
r273062 r274228 1 1 /* 2 * Copyright (C) 2019 Apple Inc. All rights reserved.2 * Copyright (C) 2019-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 268 268 [configuration setSourceApplicationBundleIdentifier:@"com.apple.Safari"]; 269 269 [configuration setSourceApplicationSecondaryIdentifier:@"com.apple.Safari"]; 270 [configuration setAttributedBundleIdentifier:@"com.apple.Safari"]; 270 271 } 271 272
Note:
See TracChangeset
for help on using the changeset viewer.