Title: [240555] trunk
Revision
240555
Author
[email protected]
Date
2019-01-27 12:44:05 -0800 (Sun, 27 Jan 2019)

Log Message

Use a load optimizer for some sites
https://bugs.webkit.org/show_bug.cgi?id=193881
<rdar://problem/46325455>

Reviewed by Brent Fulgham.

Source/WebCore:

Expose FormData::flatten to be used by the load optimizer.

* WebCore.xcodeproj/project.pbxproj:
* platform/network/FormData.h:

Source/WebKit:

We will try to speed up some sites with a dedicated load optimizer. The load optimizer lives
within the WebsiteDataStore as one client instance should have only one and it should live
as long as the client lives. How does the load optimizer work? It intercepts every load in
the navigation state. If a request meets some requirements, it will then fetch the request
from its own cache. Once the fetch succeeds, the original load will be ignored and the
optimizer will display the cached content.

Covered by API tests.

* SourcesCocoa.txt:
* UIProcess/Cocoa/LoadOptimizer.h: Added.
* UIProcess/Cocoa/LoadOptimizer.mm: Added.
* UIProcess/Cocoa/MediaCaptureUtilities.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryInterceptNavigation):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::tryAppLink): Deleted.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::loadOptimizer):
* WebKit.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (240554 => 240555)


--- trunk/Source/WebCore/ChangeLog	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Source/WebCore/ChangeLog	2019-01-27 20:44:05 UTC (rev 240555)
@@ -1,3 +1,16 @@
+2019-01-27  Jiewen Tan  <[email protected]>
+
+        Use a load optimizer for some sites
+        https://bugs.webkit.org/show_bug.cgi?id=193881
+        <rdar://problem/46325455>
+
+        Reviewed by Brent Fulgham.
+
+        Expose FormData::flatten to be used by the load optimizer.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/network/FormData.h:
+
 2019-01-26  Simon Fraser  <[email protected]>
 
         Have composited RenderIFrame layers make FrameHosting scrolling tree nodes to parent the iframe's scrolling node

Modified: trunk/Source/WebCore/platform/network/FormData.h (240554 => 240555)


--- trunk/Source/WebCore/platform/network/FormData.h	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Source/WebCore/platform/network/FormData.h	2019-01-27 20:44:05 UTC (rev 240555)
@@ -221,7 +221,7 @@
     WEBCORE_EXPORT void appendFileRange(const String& filename, long long start, long long length, Optional<WallTime> expectedModificationTime, bool shouldGenerateFile = false);
     WEBCORE_EXPORT void appendBlob(const URL& blobURL);
 
-    Vector<char> flatten() const; // omits files
+    WEBCORE_EXPORT Vector<char> flatten() const; // omits files
     String flattenToString() const; // omits files
 
     // Resolve all blob references so we only have file and data.

Modified: trunk/Source/WebKit/ChangeLog (240554 => 240555)


--- trunk/Source/WebKit/ChangeLog	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Source/WebKit/ChangeLog	2019-01-27 20:44:05 UTC (rev 240555)
@@ -1,3 +1,34 @@
+2019-01-27  Jiewen Tan  <[email protected]>
+
+        Use a load optimizer for some sites
+        https://bugs.webkit.org/show_bug.cgi?id=193881
+        <rdar://problem/46325455>
+
+        Reviewed by Brent Fulgham.
+
+        We will try to speed up some sites with a dedicated load optimizer. The load optimizer lives
+        within the WebsiteDataStore as one client instance should have only one and it should live
+        as long as the client lives. How does the load optimizer work? It intercepts every load in
+        the navigation state. If a request meets some requirements, it will then fetch the request
+        from its own cache. Once the fetch succeeds, the original load will be ignored and the
+        optimizer will display the cached content.
+
+        Covered by API tests.
+
+        * SourcesCocoa.txt:
+        * UIProcess/Cocoa/LoadOptimizer.h: Added.
+        * UIProcess/Cocoa/LoadOptimizer.mm: Added.
+        * UIProcess/Cocoa/MediaCaptureUtilities.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::tryInterceptNavigation):
+        (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
+        (WebKit::tryAppLink): Deleted.
+        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+        (WebKit::WebsiteDataStore::WebsiteDataStore):
+        * UIProcess/WebsiteData/WebsiteDataStore.h:
+        (WebKit::WebsiteDataStore::loadOptimizer):
+        * WebKit.xcodeproj/project.pbxproj:
+
 2019-01-25  Brian Burg  <[email protected]>
 
         Web Automation: add support for simulating single touches to Automation.performInteractionSequence

Modified: trunk/Source/WebKit/SourcesCocoa.txt (240554 => 240555)


--- trunk/Source/WebKit/SourcesCocoa.txt	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Source/WebKit/SourcesCocoa.txt	2019-01-27 20:44:05 UTC (rev 240555)
@@ -323,6 +323,7 @@
 UIProcess/Cocoa/GlobalFindInPageState.mm
 UIProcess/Cocoa/IconLoadingDelegate.mm
 UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm
+UIProcess/Cocoa/LoadOptimizer.mm
 UIProcess/Cocoa/MediaCaptureUtilities.mm
 UIProcess/Cocoa/NavigationState.mm
 UIProcess/Cocoa/PageClientImplCocoa.mm

Copied: trunk/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.h (from rev 240554, trunk/Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h) (0 => 240555)


--- trunk/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.h	                        (rev 0)
+++ trunk/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.h	2019-01-27 20:44:05 UTC (rev 240555)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if HAVE(LOAD_OPTIMIZER)
+#include <WebKitAdditions/LoadOptimizerAdditions.h>
+#endif

Copied: trunk/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.mm (from rev 240554, trunk/Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h) (0 => 240555)


--- trunk/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.mm	                        (rev 0)
+++ trunk/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.mm	2019-01-27 20:44:05 UTC (rev 240555)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "LoadOptimizer.h"
+
+#if HAVE(LOAD_OPTIMIZER)
+#import <WebKitAdditions/LoadOptimizerAdditions.mm>
+#endif

Modified: trunk/Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h (240554 => 240555)


--- trunk/Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h	2019-01-27 20:44:05 UTC (rev 240555)
@@ -25,6 +25,8 @@
 
 #pragma once
 
+#import "WKFoundation.h"
+
 #if WK_API_ENABLED
 
 #import "WKWebViewPrivate.h"

Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (240554 => 240555)


--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm	2019-01-27 20:44:05 UTC (rev 240555)
@@ -37,6 +37,7 @@
 #import "AuthenticationChallengeDisposition.h"
 #import "AuthenticationDecisionListener.h"
 #import "CompletionHandlerCallChecker.h"
+#import "LoadOptimizer.h"
 #import "Logging.h"
 #import "NavigationActionData.h"
 #import "PageLoadState.h"
@@ -464,24 +465,29 @@
 }
 #endif
 
-static void tryAppLink(Ref<API::NavigationAction>&& navigationAction, WTF::Function<void(bool)>&& completionHandler)
+static void tryInterceptNavigation(Ref<API::NavigationAction>&& navigationAction, WebPageProxy& page, WTF::Function<void(bool)>&& completionHandler)
 {
 #if HAVE(APP_LINKS)
-    if (!navigationAction->shouldOpenAppLinks()) {
-        completionHandler(false);
+    if (navigationAction->shouldOpenAppLinks()) {
+        auto* localCompletionHandler = new WTF::Function<void (bool)>(WTFMove(completionHandler));
+        [LSAppLink openWithURL:navigationAction->request().url() completionHandler:[localCompletionHandler](BOOL success, NSError *) {
+            dispatch_async(dispatch_get_main_queue(), [localCompletionHandler, success] {
+                (*localCompletionHandler)(success);
+                delete localCompletionHandler;
+            });
+        }];
         return;
     }
+#endif
 
-    auto* localCompletionHandler = new WTF::Function<void (bool)>(WTFMove(completionHandler));
-    [LSAppLink openWithURL:navigationAction->request().url() completionHandler:[localCompletionHandler](BOOL success, NSError *) {
-        dispatch_async(dispatch_get_main_queue(), [localCompletionHandler, success] {
-            (*localCompletionHandler)(success);
-            delete localCompletionHandler;
-        });
-    }];
-#else
+#if HAVE(LOAD_OPTIMIZER)
+    if (LoadOptimizer::canOptimizeLoad(navigationAction->request().url())) {
+        page.websiteDataStore().loadOptimizer().optimizeLoad(navigationAction->request(), page, WTFMove(completionHandler));
+        return;
+    }
+#endif
+
     completionHandler(false);
-#endif
 }
 
 void NavigationState::NavigationClient::decidePolicyForNavigationAction(WebPageProxy& webPageProxy, Ref<API::NavigationAction>&& navigationAction, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userInfo)
@@ -491,8 +497,8 @@
     if (!m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionDecisionHandler
         && !m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionDecisionHandlerWebsitePolicies
         && !m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionUserInfoDecisionHandlerWebsitePolicies) {
-        auto completionHandler = [webPage = makeRef(webPageProxy), listener = WTFMove(listener), navigationAction = navigationAction.copyRef()] (bool followedLinkToApp) {
-            if (followedLinkToApp) {
+        auto completionHandler = [webPage = makeRef(webPageProxy), listener = WTFMove(listener), navigationAction = navigationAction.copyRef()] (bool interceptedNavigation) {
+            if (interceptedNavigation) {
                 listener->ignore();
                 return;
             }
@@ -519,7 +525,7 @@
 #endif
             listener->ignore();
         };
-        tryAppLink(WTFMove(navigationAction), WTFMove(completionHandler));
+        tryInterceptNavigation(WTFMove(navigationAction), webPageProxy, WTFMove(completionHandler));
         return;
     }
 
@@ -554,8 +560,8 @@
         switch (actionPolicy) {
         case WKNavigationActionPolicyAllow:
         case _WKNavigationActionPolicyAllowInNewProcess:
-            tryAppLink(WTFMove(navigationAction), [actionPolicy, localListener = WTFMove(localListener), websitePolicies = WTFMove(apiWebsitePolicies)](bool followedLinkToApp) mutable {
-                if (followedLinkToApp) {
+            tryInterceptNavigation(WTFMove(navigationAction), webPageProxy, [actionPolicy, localListener = WTFMove(localListener), websitePolicies = WTFMove(apiWebsitePolicies)](bool interceptedNavigation) mutable {
+                if (interceptedNavigation) {
                     localListener->ignore();
                     return;
                 }

Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (240554 => 240555)


--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2019-01-27 20:44:05 UTC (rev 240555)
@@ -57,6 +57,10 @@
 #include <wtf/ProcessPrivilege.h>
 #include <wtf/RunLoop.h>
 
+#if HAVE(LOAD_OPTIMIZER)
+#include "LoadOptimizer.h"
+#endif
+
 #if ENABLE(NETSCAPE_PLUGIN_API)
 #include "PluginProcessManager.h"
 #endif
@@ -101,6 +105,9 @@
     , m_authenticatorManager(makeUniqueRef<AuthenticatorManager>())
 #endif
     , m_client(makeUniqueRef<WebsiteDataStoreClient>())
+#if HAVE(LOAD_OPTIMIZER)
+    , m_loadOptimizer(makeUniqueRef<LoadOptimizer>())
+#endif
 {
     WTF::setProcessPrivileges(allPrivileges());
     maybeRegisterWithSessionIDMap();
@@ -119,6 +126,9 @@
     , m_authenticatorManager(makeUniqueRef<AuthenticatorManager>())
 #endif
     , m_client(makeUniqueRef<WebsiteDataStoreClient>())
+#if HAVE(LOAD_OPTIMIZER)
+    , m_loadOptimizer(makeUniqueRef<LoadOptimizer>())
+#endif
 {
     maybeRegisterWithSessionIDMap();
     platformInitialize();

Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (240554 => 240555)


--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h	2019-01-27 20:44:05 UTC (rev 240555)
@@ -59,6 +59,7 @@
 namespace WebKit {
 
 class AuthenticatorManager;
+class LoadOptimizer;
 class SecKeyProxyStore;
 class StorageManager;
 class DeviceIdHashSaltStorage;
@@ -237,6 +238,10 @@
     WebsiteDataStoreClient& client() { return m_client.get(); }
     void setClient(UniqueRef<WebsiteDataStoreClient>&& client) { m_client = WTFMove(client); }
 
+#if HAVE(LOAD_OPTIMIZER)
+    LoadOptimizer& loadOptimizer() { return m_loadOptimizer.get(); }
+#endif
+
 private:
     explicit WebsiteDataStore(PAL::SessionID);
     explicit WebsiteDataStore(Ref<WebsiteDataStoreConfiguration>&&, PAL::SessionID);
@@ -314,6 +319,10 @@
 #endif
 
     UniqueRef<WebsiteDataStoreClient> m_client;
+
+#if HAVE(LOAD_OPTIMIZER)
+    UniqueRef<LoadOptimizer> m_loadOptimizer;
+#endif
 };
 
 }

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (240554 => 240555)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2019-01-27 20:44:05 UTC (rev 240555)
@@ -1023,6 +1023,7 @@
 		57597EBD218184900037F924 /* CtapHidAuthenticator.h in Headers */ = {isa = PBXBuildFile; fileRef = 57597EBB2181848F0037F924 /* CtapHidAuthenticator.h */; };
 		5772F206217DBD6A0056BF2C /* HidService.h in Headers */ = {isa = PBXBuildFile; fileRef = 5772F204217DBD6A0056BF2C /* HidService.h */; };
 		578DC2982155A0020074E815 /* LocalAuthenticationSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 578DC2972155A0010074E815 /* LocalAuthenticationSoftLink.h */; };
+		57900B4021F8F9B8008317DE /* LoadOptimizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 57900B3E21F8F9B8008317DE /* LoadOptimizer.h */; };
 		57AC8F50217FEED90055438C /* HidConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 57AC8F4E217FEED90055438C /* HidConnection.h */; };
 		57B4B46020B504AC00D4AD79 /* ClientCertificateAuthenticationXPCConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 57B4B45E20B504AB00D4AD79 /* ClientCertificateAuthenticationXPCConstants.h */; };
 		57DCED6E2142EE5E0016B847 /* WebAuthenticatorCoordinatorMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57DCED6B2142EAE20016B847 /* WebAuthenticatorCoordinatorMessageReceiver.cpp */; };
@@ -3372,6 +3373,8 @@
 		5772F204217DBD6A0056BF2C /* HidService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HidService.h; sourceTree = "<group>"; };
 		5772F205217DBD6A0056BF2C /* HidService.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = HidService.mm; sourceTree = "<group>"; };
 		578DC2972155A0010074E815 /* LocalAuthenticationSoftLink.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocalAuthenticationSoftLink.h; sourceTree = "<group>"; };
+		57900B3E21F8F9B8008317DE /* LoadOptimizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoadOptimizer.h; sourceTree = "<group>"; };
+		57900B3F21F8F9B8008317DE /* LoadOptimizer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LoadOptimizer.mm; sourceTree = "<group>"; };
 		57AC8F4E217FEED90055438C /* HidConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HidConnection.h; sourceTree = "<group>"; };
 		57AC8F4F217FEED90055438C /* HidConnection.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = HidConnection.mm; sourceTree = "<group>"; };
 		57B4B45D20B504AB00D4AD79 /* AuthenticationManagerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AuthenticationManagerCocoa.mm; sourceTree = "<group>"; };
@@ -5314,6 +5317,8 @@
 				7A821F4D1E2F679E00604577 /* LegacyCustomProtocolManagerClient.mm */,
 				411286EF21C8A90C003A8550 /* MediaCaptureUtilities.h */,
 				411286F021C8A90D003A8550 /* MediaCaptureUtilities.mm */,
+				57900B3E21F8F9B8008317DE /* LoadOptimizer.h */,
+				57900B3F21F8F9B8008317DE /* LoadOptimizer.mm */,
 				1ABC3DF41899E437004F0626 /* NavigationState.h */,
 				1ABC3DF31899E437004F0626 /* NavigationState.mm */,
 				5C6CE6D31F59EA350007C6CB /* PageClientImplCocoa.h */,
@@ -9915,6 +9920,7 @@
 				7C89D2A41A678875003A5FDE /* WKUserScriptRef.h in Headers */,
 				BC8699B5116AADAA002A925B /* WKView.h in Headers */,
 				BC8699B7116AADAA002A925B /* WKViewInternal.h in Headers */,
+				57900B4021F8F9B8008317DE /* LoadOptimizer.h in Headers */,
 				2D28A4971AF965A100F190C9 /* WKViewLayoutStrategy.h in Headers */,
 				BFA6179F12F0B99D0033E0CA /* WKViewPrivate.h in Headers */,
 				C5E1AFE916B20B75006CC1F2 /* WKWebArchive.h in Headers */,

Modified: trunk/Tools/ChangeLog (240554 => 240555)


--- trunk/Tools/ChangeLog	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Tools/ChangeLog	2019-01-27 20:44:05 UTC (rev 240555)
@@ -1,3 +1,14 @@
+2019-01-27  Jiewen Tan  <[email protected]>
+
+        Use a load optimizer for some sites
+        https://bugs.webkit.org/show_bug.cgi?id=193881
+        <rdar://problem/46325455>
+
+        Reviewed by Brent Fulgham.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm: Added.
+
 2019-01-27  Chris Fleizach  <[email protected]>
 
         AX: Introduce a static accessibility tree

Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (240554 => 240555)


--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2019-01-27 18:36:11 UTC (rev 240554)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2019-01-27 20:44:05 UTC (rev 240555)
@@ -281,6 +281,7 @@
 		57599E2A1F071AA000A3FB8C /* IndexedDBStructuredCloneBackwardCompatibilityRead.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 57599E251F07192C00A3FB8C /* IndexedDBStructuredCloneBackwardCompatibilityRead.html */; };
 		57599E2B1F071AA000A3FB8C /* IndexedDBStructuredCloneBackwardCompatibilityWrite.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 57599E231F07192C00A3FB8C /* IndexedDBStructuredCloneBackwardCompatibilityWrite.html */; };
 		5769C50B1D9B0002000847FB /* SerializedCryptoKeyWrap.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5769C50A1D9B0001000847FB /* SerializedCryptoKeyWrap.mm */; };
+		5774AA6821FBBF7800AF2A1B /* TestLoadOptimizer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5774AA6721FBBF7800AF2A1B /* TestLoadOptimizer.mm */; };
 		578CBD67204FB2C80083B9F2 /* LocalAuthentication.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 578CBD66204FB2C70083B9F2 /* LocalAuthentication.framework */; };
 		57901FB11CAF142D00ED64F9 /* LoadInvalidURLRequest.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 57901FB01CAF141C00ED64F9 /* LoadInvalidURLRequest.html */; };
 		579651E7216BFDED006EBFE5 /* FidoHidMessageTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 579651E6216BFD53006EBFE5 /* FidoHidMessageTest.cpp */; };
@@ -1653,6 +1654,7 @@
 		57599E251F07192C00A3FB8C /* IndexedDBStructuredCloneBackwardCompatibilityRead.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = IndexedDBStructuredCloneBackwardCompatibilityRead.html; sourceTree = "<group>"; };
 		57599E261F07192C00A3FB8C /* IndexedDBStructuredCloneBackwardCompatibility.sqlite3-shm */ = {isa = PBXFileReference; lastKnownFileType = file; path = "IndexedDBStructuredCloneBackwardCompatibility.sqlite3-shm"; sourceTree = "<group>"; };
 		5769C50A1D9B0001000847FB /* SerializedCryptoKeyWrap.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SerializedCryptoKeyWrap.mm; sourceTree = "<group>"; };
+		5774AA6721FBBF7800AF2A1B /* TestLoadOptimizer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = TestLoadOptimizer.mm; sourceTree = "<group>"; };
 		578CBD66204FB2C70083B9F2 /* LocalAuthentication.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LocalAuthentication.framework; path = System/Library/Frameworks/LocalAuthentication.framework; sourceTree = SDKROOT; };
 		57901FAC1CAF12C200ED64F9 /* LoadInvalidURLRequest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LoadInvalidURLRequest.mm; sourceTree = "<group>"; };
 		57901FAE1CAF137100ED64F9 /* LoadInvalidURLRequest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LoadInvalidURLRequest.mm; sourceTree = "<group>"; };
@@ -2509,6 +2511,7 @@
 				A125478D1DB18B9400358564 /* LoadDataWithNilMIMEType.mm */,
 				4612C2B8210A6ABF00B788A6 /* LoadFileThenReload.mm */,
 				57901FAC1CAF12C200ED64F9 /* LoadInvalidURLRequest.mm */,
+				5774AA6721FBBF7800AF2A1B /* TestLoadOptimizer.mm */,
 				51E6A8921D2F1BEC00C004B6 /* LocalStorageClear.mm */,
 				CA38459520AE012E00990D3B /* LocalStorageDatabaseTracker.mm */,
 				46C519D81D355A7300DAA51A /* LocalStorageNullEntries.mm */,
@@ -4252,6 +4255,7 @@
 				7CCE7F271A411AF600447C4C /* UserContentController.mm in Sources */,
 				7CCE7F2D1A411B1000447C4C /* UserContentTest.mm in Sources */,
 				7C882E0A1C80C764006BF731 /* UserContentWorld.mm in Sources */,
+				5774AA6821FBBF7800AF2A1B /* TestLoadOptimizer.mm in Sources */,
 				7CCB99211D3B41F6003922F6 /* UserInitiatedActionInNavigationAction.mm in Sources */,
 				7CCE7F171A411AE600447C4C /* UserMedia.cpp in Sources */,
 				0799C3491EBA2D7B003B7532 /* UserMediaDisabled.mm in Sources */,

Copied: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm (from rev 240554, trunk/Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h) (0 => 240555)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm	                        (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm	2019-01-27 20:44:05 UTC (rev 240555)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+
+#if HAVE(LOAD_OPTIMIZER)
+#import <WebKitAdditions/TestLoadOptimizerAdditions.mm>
+#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to