Changeset 240805 in webkit
- Timestamp:
- Jan 31, 2019 12:01:07 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r240804 r240805 1 2019-01-31 Jiewen Tan <jiewen_tan@apple.com> 2 3 Formalize WebKitAdditions mechanism of LoadOptimizer 4 https://bugs.webkit.org/show_bug.cgi?id=193886 5 <rdar://problem/47696809> 6 7 Reviewed by Brent Fulgham. 8 9 Covered by existing tests. 10 11 * platform/network/ResourceRequestBase.h: 12 Export isolatedCopy(). 13 1 14 2019-01-31 Jer Noble <jer.noble@apple.com> 2 15 -
trunk/Source/WebCore/platform/network/ResourceRequestBase.h
r239742 r240805 58 58 WTF_MAKE_FAST_ALLOCATED; 59 59 public: 60 ResourceRequest isolatedCopy() const;60 WEBCORE_EXPORT ResourceRequest isolatedCopy() const; 61 61 WEBCORE_EXPORT void setAsIsolatedCopy(const ResourceRequest&); 62 62 -
trunk/Source/WebKit/ChangeLog
r240803 r240805 1 2019-01-31 Jiewen Tan <jiewen_tan@apple.com> 2 3 Formalize WebKitAdditions mechanism of LoadOptimizer 4 https://bugs.webkit.org/show_bug.cgi?id=193886 5 <rdar://problem/47696809> 6 7 Reviewed by Brent Fulgham. 8 9 This patch does the following few things: 10 1) formalizes WebKitAdditions mechanism of LoadOptimizer; 11 2) modernizes AppLinks code in tryInterceptNavigation to use BlockPtr; 12 3) lets AppLinks have higher precedence than LoadOptimizer. 13 14 * SourcesCocoa.txt: 15 * UIProcess/Cocoa/LoadOptimizer.h: Removed. 16 * UIProcess/Cocoa/LoadOptimizer.mm: Removed. 17 * UIProcess/Cocoa/NavigationState.mm: 18 (WebKit::tryOptimizingLoad): 19 (WebKit::tryInterceptNavigation): 20 * UIProcess/WebsiteData/WebsiteDataStore.cpp: 21 (WebKit::WebsiteDataStore::WebsiteDataStore): 22 * UIProcess/WebsiteData/WebsiteDataStore.h: 23 (WebKit::WebsiteDataStore::loadOptimizer): Deleted. 24 * WebKit.xcodeproj/project.pbxproj: 25 1 26 2019-01-31 Chris Dumez <cdumez@apple.com> 2 27 -
trunk/Source/WebKit/SourcesCocoa.txt
r240685 r240805 325 325 UIProcess/Cocoa/IconLoadingDelegate.mm 326 326 UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm 327 UIProcess/Cocoa/LoadOptimizer.mm328 327 UIProcess/Cocoa/MediaCaptureUtilities.mm 329 328 UIProcess/Cocoa/NavigationState.mm -
trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm
r240555 r240805 38 38 #import "AuthenticationDecisionListener.h" 39 39 #import "CompletionHandlerCallChecker.h" 40 #import "LoadOptimizer.h"41 40 #import "Logging.h" 42 41 #import "NavigationActionData.h" … … 80 79 #endif 81 80 81 #if USE(APPLE_INTERNAL_SDK) 82 #import <WebKitAdditions/NavigationStateAdditions.mm> 83 #endif 84 82 85 #if USE(QUICK_LOOK) 83 86 #import "QuickLookDocumentData.h" … … 466 469 #endif 467 470 471 #if !USE(APPLE_INTERNAL_SDK) 472 static void tryOptimizingLoad(const WebCore::ResourceRequest&, WebPageProxy&, Function<void(bool)>&& completionHandler) 473 { 474 completionHandler(false); 475 } 476 #endif 477 468 478 static void tryInterceptNavigation(Ref<API::NavigationAction>&& navigationAction, WebPageProxy& page, WTF::Function<void(bool)>&& completionHandler) 469 479 { 470 480 #if HAVE(APP_LINKS) 471 481 if (navigationAction->shouldOpenAppLinks()) { 472 auto* localCompletionHandler = new WTF::Function<void (bool)>(WTFMove(completionHandler)); 473 [LSAppLink openWithURL:navigationAction->request().url() completionHandler:[localCompletionHandler](BOOL success, NSError *) { 474 dispatch_async(dispatch_get_main_queue(), [localCompletionHandler, success] { 475 (*localCompletionHandler)(success); 476 delete localCompletionHandler; 482 auto callback = makeBlockPtr([request = navigationAction->request().isolatedCopy(), weakPage = makeWeakPtr(page), completionHandler = WTFMove(completionHandler)] (BOOL success, NSError *) mutable { 483 RunLoop::main().dispatch([request = request.isolatedCopy(), weakPage, completionHandler = WTFMove(completionHandler), success]() mutable { 484 if (!success && weakPage) { 485 tryOptimizingLoad(request, *weakPage, WTFMove(completionHandler)); 486 return; 487 } 488 completionHandler(success); 477 489 }); 478 }]; 479 return; 480 } 481 #endif 482 483 #if HAVE(LOAD_OPTIMIZER) 484 if (LoadOptimizer::canOptimizeLoad(navigationAction->request().url())) { 485 page.websiteDataStore().loadOptimizer().optimizeLoad(navigationAction->request(), page, WTFMove(completionHandler)); 486 return; 487 } 488 #endif 489 490 completionHandler(false); 490 }); 491 [LSAppLink openWithURL:navigationAction->request().url() completionHandler:callback.get()]; 492 return; 493 } 494 #endif 495 496 tryOptimizingLoad(navigationAction->request(), page, WTFMove(completionHandler)); 491 497 } 492 498 -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
r240785 r240805 57 57 #include <wtf/RunLoop.h> 58 58 59 #if HAVE(LOAD_OPTIMIZER)60 #include "LoadOptimizer.h"61 #endif62 63 59 #if ENABLE(NETSCAPE_PLUGIN_API) 64 60 #include "PluginProcessManager.h" … … 105 101 #endif 106 102 , m_client(makeUniqueRef<WebsiteDataStoreClient>()) 103 { 107 104 #if HAVE(LOAD_OPTIMIZER) 108 , m_loadOptimizer(makeUniqueRef<LoadOptimizer>()) 109 #endif 110 { 105 WEBSITEDATASTORE_LOADOPTIMIZER_ADDITIONS_2 106 #endif 111 107 WTF::setProcessPrivileges(allPrivileges()); 112 108 maybeRegisterWithSessionIDMap(); … … 126 122 #endif 127 123 , m_client(makeUniqueRef<WebsiteDataStoreClient>()) 124 { 128 125 #if HAVE(LOAD_OPTIMIZER) 129 , m_loadOptimizer(makeUniqueRef<LoadOptimizer>()) 130 #endif 131 { 126 WEBSITEDATASTORE_LOADOPTIMIZER_ADDITIONS_2 127 #endif 132 128 maybeRegisterWithSessionIDMap(); 133 129 platformInitialize(); -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
r240785 r240805 53 53 #endif 54 54 55 #if USE(APPLE_INTERNAL_SDK) 56 #include <WebKitAdditions/WebsiteDataStoreAdditions.h> 57 #endif 58 55 59 namespace WebCore { 56 60 class SecurityOrigin; … … 60 64 61 65 class AuthenticatorManager; 62 class LoadOptimizer;63 66 class SecKeyProxyStore; 64 67 class StorageManager; … … 228 231 229 232 #if HAVE(LOAD_OPTIMIZER) 230 LoadOptimizer& loadOptimizer() { return m_loadOptimizer.get(); } 233 WEBSITEDATASTORE_LOADOPTIMIZER_ADDITIONS_1 231 234 #endif 232 235 … … 307 310 308 311 UniqueRef<WebsiteDataStoreClient> m_client; 309 310 #if HAVE(LOAD_OPTIMIZER)311 UniqueRef<LoadOptimizer> m_loadOptimizer;312 #endif313 312 }; 314 313 -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r240685 r240805 1025 1025 5772F206217DBD6A0056BF2C /* HidService.h in Headers */ = {isa = PBXBuildFile; fileRef = 5772F204217DBD6A0056BF2C /* HidService.h */; }; 1026 1026 578DC2982155A0020074E815 /* LocalAuthenticationSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 578DC2972155A0010074E815 /* LocalAuthenticationSoftLink.h */; }; 1027 57900B4021F8F9B8008317DE /* LoadOptimizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 57900B3E21F8F9B8008317DE /* LoadOptimizer.h */; };1028 1027 57AC8F50217FEED90055438C /* HidConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 57AC8F4E217FEED90055438C /* HidConnection.h */; }; 1029 1028 57B4B46020B504AC00D4AD79 /* ClientCertificateAuthenticationXPCConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 57B4B45E20B504AB00D4AD79 /* ClientCertificateAuthenticationXPCConstants.h */; }; … … 3376 3375 5772F205217DBD6A0056BF2C /* HidService.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = HidService.mm; sourceTree = "<group>"; }; 3377 3376 578DC2972155A0010074E815 /* LocalAuthenticationSoftLink.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocalAuthenticationSoftLink.h; sourceTree = "<group>"; }; 3378 57900B3E21F8F9B8008317DE /* LoadOptimizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoadOptimizer.h; sourceTree = "<group>"; };3379 57900B3F21F8F9B8008317DE /* LoadOptimizer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LoadOptimizer.mm; sourceTree = "<group>"; };3380 3377 57AC8F4E217FEED90055438C /* HidConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HidConnection.h; sourceTree = "<group>"; }; 3381 3378 57AC8F4F217FEED90055438C /* HidConnection.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = HidConnection.mm; sourceTree = "<group>"; }; … … 5318 5315 7A821F4B1E2F664800604577 /* LegacyCustomProtocolManagerClient.h */, 5319 5316 7A821F4D1E2F679E00604577 /* LegacyCustomProtocolManagerClient.mm */, 5320 57900B3E21F8F9B8008317DE /* LoadOptimizer.h */,5321 57900B3F21F8F9B8008317DE /* LoadOptimizer.mm */,5322 5317 411286EF21C8A90C003A8550 /* MediaCaptureUtilities.h */, 5323 5318 411286F021C8A90D003A8550 /* MediaCaptureUtilities.mm */, … … 9123 9118 41DC459C1E3DBB2800B11F51 /* LibWebRTCSocketClient.h in Headers */, 9124 9119 413075B21DE85F580039EC69 /* LibWebRTCSocketFactory.h in Headers */, 9125 57900B4021F8F9B8008317DE /* LoadOptimizer.h in Headers */,9126 9120 2D1087611D2C573E00B85F82 /* LoadParameters.h in Headers */, 9127 9121 578DC2982155A0020074E815 /* LocalAuthenticationSoftLink.h in Headers */, -
trunk/Tools/ChangeLog
r240781 r240805 1 2019-01-31 Jiewen Tan <jiewen_tan@apple.com> 2 3 Formalize WebKitAdditions mechanism of LoadOptimizer 4 https://bugs.webkit.org/show_bug.cgi?id=193886 5 <rdar://problem/47696809> 6 7 Reviewed by Brent Fulgham. 8 9 * MiniBrowser/MiniBrowser.entitlements: 10 Make com.apple.security.temporary-exception.mach-lookup.global-name an array. 11 1 12 2019-01-31 Zalan Bujtas <zalan@apple.com> 2 13 -
trunk/Tools/MiniBrowser/MiniBrowser.entitlements
r238166 r240805 6 6 <true/> 7 7 <key>com.apple.security.temporary-exception.mach-lookup.global-name</key> 8 <string>com.apple.Safari.SafeBrowsing.Service</string> 8 <array> 9 <string>com.apple.Safari.SafeBrowsing.Service</string> 10 </array> 9 11 <key>com.apple.security.app-sandbox</key> 10 12 <true/>
Note: See TracChangeset
for help on using the changeset viewer.