Changeset 155714 in webkit
- Timestamp:
- Sep 13, 2013 12:06:11 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r155694 r155714 1 2013-09-13 Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 3 [GTK] Move to the new web inspector 4 https://bugs.webkit.org/show_bug.cgi?id=120647 5 6 Reviewed by Carlos Garcia Campos. 7 8 * GNUmakefile.am: include the new WebInspectorUI GNUmakefile.am. 9 1 10 2013-09-13 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 11 -
trunk/GNUmakefile.am
r151325 r155714 35 35 GENSOURCES_JAVASCRIPTCORE := $(top_builddir)/DerivedSources/JavaScriptCore 36 36 GENSOURCES_WEBCORE := $(top_builddir)/DerivedSources/WebCore 37 GENSOURCES_WEBINSPECTOR_UI := $(top_builddir)/DerivedSources/WebInspectorUI 37 38 GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit 38 39 GENSOURCES_WEBKIT2 := $(top_builddir)/DerivedSources/WebKit2 … … 42 43 GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector 43 44 WebCore := $(srcdir)/Source/WebCore 45 WebInspectorUI := $(srcdir)/Source/WebInspectorUI 44 46 WebKit := $(srcdir)/Source/WebKit/gtk 45 47 WebKit2 := $(srcdir)/Source/WebKit2 … … 198 200 include Source/WebCore/bindings/gobject/GNUmakefile.am 199 201 include Source/WebCore/platform/gtk/po/GNUmakefile.am 202 include Source/WebInspectorUI/GNUmakefile.am 200 203 include Source/WebKit/gtk/GNUmakefile.am 201 204 include Tools/GNUmakefile.am -
trunk/LayoutTests/ChangeLog
r155708 r155714 1 2013-09-13 Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 3 [GTK] Move to the new web inspector 4 https://bugs.webkit.org/show_bug.cgi?id=120647 5 6 Reviewed by Carlos Garcia Campos. 7 8 * platform/gtk/TestExpectations: the new inspector UI does not support the current 9 inspector testing harness so keep it skipped, a new one will eventually be landed. 10 1 11 2013-09-13 Chris Fleizach <cfleizach@apple.com> 2 12 -
trunk/LayoutTests/platform/gtk/TestExpectations
r155599 r155714 70 70 71 71 # These test -apple- and -khtml- prefixed CSS properties, which we don't support. 72 inspector/styles/vendor-prefixes.html [ WontFix Pass]72 inspector/styles/vendor-prefixes.html [ Skip ] 73 73 74 74 # This port doesn't support detecting slow unload handlers. … … 968 968 webkit.org/b/83174 http/tests/inspector [ Skip ] 969 969 970 webkit.org/b/82886 inspector/styles/override-screen-size.html [ Failure ]971 webkit.org/b/88780 inspector/debugger/dom-breakpoints.html [ Timeout Failure ]972 webkit.org/b/88780 inspector/debugger/event-listener-breakpoints.html [ Failure ]973 webkit.org/b/88780 inspector/debugger/step-through-event-listeners.html [ Failure ]974 webkit.org/b/89056 inspector/debugger/xhr-breakpoints.html [ Failure Timeout ]975 webkit.org/b/40300 inspector/debugger/live-edit.html [ Timeout Failure ]976 webkit.org/b/40300 inspector/debugger/live-edit-breakpoints.html [ Failure ]977 webkit.org/b/89652 inspector/debugger/debugger-compile-and-run.html [ Failure ]978 webkit.org/b/85709 inspector/extensions/extensions-eval-content-script.html [ Failure ]979 webkit.org/b/85709 inspector/extensions/extensions-audits-content-script.html [ Failure ]980 981 # These inspector tests fell out of the radar after the transition to NRWT982 # Some time out and some are flaky or present different baselines.983 Bug(GTK) inspector/debugger/scripts-panel.html [ Failure Pass ]984 Bug(GTK) inspector/elements/edit-dom-actions.html [ Failure Timeout Pass ]985 Bug(GTK) inspector/timeline/timeline-paint.html [ Failure ]986 Bug(GTK) inspector/timeline/timeline-decode-resize.html [ Failure ]987 Bug(GTK) http/tests/inspector/resource-har-pages.html [ Failure ]988 Bug(GTK) http/tests/inspector/resource-parameters.html [ Timeout ]989 990 webkit.org/b/56691 http/tests/inspector/network/network-size-chunked.html [ Failure ]991 webkit.org/b/56691 http/tests/inspector/network/network-size-sync.html [ Failure ]992 webkit.org/b/56691 http/tests/inspector/network/network-size.html [ Failure ]993 webkit.org/b/51380 http/tests/inspector/console-websocket-error.html [ Failure Timeout ]994 995 # JSC doesn't support heap profiling996 webkit.org/b/50485 inspector/profiler/heap-snapshot-comparison-dom-groups-change.html [ Failure ]997 webkit.org/b/50485 inspector/profiler/heap-snapshot-inspect-dom-wrapper.html [ Timeout Failure ]998 webkit.org/b/50485 inspector/profiler/heap-snapshot-loader.html [ Failure ]999 webkit.org/b/50485 inspector/profiler/heap-snapshot-reveal-in-dominators-view.html [ Failure ]1000 webkit.org/b/50485 inspector/profiler/heap-snapshot-summary-retainers.html [ Failure ]1001 webkit.org/b/50485 inspector/profiler/heap-snapshot-summary-show-ranges.html [ Failure ]1002 webkit.org/b/50485 inspector/profiler/heap-snapshot-summary-sorting-fields.html [ Failure ]1003 webkit.org/b/50485 inspector/profiler/heap-snapshot-summary-sorting-instances.html [ Failure ]1004 webkit.org/b/50485 inspector-protocol/heap-profiler [ Skip ]1005 1006 webkit.org/b/73936 inspector/profiler/canvas2d/canvas-has-uninstrumented-canvases.html [ Failure ]1007 webkit.org/b/73936 inspector/profiler/canvas2d/canvas-stack-trace.html [ Failure ]1008 webkit.org/b/73936 inspector/profiler/canvas2d/canvas-replay-log-grid.html [ Timeout Failure ]1009 1010 970 webkit.org/b/37613 webkit.org/b/20011 printing [ Skip ] 1011 971 webkit.org/b/37613 editing/execCommand/print.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r155713 r155714 1 2013-09-13 Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 3 [GTK] Move to the new web inspector 4 https://bugs.webkit.org/show_bug.cgi?id=120647 5 6 Reviewed by Carlos Garcia Campos. 7 8 No tests for the new inspector UI as of yet. 9 10 * GNUmakefile.am: no longer install the deprecated inspector UI files. 11 * WebCore.exp.in: add SchemeRegistry symbol that is now used. 12 1 13 2013-09-13 Darin Adler <darin@apple.com> 2 14 -
trunk/Source/WebCore/GNUmakefile.am
r155534 r155714 703 703 Source/WebCore/xml/XPathGrammar.y 704 704 705 # Installing web inspector files706 webinspectordir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/webinspector707 dist_webinspector_DATA = \708 $(WebCore)/English.lproj/localizedStrings.js \709 DerivedSources/WebCore/InspectorBackendCommands.js \710 $(shell ls $(WebCore)/inspector/front-end/*.js) \711 $(shell ls $(WebCore)/inspector/front-end/*.html) \712 $(shell ls $(WebCore)/inspector/front-end/*.css)713 714 webinspectoruglifyjsdir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/webinspector/UglifyJS715 dist_webinspectoruglifyjs_DATA = \716 $(shell ls $(WebCore)/inspector/front-end/UglifyJS/*.js)717 718 webinspectorimagesdir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/webinspector/Images719 dist_webinspectorimages_DATA = \720 $(shell ls $(WebCore)/inspector/front-end/Images/*.gif) \721 $(shell ls $(WebCore)/inspector/front-end/Images/*.png)722 723 # It seems that $(shell) does not expand when it is a rule dependency, so724 # we must redefine this list of copied files with traditional dependency wildcards.725 noinst_DATA += ${GENSOURCES_INSPECTOR}/inspector.html726 ${GENSOURCES_INSPECTOR}/inspector.html: $(WebCore)/inspector/front-end/*.html \727 $(WebCore)/inspector/front-end/*.js \728 $(WebCore)/inspector/front-end/UglifyJS/*.js \729 $(WebCore)/inspector/front-end/*.css \730 $(WebCore)/inspector/front-end/Images/* \731 DerivedSources/WebCore/InspectorBackendCommands.js \732 $(WebCore)/English.lproj/localizedStrings.js733 $(AM_V_GEN)734 $(AM_V_at)mkdir -p ${GENSOURCES_INSPECTOR}/UglifyJS735 $(AM_V_at)mkdir -p ${GENSOURCES_INSPECTOR}/Images736 $(AM_V_at)cp ${dist_webinspector_DATA} ${GENSOURCES_INSPECTOR}737 $(AM_V_at)cp ${dist_webinspectoruglifyjs_DATA} ${GENSOURCES_INSPECTOR}/UglifyJS738 $(AM_V_at)cp ${dist_webinspectorimages_DATA} ${GENSOURCES_INSPECTOR}/Images739 740 705 webresourcesdir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/images 741 706 dist_webresources_DATA = \ -
trunk/Source/WebCore/WebCore.exp.in
r155600 r155714 2575 2575 __ZNK7WebCore19InspectorController13drawHighlightERNS_15GraphicsContextE 2576 2576 __ZNK7WebCore9DOMWindow8documentEv 2577 __ZN7WebCore14SchemeRegistry27shouldTreatURLSchemeAsLocalERKN3WTF6StringE 2577 2578 #endif 2578 2579 -
trunk/Source/WebInspectorUI/ChangeLog
r155661 r155714 1 2013-09-13 Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 3 [GTK] Move to the new web inspector 4 https://bugs.webkit.org/show_bug.cgi?id=120647 5 6 Reviewed by Carlos Garcia Campos. 7 8 * GNUmakefile.am: Added. Generate the GResource source and link it into libWebCore. 9 1 10 2013-09-12 Joseph Pecoraro <pecoraro@apple.com> 2 11 -
trunk/Source/WebKit/gtk/ChangeLog
r155677 r155714 1 2013-09-13 Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 3 [GTK] Move to the new web inspector 4 https://bugs.webkit.org/show_bug.cgi?id=120647 5 6 Reviewed by Carlos Garcia Campos. 7 8 * WebCoreSupport/InspectorClientGtk.cpp: 9 (WebKit::InspectorClient::openInspectorFrontend): update paths to the internal resource ones. 10 (WebKit::InspectorClient::inspectorFilesPath): ditto. 11 * tests/testwebinspector.c: 12 (consoleMessageCallback): the new inspector currently emits an error when loading, so add it to 13 the list of messages which are not considered failures. 14 * webkit/webkitglobals.cpp: 15 (webkitInit): register resource as a local scheme; currently used by the inspector. 16 1 17 2013-09-13 Alberto Garcia <berto@igalia.com> 2 18 -
trunk/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
r150041 r155714 105 105 webkit_web_inspector_set_web_view(webInspector, inspectorWebView); 106 106 107 GOwnPtr<gchar> inspectorPath(g_build_filename(inspectorFilesPath(), "inspector.html", NULL)); 108 GOwnPtr<gchar> inspectorURI(g_filename_to_uri(inspectorPath.get(), 0, 0)); 109 webkit_web_view_load_uri(inspectorWebView, inspectorURI.get()); 107 webkit_web_view_load_uri(inspectorWebView, "resource:///org/webkitgtk/inspector/UserInterface/Main.html"); 110 108 111 109 gtk_widget_show(GTK_WIDGET(inspectorWebView)); … … 156 154 { 157 155 return doDispatchMessageOnFrontendPage(m_frontendPage, message); 158 }159 160 const char* InspectorClient::inspectorFilesPath()161 {162 if (m_inspectorFilesPath)163 return m_inspectorFilesPath.get();164 165 const char* environmentPath = getenv("WEBKIT_INSPECTOR_PATH");166 if (environmentPath && g_file_test(environmentPath, G_FILE_TEST_IS_DIR))167 m_inspectorFilesPath.set(g_strdup(environmentPath));168 else169 m_inspectorFilesPath.set(g_build_filename(sharedResourcesPath().data(), "webinspector", NULL));170 171 return m_inspectorFilesPath.get();172 156 } 173 157 … … 221 205 String InspectorFrontendClient::localizedStringsURL() 222 206 { 223 GOwnPtr<gchar> stringsPath(g_build_filename(m_inspectorClient->inspectorFilesPath(), "localizedStrings.js", NULL));224 GOwnPtr<gchar> stringsURI(g_filename_to_uri(stringsPath.get(), 0, 0));225 226 207 // FIXME: support l10n of localizedStrings.js 227 return String ::fromUTF8(stringsURI.get());208 return String("resource:///org/webkitgtk/inspector/Localizations/en.lproj/localizedStrings.js"); 228 209 } 229 210 -
trunk/Source/WebKit/gtk/tests/testwebinspector.c
r149952 r155714 40 40 static gboolean consoleMessageCallback(WebKitWebView* webView, const char* message, unsigned int line, const char* sourceId) 41 41 { 42 if (strstr(message, "Localized string") || strstr(message, "Protocol Error: the message is for non-existing domain 'Profiler'")) 42 if (strstr(message, "Localized string") || strstr(message, "Protocol Error: the message is for non-existing domain 'Profiler'") || 43 strstr(message, "Didn't find a TreeElement for a representedObject")) 43 44 return TRUE; 44 45 -
trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp
r153736 r155714 563 563 WebCore::ResourceHandle::setIgnoreSSLErrors(true); 564 564 565 WebCore::SchemeRegistry::registerURLSchemeAsLocal("resource"); 566 565 567 atexit(webkitExit); 566 568 } -
trunk/Source/WebKit2/ChangeLog
r155702 r155714 1 2013-09-13 Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 3 [GTK] Move to the new web inspector 4 https://bugs.webkit.org/show_bug.cgi?id=120647 5 6 Reviewed by Carlos Garcia Campos. 7 8 * GNUmakefile.am: bundle the remote inspector page list HTML into libwebkit2gtk as a GResource. 9 * UIProcess/API/gtk/tests/GNUmakefile.am: no need to set WEBKIT_INSPECTOR_PATH anymore. 10 * UIProcess/API/gtk/tests/InspectorTestServer.cpp: 11 (main): ditto. 12 * UIProcess/API/gtk/tests/TestInspector.cpp: 13 (beforeAll): ditto. 14 * UIProcess/API/gtk/tests/TestInspectorServer.cpp: 15 (testInspectorServerPageList): update paths to the internal resource ones. 16 * UIProcess/InspectorServer/WebInspectorServer.h: 17 * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp: 18 (WebKit::WebInspectorServer::platformResourceForPath): ditto. 19 (WebKit::WebInspectorServer::buildPageList): ditto. 20 * UIProcess/WebInspectorProxy.cpp: 21 (WebKit::isMainInspectorPage): factor out checking for the inspector main resource, to make 22 the code more readable. 23 (WebKit::decidePolicyForNavigationAction): use SchemeRegistry to figure out whether the 24 request is for a local resource instead of KURL::isLocalFile() to allow using schemes 25 other than file:// for the inspector resources. 26 * UIProcess/gtk/WebInspectorProxyGtk.cpp: 27 (WebKit::WebInspectorProxy::inspectorPageURL): use the new internal resource URL; since it's now 28 static we no longer need to generate and store the string. 29 (WebKit::WebInspectorProxy::inspectorBaseURL): ditto. 30 * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: 31 (WebKit::WebInspector::localizedStringsURL): use the new internal resource URL. 32 * UIProcess/gtk/WebContextGtk.cpp: 33 (WebKit::WebContext::platformInitializeWebProcess): register resource as a local scheme. 34 1 35 2013-09-13 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 36 -
trunk/Source/WebKit2/GNUmakefile.am
r155534 r155714 19 19 Programs/WebKitPluginProcess 20 20 endif 21 22 ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml: GNUmakefile \ 23 $(WebKit2)/UIProcess/InspectorServer/front-end/inspectorPageIndex.html 24 $(AM_V_GEN) 25 $(AM_V_at)mkdir -p ${GENSOURCES_WEBINSPECTOR_UI} 26 $(AM_V_at)echo '<?xml version="1.0" encoding="UTF-8"?>' > ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml 27 $(AM_V_at)echo '<gresources>' >> ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml 28 $(AM_V_at)echo ' <gresource prefix="/org/webkitgtk/inspector/UserInterface">' >> ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml 29 $(AM_V_at)echo " <file>inspectorPageIndex.html</file>" >> ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml 30 $(AM_V_at)echo ' </gresource>' >> ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml 31 $(AM_V_at)echo '</gresources>' >> ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml 32 33 ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.c: DerivedSources/WebInspectorUI/WebKit2GResourceBundle.xml 34 $(AM_V_GEN) 35 $(AM_V_at)glib-compile-resources --generate --sourcedir=$(WebKit2)/UIProcess/InspectorServer/front-end \ 36 --target=${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.c ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml 37 38 BUILT_SOURCES += \ 39 DerivedSources/WebInspectorUI/WebKit2GResourceBundle.xml 40 41 webkit2gtk_built_sources += \ 42 DerivedSources/WebInspectorUI/WebKit2GResourceBundle.c 21 43 22 44 # Platform … … 723 745 $(shell ls $(WebKit2)/WebProcess/soup/*.in) 724 746 725 # Installing remote inspector files726 remoteinspectordir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/webinspector727 remoteinspector_DATA = \728 $(WebKit2)/UIProcess/InspectorServer/front-end/inspectorPageIndex.html729 -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
r154540 r155714 259 259 Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp 260 260 Programs_WebKit2APITests_TestInspector_CPPFLAGS = \ 261 -DWEBKIT_INSPECTOR_PATH=\"${shell pwd}/${top_builddir}/resources/inspector\" \262 261 $(webkit2_tests_cppflags) 263 262 Programs_WebKit2APITests_TestInspector_LDADD = $(webkit2_tests_ldadd) -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp
r153085 r155714 41 41 // Overwrite WEBKIT_INSPECTOR_SERVER variable with default value. 42 42 g_setenv("WEBKIT_INSPECTOR_SERVER", "127.0.0.1:2999", TRUE); 43 44 // Overwrite WEBKIT_INSPECTOR_SERVER_PATH variable to point to inspector resources folder.45 const gchar* inspectorResourcesPath = g_getenv("WEBKIT_INSPECTOR_PATH");46 g_setenv("WEBKIT_INSPECTOR_SERVER_PATH", inspectorResourcesPath, TRUE);47 43 48 44 WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp
r154567 r155714 347 347 void beforeAll() 348 348 { 349 g_setenv("WEBKIT_INSPECTOR_PATH", WEBKIT_INSPECTOR_PATH, FALSE);350 349 InspectorTest::add("WebKitWebInspector", "default", testInspectorDefault); 351 350 CustomInspectorTest::add("WebKitWebInspector", "manual-attach-detach", testInspectorManualAttachDetach); -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp
r155642 r155714 156 156 157 157 // Test to get inspector server page list from the test server. 158 // Should contain only one entry pointing to http://127.0.0.1:2999/webinspector/ inspector.html?page=1158 // Should contain only one entry pointing to http://127.0.0.1:2999/webinspector/Main.html?page=1 159 159 static void testInspectorServerPageList(InspectorServerTest* test, gconstpointer) 160 160 { … … 185 185 g_assert(!error.get()); 186 186 valueString.set(WebViewTest::javascriptResultToCString(javascriptResult)); 187 String validInspectorURL = String("/ inspector.html?page=") + String::number(pageId);187 String validInspectorURL = String("/Main.html?page=") + String::number(pageId); 188 188 ASSERT_CMP_CSTRING(valueString.get(), ==, validInspectorURL.utf8()); 189 189 } -
trunk/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h
r150582 r155714 68 68 void closeConnection(WebInspectorProxy*, WebSocketServerConnection*); 69 69 70 #if PLATFORM(GTK)71 String inspectorServerFilesPath();72 String m_inspectorServerFilesPath;73 #endif74 70 unsigned m_nextAvailablePageId; 75 71 ClientMap m_clientMap; -
trunk/Source/WebKit2/UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp
r153085 r155714 37 37 #include <wtf/text/CString.h> 38 38 #include <wtf/text/StringBuilder.h> 39 #include <wtf/text/StringConcatenate.h> 39 40 40 41 namespace WebKit { … … 49 50 50 51 // Point the default path to a formatted page that queries the page list and display them. 51 CString localPath = WebCore::fileSystemRepresentation(inspectorServerFilesPath() + ((path == "/") ? "/inspectorPageIndex.html" : path));52 if ( localPath.isNull())52 CString resourceURI = makeString("resource:///org/webkitgtk/inspector/UserInterface", ((path == "/") ? "/inspectorPageIndex.html" : path)).utf8(); 53 if (resourceURI.isNull()) 53 54 return false; 54 55 55 GRefPtr<GFile> file = adoptGRef(g_file_new_for_ path(localPath.data()));56 GRefPtr<GFile> file = adoptGRef(g_file_new_for_uri(resourceURI.data())); 56 57 GOwnPtr<GError> error; 57 58 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())); … … 62 63 builder.appendLiteral(", "); 63 64 builder.append(error->message); 64 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>");65 builder.appendLiteral(" occurred during fetching inspector resource files.</body></html>"); 65 66 CString cstr = builder.toString().utf8(); 66 67 data.append(cstr.data(), cstr.length()); … … 98 99 builder.append(webPage->activeURL()); 99 100 builder.appendLiteral("\", \"inspectorUrl\": \""); 100 builder.appendLiteral("/ inspector.html?page=");101 builder.appendLiteral("/Main.html?page="); 101 102 builder.appendNumber(it->key); 102 103 builder.appendLiteral("\" }"); … … 108 109 } 109 110 110 String WebInspectorServer::inspectorServerFilesPath()111 {112 if (!m_inspectorServerFilesPath.isNull())113 return m_inspectorServerFilesPath;114 115 const char* environmentPath = g_getenv("WEBKIT_INSPECTOR_SERVER_PATH");116 if (environmentPath && g_file_test(environmentPath, G_FILE_TEST_IS_DIR))117 m_inspectorServerFilesPath = String(environmentPath);118 else119 m_inspectorServerFilesPath = String(WebCore::sharedResourcesPath().data()) + "/webinspector";120 121 return m_inspectorServerFilesPath;122 }123 124 111 } 125 112 #endif -
trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp
r154828 r155714 40 40 #include "WebProcessProxy.h" 41 41 #include "WebURLRequest.h" 42 #include <WebCore/SchemeRegistry.h> 42 43 43 44 #if ENABLE(INSPECTOR_SERVER) … … 314 315 } 315 316 317 static bool isMainInspectorPage(const WebInspectorProxy* webInspectorProxy, WKURLRequestRef requestRef) 318 { 319 // Use KURL so we can compare just the paths. 320 KURL inspectorURL(KURL(), webInspectorProxy->inspectorPageURL()); 321 KURL requestURL(KURL(), toImpl(requestRef)->url()); 322 323 ASSERT(WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(inspectorURL.protocol())); 324 325 return WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(requestURL.protocol()) && decodeURLEscapeSequences(requestURL.path()) == decodeURLEscapeSequences(inspectorURL.path()); 326 } 327 316 328 static void decidePolicyForNavigationAction(WKPageRef, WKFrameRef frameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKURLRequestRef requestRef, WKFramePolicyListenerRef listenerRef, WKTypeRef, const void* clientInfo) 317 329 { … … 325 337 ASSERT(webInspectorProxy); 326 338 327 // Use KURL so we can compare just the fileSystemPaths.328 KURL inspectorURL(KURL(), webInspectorProxy->inspectorPageURL());329 KURL requestURL(KURL(), toImpl(requestRef)->url());330 331 ASSERT(inspectorURL.isLocalFile());332 333 339 // Allow loading of the main inspector file. 334 if ( requestURL.isLocalFile() && requestURL.fileSystemPath() == inspectorURL.fileSystemPath()) {340 if (isMainInspectorPage(webInspectorProxy, requestRef)) { 335 341 toImpl(listenerRef)->use(); 336 342 return; -
trunk/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp
r151429 r155714 37 37 #include <WebCore/FileSystem.h> 38 38 #include <WebCore/NotImplemented.h> 39 #include <WebCore/SchemeRegistry.h> 39 40 #include <wtf/gobject/GOwnPtr.h> 40 41 #include <wtf/text/CString.h> … … 89 90 initInspectorServer(); 90 91 92 if (!parameters.urlSchemesRegisteredAsLocal.contains("resource")) { 93 WebCore::SchemeRegistry::registerURLSchemeAsLocal("resource"); 94 parameters.urlSchemesRegisteredAsLocal.append("resource"); 95 } 96 91 97 parameters.urlSchemesRegistered = supplement<WebSoupRequestManagerProxy>()->registeredURISchemes(); 92 98 supplement<WebCookieManagerProxy>()->getCookiePersistentStorage(parameters.cookiePersistentStoragePath, parameters.cookiePersistentStorageType); -
trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp
r154828 r155714 44 44 namespace WebKit { 45 45 46 static const char* inspectorFilesBasePath()47 {48 const gchar* environmentPath = g_getenv("WEBKIT_INSPECTOR_PATH");49 if (environmentPath && g_file_test(environmentPath, G_FILE_TEST_IS_DIR))50 return environmentPath;51 52 static const char* inspectorFilesPath = DATA_DIR G_DIR_SEPARATOR_S "webkitgtk-" WEBKITGTK_API_VERSION_STRING53 G_DIR_SEPARATOR_S "webinspector" G_DIR_SEPARATOR_S;54 return inspectorFilesPath;55 }56 57 46 static void inspectorViewDestroyed(GtkWidget*, gpointer userData) 58 47 { … … 161 150 String WebInspectorProxy::inspectorPageURL() const 162 151 { 163 GOwnPtr<gchar> filePath(g_build_filename(inspectorFilesBasePath(), "inspector.html", NULL)); 164 GOwnPtr<gchar> fileURI(g_filename_to_uri(filePath.get(), 0, 0)); 165 return WebCore::filenameToString(fileURI.get()); 152 return String("resource:///org/webkitgtk/inspector/UserInterface/Main.html"); 166 153 } 167 154 168 155 String WebInspectorProxy::inspectorBaseURL() const 169 156 { 170 GOwnPtr<gchar> fileURI(g_filename_to_uri(inspectorFilesBasePath(), 0, 0)); 171 return WebCore::filenameToString(fileURI.get()); 157 return String("resource:///org/webkitgtk/inspector/UserInterface/"); 172 158 } 173 159 -
trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebInspectorGtk.cpp
r149923 r155714 44 44 String WebInspector::localizedStringsURL() const 45 45 { 46 GOwnPtr<gchar> filePath; 47 const gchar* environmentPath = g_getenv("WEBKIT_INSPECTOR_PATH"); 48 if (environmentPath && g_file_test(environmentPath, G_FILE_TEST_IS_DIR)) 49 filePath.set(g_build_filename(environmentPath, "localizedStrings.js", NULL)); 50 else 51 filePath.set(g_build_filename(WebCore::sharedResourcesPath().data(), "webinspector", "localizedStrings.js", NULL)); 52 53 GOwnPtr<gchar> fileURI(g_filename_to_uri(filePath.get(), 0, 0)); 54 return WebCore::filenameToString(fileURI.get()); 46 return String("resource:///org/webkitgtk/inspector/Localizations/en.lproj/localizedStrings.js"); 55 47 } 56 48 -
trunk/Tools/ChangeLog
r155699 r155714 1 2013-09-13 Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 3 [GTK] Move to the new web inspector 4 https://bugs.webkit.org/show_bug.cgi?id=120647 5 6 Reviewed by Carlos Garcia Campos. 7 8 * GtkLauncher/main.c: 9 (main): no longer set WEBKIT_INSPECTOR_PATH. 10 * MiniBrowser/gtk/main.c: 11 (main): ditto. 12 * Scripts/old-run-webkit-tests: 13 (openDumpTool): ditto. 14 * Scripts/run-gtk-tests: ditto. 15 * Scripts/webkitpy/port/gtk.py: 16 (GtkPort.setup_environ_for_server): ditto. 17 1 18 2013-09-13 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 19 -
trunk/Tools/GtkLauncher/main.c
r149952 r155714 535 535 #endif 536 536 537 #ifdef WEBKIT_EXEC_PATH538 g_setenv("WEBKIT_INSPECTOR_PATH", WEBKIT_EXEC_PATH "resources/inspector", FALSE);539 #endif /* WEBKIT_EXEC_PATH */540 541 537 WebKitWebView *webView; 542 538 GtkWidget *main_window = createWindow(&webView); -
trunk/Tools/MiniBrowser/gtk/main.c
r154841 r155714 264 264 g_option_context_free (context); 265 265 266 #ifdef WEBKIT_EXEC_PATH267 g_setenv("WEBKIT_INSPECTOR_PATH", WEBKIT_EXEC_PATH "resources/inspector", FALSE);268 #endif /* WEBKIT_EXEC_PATH */269 266 g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE); 270 267 -
trunk/Tools/Scripts/old-run-webkit-tests
r152852 r155714 1506 1506 $CLEAN_ENV{LIBOVERLAY_SCROLLBAR} = "0"; 1507 1507 $CLEAN_ENV{GTK_MODULES} = "gail"; 1508 $CLEAN_ENV{WEBKIT_INSPECTOR_PATH} = "$productDir/resources/inspector";1509 1508 1510 1509 if ($useWebKitTestRunner) { -
trunk/Tools/Scripts/run-gtk-tests
r155606 r155714 189 189 def _setup_testing_environment(self): 190 190 self._test_env = os.environ 191 self._test_env["WEBKIT_INSPECTOR_PATH"] = os.path.abspath(os.path.join(self._programs_path, 'resources', 'inspector'))192 191 self._test_env['GSETTINGS_BACKEND'] = 'memory' 193 192 self._test_env["TEST_WEBKIT_API_WEBKIT2_RESOURCES_PATH"] = common.top_level_path("Tools", "TestWebKitAPI", "Tests", "WebKit2") -
trunk/Tools/Scripts/webkitpy/port/gtk.py
r155614 r155714 92 92 environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('Libraries', 'libTestRunnerInjectedBundle.la') 93 93 environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('TestNetscapePlugin', '.libs') 94 environment['WEBKIT_INSPECTOR_PATH'] = self._build_path('Programs', 'resources', 'inspector')95 94 environment['AUDIO_RESOURCES_PATH'] = self.path_from_webkit_base('Source', 'WebCore', 'platform', 'audio', 'resources') 96 95 self._copy_value_from_environ_if_set(environment, 'WEBKIT_OUTPUTDIR')
Note: See TracChangeset
for help on using the changeset viewer.