Title: [152633] trunk/Source/WebKit2
- Revision
- 152633
- Author
- [email protected]
- Date
- 2013-07-15 08:36:56 -0700 (Mon, 15 Jul 2013)
Log Message
[GTK] Remote inspector server should send an error page if resources not found
https://bugs.webkit.org/show_bug.cgi?id=117137
Patch by Anton Obzhirov <[email protected]> on 2013-07-15
Reviewed by Gustavo Noronha Silva.
Sometimes it is difficult to understand why remote inspector fails to deliver the content.
This patch gives an option to show error page with some basic explanation.
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (152632 => 152633)
--- trunk/Source/WebKit2/ChangeLog 2013-07-15 14:47:04 UTC (rev 152632)
+++ trunk/Source/WebKit2/ChangeLog 2013-07-15 15:36:56 UTC (rev 152633)
@@ -1,3 +1,16 @@
+2013-07-15 Anton Obzhirov <[email protected]>
+
+ [GTK] Remote inspector server should send an error page if resources not found
+ https://bugs.webkit.org/show_bug.cgi?id=117137
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Sometimes it is difficult to understand why remote inspector fails to deliver the content.
+ This patch gives an option to show error page with some basic explanation.
+
+ * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
+ (WebKit::WebInspectorServer::platformResourceForPath):
+
2013-07-15 Simon Pena <[email protected]>
[GTK] [WK2] Check if the keyEventQueue is empty in WebPageProxy::getEditorCommandsForKeyEvent
Modified: trunk/Source/WebKit2/UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp (152632 => 152633)
--- trunk/Source/WebKit2/UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp 2013-07-15 14:47:04 UTC (rev 152632)
+++ trunk/Source/WebKit2/UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp 2013-07-15 15:36:56 UTC (rev 152633)
@@ -53,9 +53,21 @@
return false;
GRefPtr<GFile> file = adoptGRef(g_file_new_for_path(localPath.data()));
- GRefPtr<GFileInfo> fileInfo = adoptGRef(g_file_query_info(file.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE "," G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, 0, 0));
- if (!fileInfo)
- return false;
+ GOwnPtr<GError> error;
+ GRefPtr<GFileInfo> fileInfo = adoptGRef(g_file_query_info(file.get(), G_FILE_ATTRIBUTE_STANDARD_SIZE "," G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, 0, &error.outPtr()));
+ if (!fileInfo) {
+ StringBuilder builder;
+ builder.appendLiteral("<!DOCTYPE html><html><head></head><body>Error: ");
+ builder.appendNumber(error->code);
+ builder.appendLiteral(", ");
+ builder.append(error->message);
+ builder.appendLiteral(" occurred during fetching webinspector resource files.<br>Make sure you ran make install or have set WEBKIT_INSPECTOR_SERVER_PATH in your environment to point to webinspector folder.</body></html>");
+ CString cstr = builder.toString().utf8();
+ data.append(cstr.data(), cstr.length());
+ contentType = "text/html; charset=utf-8";
+ g_warning("Error fetching webinspector resource files: %d, %s", error->code, error->message);
+ return true;
+ }
GRefPtr<GFileInputStream> inputStream = adoptGRef(g_file_read(file.get(), 0, 0));
if (!inputStream)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes