WebKit Bugzilla
Attachment 360281 Details for
Bug 193881
: Use a load optimizer for some sites
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
WIP.patch (text/plain), 25.13 KB, created by
Jiewen Tan
on 2019-01-27 01:18:28 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jiewen Tan
Created:
2019-01-27 01:18:28 PST
Size:
25.13 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index aaa113994d6..b0c4b86991d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2019-01-26 Jiewen Tan <jiewen_tan@apple.com> >+ >+ Use a load optimizer for some sites >+ https://bugs.webkit.org/show_bug.cgi?id=193881 >+ <rdar://problem/46325455> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Expose FormData::flatten to be used by the load optimizer. >+ >+ * WebCore.xcodeproj/project.pbxproj: >+ * platform/network/FormData.h: >+ > 2019-01-26 Simon Fraser <simon.fraser@apple.com> > > Allow scrolling tree nodes to exist in a detached state >diff --git a/Source/WebCore/platform/network/FormData.h b/Source/WebCore/platform/network/FormData.h >index 36590ebaf4b..efaa1f0ef4b 100644 >--- a/Source/WebCore/platform/network/FormData.h >+++ b/Source/WebCore/platform/network/FormData.h >@@ -221,7 +221,7 @@ public: > 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. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 03a1013b6dc..72d8359a267 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,34 @@ >+2019-01-26 Jiewen Tan <jiewen_tan@apple.com> >+ >+ Use a load optimizer for some sites >+ https://bugs.webkit.org/show_bug.cgi?id=193881 >+ <rdar://problem/46325455> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-26 Simon Fraser <simon.fraser@apple.com> > > Allow scrolling tree nodes to exist in a detached state >diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt >index 66964cd51b1..b1562a2959f 100644 >--- a/Source/WebKit/SourcesCocoa.txt >+++ b/Source/WebKit/SourcesCocoa.txt >@@ -323,6 +323,7 @@ UIProcess/Cocoa/FullscreenClient.mm > 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 >diff --git a/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.h b/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.h >new file mode 100644 >index 00000000000..acecf045e8c >--- /dev/null >+++ b/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.h >@@ -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 >diff --git a/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.mm b/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.mm >new file mode 100644 >index 00000000000..215cebfd9dc >--- /dev/null >+++ b/Source/WebKit/UIProcess/Cocoa/LoadOptimizer.mm >@@ -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 >diff --git a/Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h b/Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h >index 400403ffd83..ff7b5766bec 100644 >--- a/Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h >+++ b/Source/WebKit/UIProcess/Cocoa/MediaCaptureUtilities.h >@@ -25,6 +25,8 @@ > > #pragma once > >+#import "WKFoundation.h" >+ > #if WK_API_ENABLED > > #import "WKWebViewPrivate.h" >diff --git a/Source/WebKit/UIProcess/Cocoa/NavigationState.mm b/Source/WebKit/UIProcess/Cocoa/NavigationState.mm >index 1f732ca6658..6a47ceae93c 100644 >--- a/Source/WebKit/UIProcess/Cocoa/NavigationState.mm >+++ b/Source/WebKit/UIProcess/Cocoa/NavigationState.mm >@@ -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 @@ bool NavigationState::NavigationClient::willGoToBackForwardListItem(WebPageProxy > } > #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 >- completionHandler(false); >+#if HAVE(LOAD_OPTIMIZER) >+ if (LoadOptimizer::canOptimizeLoad(navigationAction->request().url())) { >+ page.websiteDataStore().loadOptimizer().optimizeLoad(navigationAction->request(), page, WTFMove(completionHandler)); >+ return; >+ } > #endif >+ >+ completionHandler(false); > } > > void NavigationState::NavigationClient::decidePolicyForNavigationAction(WebPageProxy& webPageProxy, Ref<API::NavigationAction>&& navigationAction, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userInfo) >@@ -491,8 +497,8 @@ void NavigationState::NavigationClient::decidePolicyForNavigationAction(WebPageP > 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 @@ void NavigationState::NavigationClient::decidePolicyForNavigationAction(WebPageP > #endif > listener->ignore(); > }; >- tryAppLink(WTFMove(navigationAction), WTFMove(completionHandler)); >+ tryInterceptNavigation(WTFMove(navigationAction), webPageProxy, WTFMove(completionHandler)); > return; > } > >@@ -554,8 +560,8 @@ void NavigationState::NavigationClient::decidePolicyForNavigationAction(WebPageP > 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; > } >diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp >index 82be11545a3..f6753209e3b 100644 >--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp >+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp >@@ -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 @@ WebsiteDataStore::WebsiteDataStore(Ref<WebsiteDataStoreConfiguration>&& configur > , 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 @@ WebsiteDataStore::WebsiteDataStore(PAL::SessionID sessionID) > , m_authenticatorManager(makeUniqueRef<AuthenticatorManager>()) > #endif > , m_client(makeUniqueRef<WebsiteDataStoreClient>()) >+#if HAVE(LOAD_OPTIMIZER) >+ , m_loadOptimizer(makeUniqueRef<LoadOptimizer>()) >+#endif > { > maybeRegisterWithSessionIDMap(); > platformInitialize(); >diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h >index e528f6dd36c..a5e6562b045 100644 >--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h >+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h >@@ -59,6 +59,7 @@ class SecurityOrigin; > namespace WebKit { > > class AuthenticatorManager; >+class LoadOptimizer; > class SecKeyProxyStore; > class StorageManager; > class DeviceIdHashSaltStorage; >@@ -237,6 +238,10 @@ public: > 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 @@ private: > #endif > > UniqueRef<WebsiteDataStoreClient> m_client; >+ >+#if HAVE(LOAD_OPTIMIZER) >+ UniqueRef<LoadOptimizer> m_loadOptimizer; >+#endif > }; > > } >diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >index 46eab2b89f6..6edaad143fe 100644 >--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj >+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >@@ -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 */; }; >@@ -3370,6 +3371,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>"; }; >@@ -5310,6 +5313,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 */, >@@ -9908,6 +9913,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 */, >diff --git a/Source/WebKitLegacy/ChangeLog b/Source/WebKitLegacy/ChangeLog >index a6a58c4e93d..4de7641f581 100644 >--- a/Source/WebKitLegacy/ChangeLog >+++ b/Source/WebKitLegacy/ChangeLog >@@ -1,3 +1,13 @@ >+2019-01-26 Jiewen Tan <jiewen_tan@apple.com> >+ >+ Use a load optimizer for some sites >+ https://bugs.webkit.org/show_bug.cgi?id=193881 >+ <rdar://problem/46325455> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebKitLegacy.xcodeproj/project.pbxproj: >+ > 2019-01-24 Ross Kirsling <ross.kirsling@sony.com> > > Move FileSystem to WTF >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 1cf82ac60f9..ce03d7bb148 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,14 @@ >+2019-01-26 Jiewen Tan <jiewen_tan@apple.com> >+ >+ Use a load optimizer for some sites >+ https://bugs.webkit.org/show_bug.cgi?id=193881 >+ <rdar://problem/46325455> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: >+ * TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm: Added. >+ > 2019-01-26 Zalan Bujtas <zalan@apple.com> > > [LFC] The default values for top/bottom in contentHeightForFormattingContextRoot should not be 0. >diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >index 9486f98781c..d4a28c1fd6b 100644 >--- a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >+++ b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >@@ -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 */, >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm >new file mode 100644 >index 00000000000..36f29c5978e >--- /dev/null >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestLoadOptimizer.mm >@@ -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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bfulgham
:
review+
bfulgham
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193881
:
360270
|
360275
| 360281 |
360304