Title: [199346] releases/WebKitGTK/webkit-2.12/Source
- Revision
- 199346
- Author
- [email protected]
- Date
- 2016-04-12 06:25:27 -0700 (Tue, 12 Apr 2016)
Log Message
Merge r198532 - [GTK] WebInspector broken after r197620
https://bugs.webkit.org/show_bug.cgi?id=155497
<rdar://problem/25171910>
Patch by Carlos Garcia Campos <[email protected]> on 2016-03-22
Reviewed by Philippe Normand.
Source/WebCore:
Add resource scheme to the list of secure protocols.
* platform/SchemeRegistry.cpp:
(WebCore::secureSchemes):
Source/WebKit2:
Stop registering resource:// URLs as local, because they are not
like a local file at all. Compare also the URL protocols when
checking whether requested URL is main or test inspector page
instead of checking that the protocol is registered as local.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::isMainOrTestInspectorPage): Compare also the URL protocols.
* UIProcess/WebInspectorProxy.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Do not
set setAllowFileAccessFromFileURLs setting to true.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): Do not
register resource:// URLS as local.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (199345 => 199346)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-04-12 13:14:34 UTC (rev 199345)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-04-12 13:25:27 UTC (rev 199346)
@@ -1,3 +1,16 @@
+2016-03-22 Carlos Garcia Campos <[email protected]>
+
+ [GTK] WebInspector broken after r197620
+ https://bugs.webkit.org/show_bug.cgi?id=155497
+ <rdar://problem/25171910>
+
+ Reviewed by Philippe Normand.
+
+ Add resource scheme to the list of secure protocols.
+
+ * platform/SchemeRegistry.cpp:
+ (WebCore::secureSchemes):
+
2016-03-09 Andreas Kling <[email protected]>
ImageDocuments leak their world.
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/SchemeRegistry.cpp (199345 => 199346)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/SchemeRegistry.cpp 2016-04-12 13:14:34 UTC (rev 199345)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/SchemeRegistry.cpp 2016-04-12 13:25:27 UTC (rev 199346)
@@ -66,6 +66,9 @@
#if USE(QUICK_LOOK)
secureSchemes.get().add(QLPreviewProtocol());
#endif
+#if PLATFORM(GTK)
+ secureSchemes.get().add("resource");
+#endif
}
return secureSchemes;
Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog (199345 => 199346)
--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog 2016-04-12 13:14:34 UTC (rev 199345)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog 2016-04-12 13:25:27 UTC (rev 199346)
@@ -1,5 +1,28 @@
2016-03-22 Carlos Garcia Campos <[email protected]>
+ [GTK] WebInspector broken after r197620
+ https://bugs.webkit.org/show_bug.cgi?id=155497
+ <rdar://problem/25171910>
+
+ Reviewed by Philippe Normand.
+
+ Stop registering resource:// URLs as local, because they are not
+ like a local file at all. Compare also the URL protocols when
+ checking whether requested URL is main or test inspector page
+ instead of checking that the protocol is registered as local.
+
+ * UIProcess/WebInspectorProxy.cpp:
+ (WebKit::isMainOrTestInspectorPage): Compare also the URL protocols.
+ * UIProcess/WebInspectorProxy.h:
+ * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+ (WebKit::WebInspectorProxy::platformCreateInspectorPage): Do not
+ set setAllowFileAccessFromFileURLs setting to true.
+ * UIProcess/gtk/WebProcessPoolGtk.cpp:
+ (WebKit::WebProcessPool::platformInitializeWebProcess): Do not
+ register resource:// URLS as local.
+
+2016-03-22 Carlos Garcia Campos <[email protected]>
+
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.12.0 release.
* gtk/NEWS: Add release notes for 2.12.0.
Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/WebInspectorProxy.cpp (199345 => 199346)
--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/WebInspectorProxy.cpp 2016-04-12 13:14:34 UTC (rev 199345)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/WebInspectorProxy.cpp 2016-04-12 13:25:27 UTC (rev 199346)
@@ -43,7 +43,6 @@
#include "WebProcessPool.h"
#include "WebProcessProxy.h"
#include <WebCore/NotImplemented.h>
-#include <WebCore/SchemeRegistry.h>
#include <wtf/NeverDestroyed.h>
#if ENABLE(INSPECTOR_SERVER)
@@ -332,14 +331,10 @@
static bool isMainOrTestInspectorPage(WKURLRequestRef requestRef)
{
- URL requestURL(URL(), toImpl(requestRef)->resourceRequest().url());
- if (!WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(requestURL.protocol()))
- return false;
-
- // Use URL so we can compare just the paths.
+ // Use URL so we can compare the paths and protocols.
+ const URL& requestURL = toImpl(requestRef)->resourceRequest().url();
URL mainPageURL(URL(), WebInspectorProxy::inspectorPageURL());
- ASSERT(WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(mainPageURL.protocol()));
- if (decodeURLEscapeSequences(requestURL.path()) == decodeURLEscapeSequences(mainPageURL.path()))
+ if (requestURL.protocol() == mainPageURL.protocol() && decodeURLEscapeSequences(requestURL.path()) == decodeURLEscapeSequences(mainPageURL.path()))
return true;
// We might not have a Test URL in Production builds.
@@ -348,8 +343,7 @@
return false;
URL testPageURL(URL(), testPageURLString);
- ASSERT(WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(testPageURL.protocol()));
- return decodeURLEscapeSequences(requestURL.path()) == decodeURLEscapeSequences(testPageURL.path());
+ return requestURL.protocol() == testPageURL.protocol() && decodeURLEscapeSequences(requestURL.path()) == decodeURLEscapeSequences(testPageURL.path());
}
static void processDidCrash(WKPageRef, const void* clientInfo)
Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp (199345 => 199346)
--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp 2016-04-12 13:14:34 UTC (rev 199345)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp 2016-04-12 13:25:27 UTC (rev 199346)
@@ -74,7 +74,6 @@
preferences->setDeveloperExtrasEnabled(true);
preferences->setLogsPageMessagesToSystemConsoleEnabled(true);
#endif
- preferences->setAllowFileAccessFromFileURLs(true);
preferences->setJavaScriptRuntimeFlags({
});
RefPtr<WebPageGroup> pageGroup = WebPageGroup::create(inspectorPageGroupIdentifier(), false, false);
Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp (199345 => 199346)
--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp 2016-04-12 13:14:34 UTC (rev 199345)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp 2016-04-12 13:25:27 UTC (rev 199346)
@@ -89,12 +89,6 @@
void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
{
initInspectorServer();
-
- if (!parameters.urlSchemesRegisteredAsLocal.contains("resource")) {
- WebCore::SchemeRegistry::registerURLSchemeAsLocal("resource");
- parameters.urlSchemesRegisteredAsLocal.append("resource");
- }
-
parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModelDocumentViewer;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes