Title: [256530] trunk/Source
- Revision
- 256530
- Author
- [email protected]
- Date
- 2020-02-13 11:47:29 -0800 (Thu, 13 Feb 2020)
Log Message
Allow use of proxies in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=207598
For testing purposes, we allow Safari to use a custom HTTP/HTTPS proxy passed through
Source/WebCore:
command line arguments. This gives MiniBrowser the same ability.
$ run-minibrowser --release -WebKit2HTTPProxy "http://127.0.0.1:8080" \
-WebKit2HTTPSProxy "http://127.0.0.1:8080"
Patch by Benjamin Nham <[email protected]> on 2020-02-13
Reviewed by Antti Koivisto.
* platform/RuntimeApplicationChecks.h:
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::MacApplication::isMiniBrowser):
(WebCore::IOSApplication::isMiniBrowser):
Source/WebKit:
command line arguments. This gives MiniBrowser the same ability. Example invocation:
$ run-minibrowser --release -WebKit2HTTPProxy "http://127.0.0.1:8080" \
-WebKit2HTTPSProxy "http://127.0.0.1:8080"
Patch by Benjamin Nham <[email protected]> on 2020-02-13
Reviewed by Antti Koivisto.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (256529 => 256530)
--- trunk/Source/WebCore/ChangeLog 2020-02-13 19:43:53 UTC (rev 256529)
+++ trunk/Source/WebCore/ChangeLog 2020-02-13 19:47:29 UTC (rev 256530)
@@ -1,3 +1,21 @@
+2020-02-13 Benjamin Nham <[email protected]>
+
+ Allow use of proxies in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=207598
+
+ For testing purposes, we allow Safari to use a custom HTTP/HTTPS proxy passed through
+ command line arguments. This gives MiniBrowser the same ability.
+
+ $ run-minibrowser --release -WebKit2HTTPProxy "http://127.0.0.1:8080" \
+ -WebKit2HTTPSProxy "http://127.0.0.1:8080"
+
+ Reviewed by Antti Koivisto.
+
+ * platform/RuntimeApplicationChecks.h:
+ * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+ (WebCore::MacApplication::isMiniBrowser):
+ (WebCore::IOSApplication::isMiniBrowser):
+
2020-02-13 Zalan Bujtas <[email protected]>
[LFC][IFC] LineBreaker should not hold on to the lastWrapOpportunity inline item
Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (256529 => 256530)
--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2020-02-13 19:43:53 UTC (rev 256529)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h 2020-02-13 19:47:29 UTC (rev 256530)
@@ -63,6 +63,7 @@
WEBCORE_EXPORT bool isMicrosoftMessenger();
WEBCORE_EXPORT bool isMicrosoftMyDay();
WEBCORE_EXPORT bool isMicrosoftOutlook();
+WEBCORE_EXPORT bool isMiniBrowser();
bool isQuickenEssentials();
WEBCORE_EXPORT bool isSafari();
bool isSolidStateNetworksDownloader();
@@ -86,6 +87,7 @@
WEBCORE_EXPORT bool isIMDb();
WEBCORE_EXPORT bool isWebBookmarksD();
WEBCORE_EXPORT bool isDumpRenderTree();
+WEBCORE_EXPORT bool isMiniBrowser();
bool isMobileStore();
bool isSpringBoard();
WEBCORE_EXPORT bool isWebProcess();
Modified: trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (256529 => 256530)
--- trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2020-02-13 19:43:53 UTC (rev 256529)
+++ trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2020-02-13 19:47:29 UTC (rev 256530)
@@ -166,6 +166,12 @@
return isMicrosoftOutlook;
}
+bool MacApplication::isMiniBrowser()
+{
+ static bool isMiniBrowser = applicationBundleIsEqualTo("org.webkit.MiniBrowser"_s);
+ return isMiniBrowser;
+}
+
bool MacApplication::isQuickenEssentials()
{
static bool isQuickenEssentials = applicationBundleIsEqualTo("com.intuit.QuickenEssentials"_s);
@@ -345,6 +351,12 @@
return isDataActivation;
}
+bool IOSApplication::isMiniBrowser()
+{
+ static bool isMiniBrowser = applicationBundleIsEqualTo("org.webkit.MiniBrowser"_s);
+ return isMiniBrowser;
+}
+
#endif
} // namespace WebCore
Modified: trunk/Source/WebKit/ChangeLog (256529 => 256530)
--- trunk/Source/WebKit/ChangeLog 2020-02-13 19:43:53 UTC (rev 256529)
+++ trunk/Source/WebKit/ChangeLog 2020-02-13 19:47:29 UTC (rev 256530)
@@ -1,3 +1,21 @@
+2020-02-13 Benjamin Nham <[email protected]>
+
+ Allow use of proxies in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=207598
+
+ For testing purposes, we allow Safari to use a custom HTTP/HTTPS proxy passed through
+ command line arguments. This gives MiniBrowser the same ability. Example invocation:
+
+ $ run-minibrowser --release -WebKit2HTTPProxy "http://127.0.0.1:8080" \
+ -WebKit2HTTPSProxy "http://127.0.0.1:8080"
+
+ Reviewed by Antti Koivisto.
+
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::WebProcessPool::platformInitializeNetworkProcess):
+ * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+ (WebKit::WebsiteDataStore::parameters):
+
2020-02-13 Wenson Hsieh <[email protected]>
[iOS] -updateSelectionWithExtentPoint:completionHandler: should work without requiring floating cursor
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (256529 => 256530)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2020-02-13 19:43:53 UTC (rev 256529)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2020-02-13 19:47:29 UTC (rev 256530)
@@ -374,12 +374,15 @@
{
bool isSafari = false;
+ bool isMiniBrowser = false;
#if PLATFORM(IOS_FAMILY)
isSafari = WebCore::IOSApplication::isMobileSafari();
+ isMiniBrowser = WebCore::IOSApplication::isMiniBrowser();
#elif PLATFORM(MAC)
isSafari = WebCore::MacApplication::isSafari();
+ isMiniBrowser = WebCore::MacApplication::isMiniBrowser();
#endif
- if (isSafari) {
+ if (isSafari || isMiniBrowser) {
parameters.defaultDataStoreParameters.networkSessionParameters.httpProxy = URL(URL(), [defaults stringForKey:(NSString *)WebKit2HTTPProxyDefaultsKey]);
parameters.defaultDataStoreParameters.networkSessionParameters.httpsProxy = URL(URL(), [defaults stringForKey:(NSString *)WebKit2HTTPSProxyDefaultsKey]);
}
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (256529 => 256530)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-02-13 19:43:53 UTC (rev 256529)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-02-13 19:47:29 UTC (rev 256530)
@@ -120,15 +120,18 @@
URL httpsProxy = m_configuration->httpsProxy();
bool isSafari = false;
+ bool isMiniBrowser = false;
#if PLATFORM(IOS_FAMILY)
isSafari = WebCore::IOSApplication::isMobileSafari();
+ isMiniBrowser = WebCore::IOSApplication::isMiniBrowser();
#elif PLATFORM(MAC)
isSafari = WebCore::MacApplication::isSafari();
+ isMiniBrowser = WebCore::MacApplication::isMiniBrowser();
#endif
// FIXME: Remove these once Safari adopts _WKWebsiteDataStoreConfiguration.httpProxy and .httpsProxy.
- if (!httpProxy.isValid() && isSafari)
+ if (!httpProxy.isValid() && (isSafari || isMiniBrowser))
httpProxy = URL(URL(), [defaults stringForKey:(NSString *)WebKit2HTTPProxyDefaultsKey]);
- if (!httpsProxy.isValid() && isSafari)
+ if (!httpsProxy.isValid() && (isSafari || isMiniBrowser))
httpsProxy = URL(URL(), [defaults stringForKey:(NSString *)WebKit2HTTPSProxyDefaultsKey]);
auto resourceLoadStatisticsDirectory = m_configuration->resourceLoadStatisticsDirectory();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes