Title: [137822] trunk/Source/WebKit2
- Revision
- 137822
- Author
- [email protected]
- Date
- 2012-12-15 16:42:11 -0800 (Sat, 15 Dec 2012)
Log Message
[WebKit2] Register the custom protocol handler in the network process if it exists
https://bugs.webkit.org/show_bug.cgi?id=105118
Reviewed by Anders Carlsson.
Register our custom protocol handler with NSURLProtocol when starting
up the network process; do not register the custom protocol handler in
web processes if a network process is being used.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (137821 => 137822)
--- trunk/Source/WebKit2/ChangeLog 2012-12-16 00:22:35 UTC (rev 137821)
+++ trunk/Source/WebKit2/ChangeLog 2012-12-16 00:42:11 UTC (rev 137822)
@@ -1,3 +1,21 @@
+2012-12-15 Andy Estes <[email protected]>
+
+ [WebKit2] Register the custom protocol handler in the network process if it exists
+ https://bugs.webkit.org/show_bug.cgi?id=105118
+
+ Reviewed by Anders Carlsson.
+
+ Register our custom protocol handler with NSURLProtocol when starting
+ up the network process; do not register the custom protocol handler in
+ web processes if a network process is being used.
+
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::initializeNetworkProcess):
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::initializeWebProcess):
+ * WebProcess/mac/WebProcessMac.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+
2012-12-15 Sam Weinig <[email protected]>
The network process should use the correct NSURLCache location and set its size correctly for the CacheModel
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (137821 => 137822)
--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp 2012-12-16 00:22:35 UTC (rev 137821)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp 2012-12-16 00:42:11 UTC (rev 137822)
@@ -120,6 +120,8 @@
#if ENABLE(CUSTOM_PROTOCOLS)
for (size_t i = 0; i < parameters.urlSchemesRegisteredForCustomProtocols.size(); ++i)
CustomProtocolManager::shared().registerScheme(parameters.urlSchemesRegisteredForCustomProtocols[i]);
+
+ CustomProtocolManager::registerCustomProtocolClass();
#endif
}
Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (137821 => 137822)
--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2012-12-16 00:22:35 UTC (rev 137821)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2012-12-16 00:42:11 UTC (rev 137822)
@@ -318,6 +318,19 @@
for (size_t i = 0; i < parameters.plugInAutoStartOrigins.size(); ++i)
didAddPlugInAutoStartOrigin(parameters.plugInAutoStartOrigins[i]);
+
+#if ENABLE(CUSTOM_PROTOCOLS)
+#if ENABLE(NETWORK_PROCESS)
+ ASSERT(parameters.urlSchemesRegisteredForCustomProtocols.isEmpty() || !m_usesNetworkProcess);
+#endif
+ for (size_t i = 0; i < parameters.urlSchemesRegisteredForCustomProtocols.size(); ++i)
+ CustomProtocolManager::shared().registerScheme(parameters.urlSchemesRegisteredForCustomProtocols[i]);
+
+#if ENABLE(NETWORK_PROCESS)
+ if (!m_usesNetworkProcess)
+#endif
+ CustomProtocolManager::registerCustomProtocolClass();
+#endif
}
#if ENABLE(NETWORK_PROCESS)
Modified: trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm (137821 => 137822)
--- trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm 2012-12-16 00:22:35 UTC (rev 137821)
+++ trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm 2012-12-16 00:42:11 UTC (rev 137822)
@@ -282,12 +282,6 @@
// no window in WK2, NSApplication needs to use the focused page's focused element.
Method methodToPatch = class_getInstanceMethod([NSApplication class], @selector(accessibilityFocusedUIElement));
method_setImplementation(methodToPatch, (IMP)NSApplicationAccessibilityFocusedUIElement);
-
- ASSERT(parameters.urlSchemesRegisteredForCustomProtocols.isEmpty() || !m_usesNetworkProcess);
- for (size_t i = 0; i < parameters.urlSchemesRegisteredForCustomProtocols.size(); ++i)
- CustomProtocolManager::shared().registerScheme(parameters.urlSchemesRegisteredForCustomProtocols[i]);
-
- CustomProtocolManager::registerCustomProtocolClass();
}
void WebProcess::initializeShim()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes