Title: [123703] trunk/Source/WebKit2
- Revision
- 123703
- Author
- [email protected]
- Date
- 2012-07-25 20:02:20 -0700 (Wed, 25 Jul 2012)
Log Message
[EFL][WK2] Implement the inspector for WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=92213
Patch by Seokju Kwon <[email protected]> on 2012-07-25
Reviewed by Ryosuke Niwa.
Partial Implementation of WebInspectorProxyEfl for WebkitTestRunner.
And Web Inspector resources installation.
* PlatformEfl.cmake:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy):
* UIProcess/WebInspectorProxy.h:
(WebInspectorProxy):
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (123702 => 123703)
--- trunk/Source/WebKit2/ChangeLog 2012-07-26 02:52:45 UTC (rev 123702)
+++ trunk/Source/WebKit2/ChangeLog 2012-07-26 03:02:20 UTC (rev 123703)
@@ -1,3 +1,24 @@
+2012-07-25 Seokju Kwon <[email protected]>
+
+ [EFL][WK2] Implement the inspector for WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=92213
+
+ Reviewed by Ryosuke Niwa.
+
+ Partial Implementation of WebInspectorProxyEfl for WebkitTestRunner.
+ And Web Inspector resources installation.
+
+ * PlatformEfl.cmake:
+ * UIProcess/WebInspectorProxy.cpp:
+ (WebKit::WebInspectorProxy::WebInspectorProxy):
+ * UIProcess/WebInspectorProxy.h:
+ (WebInspectorProxy):
+ * UIProcess/efl/WebInspectorProxyEfl.cpp:
+ (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+ (WebKit::WebInspectorProxy::platformDidClose):
+ (WebKit::WebInspectorProxy::inspectorPageURL):
+ (WebKit::WebInspectorProxy::inspectorBaseURL):
+
2012-07-25 Caio Marcelo de Oliveira Filho <[email protected]>
Create a specialized struct for use in HashMap iterators
Modified: trunk/Source/WebKit2/PlatformEfl.cmake (123702 => 123703)
--- trunk/Source/WebKit2/PlatformEfl.cmake 2012-07-26 02:52:45 UTC (rev 123702)
+++ trunk/Source/WebKit2/PlatformEfl.cmake 2012-07-26 03:02:20 UTC (rev 123703)
@@ -252,3 +252,24 @@
TARGET_LINK_LIBRARIES(${testName} ${EWK2UnitTests_LIBRARIES} ewk2UnitTestUtils)
ENDFOREACH ()
ENDIF ()
+
+IF (ENABLE_INSPECTOR)
+ SET(WK2_WEB_INSPECTOR_DIR ${CMAKE_BINARY_DIR}/WebKit2/efl/webinspector)
+ SET(WK2_WEB_INSPECTOR_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${WebKit2_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR})
+ ADD_DEFINITIONS(-DWK2_WEB_INSPECTOR_DIR="${WK2_WEB_INSPECTOR_DIR}")
+ ADD_DEFINITIONS(-DWK2_WEB_INSPECTOR_INSTALL_DIR="${WK2_WEB_INSPECTOR_INSTALL_DIR}/webinspector")
+ ADD_CUSTOM_TARGET(
+ wk2-web-inspector-resources ALL
+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBCORE_DIR}/inspector/front-end ${WK2_WEB_INSPECTOR_DIR}
+ COMMAND ${CMAKE_COMMAND} -E copy ${WEBCORE_DIR}/English.lproj/localizedStrings.js ${WK2_WEB_INSPECTOR_DIR}
+ COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendCommands.js ${WK2_WEB_INSPECTOR_DIR}/InspectorBackendCommands.js
+ DEPENDS ${WebCore_LIBRARY_NAME}
+ )
+ INSTALL(DIRECTORY ${WK2_WEB_INSPECTOR_DIR}
+ DESTINATION ${WK2_WEB_INSPECTOR_INSTALL_DIR}
+ FILES_MATCHING PATTERN "*.js"
+ PATTERN "*.html"
+ PATTERN "*.css"
+ PATTERN "*.gif"
+ PATTERN "*.png")
+ENDIF ()
Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp (123702 => 123703)
--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp 2012-07-26 02:52:45 UTC (rev 123702)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp 2012-07-26 03:02:20 UTC (rev 123703)
@@ -80,7 +80,7 @@
, m_isProfilingPage(false)
#if PLATFORM(WIN)
, m_inspectorWindow(0)
-#elif PLATFORM(GTK)
+#elif PLATFORM(GTK) || PLATFORM(EFL)
, m_inspectorView(0)
, m_inspectorWindow(0)
#endif
Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h (123702 => 123703)
--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h 2012-07-26 02:52:45 UTC (rev 123702)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h 2012-07-26 03:02:20 UTC (rev 123703)
@@ -52,6 +52,11 @@
#include "WebInspectorClientGtk.h"
#endif
+#if PLATFORM(EFL)
+#include <Ecore_Evas.h>
+#include <Evas.h>
+#endif
+
namespace WebKit {
class WebFrameProxy;
@@ -217,6 +222,9 @@
WebInspectorClientGtk m_client;
GtkWidget* m_inspectorView;
GtkWidget* m_inspectorWindow;
+#elif PLATFORM(EFL)
+ Evas_Object* m_inspectorView;
+ Ecore_Evas* m_inspectorWindow;
#endif
#if ENABLE(INSPECTOR_SERVER)
int m_remoteInspectionPageId;
Modified: trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp (123702 => 123703)
--- trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp 2012-07-26 02:52:45 UTC (rev 123702)
+++ trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp 2012-07-26 03:02:20 UTC (rev 123703)
@@ -28,15 +28,25 @@
#if ENABLE(INSPECTOR)
+#include "WebProcessProxy.h"
+#include "ewk_view_private.h"
#include <WebCore/NotImplemented.h>
+#include <unistd.h>
+#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
namespace WebKit {
WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
{
- notImplemented();
- return 0;
+ ASSERT(m_page);
+
+ m_inspectorWindow = ecore_evas_buffer_new(initialWindowWidth, initialWindowHeight);
+ if (!m_inspectorWindow)
+ return 0;
+
+ m_inspectorView = ewk_view_base_add(ecore_evas_get(m_inspectorWindow), toAPI(page()->process()->context()), toAPI(inspectorPageGroup()));
+ return ewk_view_page_get(m_inspectorView);
}
void WebInspectorProxy::platformOpen()
@@ -46,7 +56,15 @@
void WebInspectorProxy::platformDidClose()
{
- notImplemented();
+ if (m_inspectorView) {
+ evas_object_del(m_inspectorView);
+ m_inspectorView = 0;
+ }
+
+ if (m_inspectorWindow) {
+ ecore_evas_free(m_inspectorWindow);
+ m_inspectorWindow = 0;
+ }
}
void WebInspectorProxy::platformBringToFront()
@@ -67,14 +85,16 @@
String WebInspectorProxy::inspectorPageURL() const
{
- notImplemented();
- return String();
+ return makeString(inspectorBaseURL(), "/inspector.html");
}
String WebInspectorProxy::inspectorBaseURL() const
{
- notImplemented();
- return String();
+ String inspectorFilesPath = makeString("file://", WK2_WEB_INSPECTOR_INSTALL_DIR);
+ if (access(inspectorFilesPath.utf8().data(), R_OK))
+ inspectorFilesPath = makeString("file://", WK2_WEB_INSPECTOR_DIR);
+
+ return inspectorFilesPath;
}
unsigned WebInspectorProxy::platformInspectedWindowHeight()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes