[EFL] Share resources installed for inspector
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 16:19:51 +0000 (16:19 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 16:19:51 +0000 (16:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=98991

Reviewed by Gyuyoung Kim.

.:

Now, WebKit1/Efl and WebKit2/Efl install same resources to different directory
when INSPECTOR is enabled.

This patch changes to install resources one time and share it.

* Source/PlatformEfl.cmake:
Extracted build scripts which install resources from WebKit/PlatformEfl.cmake.
* Source/cmake/OptionsEfl.cmake:

Source/WebKit:

* PlatformEfl.cmake:
Extracted build scripts which install resources to WebKit/PlatformEfl.cmake.

Source/WebKit2:

* PlatformEfl.cmake: Removed build script which install resources to share.
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL): Modified not to use makeString.
(WebKit::WebInspectorProxy::inspectorBaseURL): Changed resource path.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131189 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/PlatformEfl.cmake
Source/WebKit/ChangeLog
Source/WebKit/PlatformEfl.cmake
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformEfl.cmake
Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp
Source/cmake/OptionsEfl.cmake

index 9890d04..eb9be49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2012-10-12  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL] Share resources installed for inspector
+        https://bugs.webkit.org/show_bug.cgi?id=98991
+
+        Reviewed by Gyuyoung Kim.
+
+        Now, WebKit1/Efl and WebKit2/Efl install same resources to different directory
+        when INSPECTOR is enabled.
+
+        This patch changes to install resources one time and share it.
+
+        * Source/PlatformEfl.cmake:
+        Extracted build scripts which install resources from WebKit/PlatformEfl.cmake.
+        * Source/cmake/OptionsEfl.cmake:
+
 2012-10-12  Balazs Kelemen  <kbalazs@webkit.org>
 
         Unreviewed, rolling out r130389.
index 5406615..df128fd 100644 (file)
@@ -1 +1,19 @@
 ADD_SUBDIRECTORY(${WEBKIT_DIR}/efl/DefaultTheme)
+
+IF (ENABLE_INSPECTOR)
+    ADD_CUSTOM_TARGET(
+        web-inspector-resources ALL
+        COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBCORE_DIR}/inspector/front-end ${WEB_INSPECTOR_DIR}
+        COMMAND ${CMAKE_COMMAND} -E copy ${WEBCORE_DIR}/English.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR}
+        COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendCommands.js ${WEB_INSPECTOR_DIR}/InspectorBackendCommands.js
+        DEPENDS ${WebCore_LIBRARY_NAME}
+        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+    )
+    INSTALL(DIRECTORY "${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}"
+        DESTINATION ${DATA_INSTALL_DIR}
+        FILES_MATCHING PATTERN "*.js"
+                       PATTERN "*.html"
+                       PATTERN "*.css"
+                       PATTERN "*.gif"
+                       PATTERN "*.png")
+ENDIF ()
index 35396c8..237010f 100644 (file)
@@ -1,3 +1,13 @@
+2012-10-12  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL] Share resources installed for inspector
+        https://bugs.webkit.org/show_bug.cgi?id=98991
+
+        Reviewed by Gyuyoung Kim.
+
+        * PlatformEfl.cmake:
+        Extracted build scripts which install resources to WebKit/PlatformEfl.cmake.
+
 2012-10-11  Chris Guan  <chris.guan@torchmobile.com.cn>
 
         [Blackberry] makes NavigatorContentUtils work
index f9b8856..596c911 100644 (file)
@@ -255,22 +255,3 @@ IF (ENABLE_API_TESTS)
     ENDFOREACH ()
 ENDIF ()
 
-IF (ENABLE_INSPECTOR)
-    SET(WEB_INSPECTOR_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/webinspector)
-    ADD_DEFINITIONS(-DWEB_INSPECTOR_DIR="${WEB_INSPECTOR_DIR}")
-    ADD_DEFINITIONS(-DWEB_INSPECTOR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/webinspector")
-    ADD_CUSTOM_TARGET(
-        web-inspector-resources ALL
-        COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBCORE_DIR}/inspector/front-end ${WEB_INSPECTOR_DIR}
-        COMMAND ${CMAKE_COMMAND} -E copy ${WEBCORE_DIR}/English.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR}
-        COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendCommands.js ${WEB_INSPECTOR_DIR}/InspectorBackendCommands.js
-        DEPENDS ${WebCore_LIBRARY_NAME}
-    )
-    INSTALL(DIRECTORY ${WEB_INSPECTOR_DIR}
-        DESTINATION ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}
-        FILES_MATCHING PATTERN "*.js"
-                       PATTERN "*.html"
-                       PATTERN "*.css"
-                       PATTERN "*.gif"
-                       PATTERN "*.png")
-ENDIF ()
index 599c8a4..fc39ab8 100644 (file)
@@ -1,3 +1,15 @@
+2012-10-12  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL] Share resources installed for inspector
+        https://bugs.webkit.org/show_bug.cgi?id=98991
+
+        Reviewed by Gyuyoung Kim.
+
+        * PlatformEfl.cmake: Removed build script which install resources to share.
+        * UIProcess/efl/WebInspectorProxyEfl.cpp:
+        (WebKit::WebInspectorProxy::inspectorPageURL): Modified not to use makeString.
+        (WebKit::WebInspectorProxy::inspectorBaseURL): Changed resource path.
+
 2012-10-12  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r131160.
index a12f44a..c0d99a0 100644 (file)
@@ -346,24 +346,3 @@ IF (ENABLE_API_TESTS)
     ADD_LIBRARY(ewk2UnitTestInjectedBundleSample SHARED ${TEST_INJECTED_BUNDLE_DIR}/injected_bundle_sample.cpp)
     TARGET_LINK_LIBRARIES(ewk2UnitTestInjectedBundleSample ${WebKit2_LIBRARY_NAME})
 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 ()
index 7f69c2e..e0df019 100644 (file)
@@ -35,6 +35,7 @@
 #include <WebCore/NotImplemented.h>
 #include <unistd.h>
 #include <wtf/text/CString.h>
+#include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebKit {
@@ -139,14 +140,18 @@ void WebInspectorProxy::platformInspectedURLChanged(const String&)
 
 String WebInspectorProxy::inspectorPageURL() const
 {
-    return makeString(inspectorBaseURL(), "/inspector.html");
+    StringBuilder builder;
+    builder.append(inspectorPageURL());
+    builder.appendLiteral("/inspector.html");
+
+    return builder.toString();
 }
 
 String WebInspectorProxy::inspectorBaseURL() const
 {
-    String inspectorFilesPath = makeString("file://", WK2_WEB_INSPECTOR_INSTALL_DIR);
+    String inspectorFilesPath = ASCIILiteral("file://" WEB_INSPECTOR_INSTALL_DIR);
     if (access(inspectorFilesPath.utf8().data(), R_OK))
-        inspectorFilesPath = makeString("file://", WK2_WEB_INSPECTOR_DIR);
+        inspectorFilesPath = ASCIILiteral("file://" WEB_INSPECTOR_DIR);
 
     return inspectorFilesPath;
 }
index b2771e9..e929d23 100644 (file)
@@ -157,6 +157,12 @@ IF (ENABLE_WEBGL)
   FIND_PACKAGE(OpenGL REQUIRED)
 ENDIF ()
 
+IF (ENABLE_INSPECTOR)
+    SET(WEB_INSPECTOR_DIR "${DATA_INSTALL_DIR}/inspector")
+    ADD_DEFINITIONS(-DWEB_INSPECTOR_DIR=\"${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}\")
+    ADD_DEFINITIONS(-DWEB_INSPECTOR_INSTALL_DIR=\"${CMAKE_INSTALL_PREFIX}/${WEB_INSPECTOR_DIR}\")
+ENDIF ()
+
 SET(CPACK_SOURCE_GENERATOR TBZ2)
 
 IF (WTF_USE_TILED_BACKING_STORE)