Commit 58ad2803 authored by rakuco@webkit.org's avatar rakuco@webkit.org

[EFL] Declare TEST_THEME_DIR in a single place.

https://bugs.webkit.org/show_bug.cgi?id=114285

Reviewed by Anders Carlsson.

.:

Instead of adding the `THEME_DIR' preprocessor variable in many
different CMakeList.txt files in the tree, declare it in
OptionsEfl.cmake so that we avoid needlessly duplicating code around.

While here, rename it to `TEST_THEME_DIR', which is the name used our
WebKit2 infrastructure, to better reflect the purpose of this value.

* Source/cmake/OptionsEfl.cmake: Add the TEST_THEME_DIR preprocessor
definition.

Source/WebKit2:

* PlatformEfl.cmake: Remove definition of `TEST_THEME_DIR', which is
now defined in OptionsEfl.cmake.

Tools:

Adapt to the renaming of `THEME_DIR' to `TEST_THEME_DIR'.

* DumpRenderTree/efl/CMakeLists.txt:
* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::createView):
(DumpRenderTreeChrome::createInspectorView):
(DumpRenderTreeChrome::initialize):
(DumpRenderTreeChrome::onDownloadRequest):
* EWebLauncher/CMakeLists.txt:
* EWebLauncher/main.c:
(findThemePath):
* EWebLauncher/url_bar.c:
(url_bar_add):
* MiniBrowser/efl/CMakeLists.txt:
* MiniBrowser/efl/main.c:
(window_create):
* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/efl/PlatformWebView.cpp:
(TestWebKitAPI::PlatformWebView::PlatformWebView):
* WebKitTestRunner/PlatformEfl.cmake:
* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::PlatformWebView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c66038fa
2013-04-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
[EFL] Declare TEST_THEME_DIR in a single place.
https://bugs.webkit.org/show_bug.cgi?id=114285
Reviewed by Anders Carlsson.
Instead of adding the `THEME_DIR' preprocessor variable in many
different CMakeList.txt files in the tree, declare it in
OptionsEfl.cmake so that we avoid needlessly duplicating code around.
While here, rename it to `TEST_THEME_DIR', which is the name used our
WebKit2 infrastructure, to better reflect the purpose of this value.
* Source/cmake/OptionsEfl.cmake: Add the TEST_THEME_DIR preprocessor
definition.
2013-04-09 ChangSeok Oh <changseok.oh@collabora.com>
[GTK][AC] upversion of clutter and its dependecy
......
2013-04-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
[EFL] Declare TEST_THEME_DIR in a single place.
https://bugs.webkit.org/show_bug.cgi?id=114285
Reviewed by Anders Carlsson.
* PlatformEfl.cmake: Remove definition of `TEST_THEME_DIR', which is
now defined in OptionsEfl.cmake.
2013-04-09 Rafael Brandao <rafael.lobo@openbossa.org>
[CoordinatedGraphics] serviceScriptedAnimations expects time in seconds
......@@ -383,7 +383,6 @@ set(TEST_INJECTED_BUNDLE_DIR ${WEBKIT2_EFL_TEST_DIR}/InjectedBundle)
add_definitions(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
-DTEST_LIB_DIR=\"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\"
-DTEST_THEME_DIR=\"${THEME_BINARY_DIR}\"
-DGTEST_LINKED_AS_SHARED_LIBRARY=1
-DLIBEXECDIR=\"${CMAKE_INSTALL_PREFIX}/${EXEC_INSTALL_DIR}\"
-DWEBPROCESSNAME=\"${WebProcess_EXECUTABLE_NAME}\"
......
......@@ -47,7 +47,8 @@ set(DATA_INSTALL_DIR "share/${WebKit_LIBRARY_NAME}-${PROJECT_VERSION_MAJOR}" CAC
set(THEME_BINARY_DIR ${CMAKE_BINARY_DIR}/WebCore/platform/efl/DefaultTheme)
file(MAKE_DIRECTORY ${THEME_BINARY_DIR})
add_definitions(-DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}")
add_definitions(-DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}"
-DTEST_THEME_DIR="${THEME_BINARY_DIR}")
set(VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/eflsymbols.filter")
......
2013-04-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
[EFL] Declare TEST_THEME_DIR in a single place.
https://bugs.webkit.org/show_bug.cgi?id=114285
Reviewed by Anders Carlsson.
Adapt to the renaming of `THEME_DIR' to `TEST_THEME_DIR'.
* DumpRenderTree/efl/CMakeLists.txt:
* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::createView):
(DumpRenderTreeChrome::createInspectorView):
(DumpRenderTreeChrome::initialize):
(DumpRenderTreeChrome::onDownloadRequest):
* EWebLauncher/CMakeLists.txt:
* EWebLauncher/main.c:
(findThemePath):
* EWebLauncher/url_bar.c:
(url_bar_add):
* MiniBrowser/efl/CMakeLists.txt:
* MiniBrowser/efl/main.c:
(window_create):
* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/efl/PlatformWebView.cpp:
(TestWebKitAPI::PlatformWebView::PlatformWebView):
* WebKitTestRunner/PlatformEfl.cmake:
* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::PlatformWebView):
2013-04-09 ChangSeok Oh <changseok.oh@collabora.com>
[GTK][AC] upversion of clutter and its dependecy
......@@ -133,8 +133,7 @@ endif ()
# FIXME: DOWNLOADED_FONTS_DIR should not hardcode the directory
# structure. See <https://bugs.webkit.org/show_bug.cgi?id=81475>.
add_definitions(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
-DDOWNLOADED_FONTS_DIR="${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-0.0.3"
-DDATA_DIR="${THEME_BINARY_DIR}")
-DDOWNLOADED_FONTS_DIR="${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-0.0.3")
include_directories(${DumpRenderTree_INCLUDE_DIRECTORIES})
......
......@@ -102,7 +102,7 @@ Evas_Object* DumpRenderTreeChrome::createView() const
if (!view)
return 0;
ewk_view_theme_set(view, DATA_DIR"/default.edj");
ewk_view_theme_set(view, TEST_THEME_DIR "/default.edj");
evas_object_smart_callback_add(view, "download,request", onDownloadRequest, 0);
evas_object_smart_callback_add(view, "load,resource,failed", onResourceLoadFailed, 0);
......@@ -153,7 +153,7 @@ Evas_Object* DumpRenderTreeChrome::createInspectorView()
const bool ignoreMessages = true;
evas_object_data_set(inspectorView, "ignore-console-messages", &ignoreMessages);
ewk_view_theme_set(inspectorView, DATA_DIR"/default.edj");
ewk_view_theme_set(inspectorView, TEST_THEME_DIR "/default.edj");
Evas_Object* mainFrame = ewk_view_frame_main_get(inspectorView);
evas_object_smart_callback_add(mainFrame, "load,finished", onInspectorFrameLoadFinished, 0);
......@@ -208,7 +208,7 @@ bool DumpRenderTreeChrome::initialize()
if (!m_mainView)
return false;
ewk_view_theme_set(m_mainView, DATA_DIR"/default.edj");
ewk_view_theme_set(m_mainView, TEST_THEME_DIR "/default.edj");
evas_object_name_set(m_mainView, "m_mainView");
evas_object_move(m_mainView, 0, 0);
......@@ -859,7 +859,7 @@ void DumpRenderTreeChrome::onDownloadRequest(void*, Evas_Object*, void* eventInf
return;
Ewk_Download* download = static_cast<Ewk_Download*>(eventInfo);
ewk_view_theme_set(newView, DATA_DIR"/default.edj");
ewk_view_theme_set(newView, TEST_THEME_DIR "/default.edj");
ewk_view_uri_set(newView, download->url);
browser->m_extraViews.append(newView);
......
......@@ -39,8 +39,6 @@ set(EWebLauncher_INCLUDE_DIRECTORIES
${LIBSOUP_INCLUDE_DIRS}
)
add_definitions(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
include_directories(${EWebLauncher_INCLUDE_DIRECTORIES})
add_executable(EWebLauncher ${EWebLauncher_SOURCES})
target_link_libraries(EWebLauncher ${EWebLauncher_LIBRARIES})
......
......@@ -911,7 +911,7 @@ main_signal_exit(void *data, int ev_type, void *ev)
static char *
findThemePath(const char *theme)
{
const char *default_theme = THEME_DIR"/default.edj";
const char *default_theme = TEST_THEME_DIR "/default.edj";
char *rpath;
struct stat st;
......
......@@ -103,7 +103,7 @@ url_bar_add(Evas_Object *webView, int width)
evas_object_color_set(url_bar->area, 255, 255, 255, 255);
url_bar->entry = edje_object_add(evas);
Eina_Bool ret = edje_object_file_set(url_bar->entry, THEME_DIR"/entry.edj", "control/entry/base/default");
Eina_Bool ret = edje_object_file_set(url_bar->entry, TEST_THEME_DIR "/entry.edj", "control/entry/base/default");
if (!ret) {
evas_object_del(url_bar->area);
......
......@@ -54,8 +54,6 @@ set(MiniBrowser_LIBRARIES
${SQLITE_LIBRARIES}
)
add_definitions(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
if (ELEMENTARY_FOUND)
include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
add_executable(MiniBrowser ${MiniBrowser_SOURCES})
......
......@@ -1431,7 +1431,7 @@ static Browser_Window *window_create(Evas_Object *opener, const char *url, int w
Ewk_Page_Group *pageGroup = opener ? ewk_view_page_group_get(opener) : ewk_page_group_create("");
window->ewk_view = ewk_view_smart_add(evas, smart, context, pageGroup);
}
ewk_view_theme_set(window->ewk_view, THEME_DIR "/default.edj");
ewk_view_theme_set(window->ewk_view, TEST_THEME_DIR "/default.edj");
if (device_pixel_ratio)
ewk_view_device_pixel_ratio_set(window->ewk_view, (float)device_pixel_ratio);
ewk_view_source_mode_set(window->ewk_view, view_mode);
......
......@@ -108,8 +108,6 @@ set(test_webkit2_api_fail_BINARIES
WKPageGetScaleFactorNotZero
)
add_definitions(-DTHEME_DIR="${THEME_BINARY_DIR}")
# Tests disabled because of missing features on the test harness:
#
# ResponsivenessTimerDoesntFireEarly
......
......@@ -69,7 +69,7 @@ PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGro
m_view = EWKViewCreate(contextRef, pageGroupRef, ecore_evas_get(m_window), /* smart */ 0);
WKRetainPtr<WKStringRef> wkTheme = adoptWK(WKStringCreateWithUTF8CString(THEME_DIR "/default.edj"));
WKRetainPtr<WKStringRef> wkTheme = adoptWK(WKStringCreateWithUTF8CString(TEST_THEME_DIR "/default.edj"));
WKViewSetThemePath(EWKViewGetWKView(m_view), wkTheme.get());
evas_object_smart_callback_add(m_view, "webprocess,crashed", onWebProcessCrashed, 0);
......
......@@ -65,8 +65,7 @@ list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
# FIXME: DOWNLOADED_FONTS_DIR should not hardcode the directory
# structure. See <https://bugs.webkit.org/show_bug.cgi?id=81475>.
add_definitions(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
-DDOWNLOADED_FONTS_DIR="${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-0.0.3"
-DTHEME_DIR="${THEME_BINARY_DIR}")
-DDOWNLOADED_FONTS_DIR="${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-0.0.3")
if (ENABLE_ACCESSIBILITY)
list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
......
......@@ -68,7 +68,7 @@ PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup,
if (m_usingFixedLayout)
resizeTo(800, 600);
ewk_view_theme_set(m_view, THEME_DIR"/default.edj");
ewk_view_theme_set(m_view, TEST_THEME_DIR "/default.edj");
m_windowIsKey = false;
evas_object_show(m_view);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment