summaryrefslogtreecommitdiff
path: root/Source/WebKit/efl
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
commit8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch)
tree17985605dab9263cc2444bd4d45f189e142cca7c /Source/WebKit/efl
parentb9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff)
downloadqtwebkit-8995b83bcbfbb68245f779b64e5517627c6cc6ea.tar.gz
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well as the previously cherry-picked changes
Diffstat (limited to 'Source/WebKit/efl')
-rw-r--r--Source/WebKit/efl/ChangeLog426
-rw-r--r--Source/WebKit/efl/DefaultTheme/CMakeLists.txt110
-rw-r--r--Source/WebKit/efl/DefaultTheme/widget/check/check.edc27
-rw-r--r--Source/WebKit/efl/DefaultTheme/widget/check/img_check_bg_disabled.pngbin0 -> 153 bytes
-rw-r--r--Source/WebKit/efl/DefaultTheme/widget/check/img_check_bg_enabled.pngbin0 -> 153 bytes
-rwxr-xr-xSource/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.pngbin0 -> 885 bytes
-rw-r--r--Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.pngbin0 -> 755 bytes
-rw-r--r--Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc20
-rwxr-xr-xSource/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreenbutton.pngbin892 -> 0 bytes
-rw-r--r--Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_bg_disabled.pngbin0 -> 280 bytes
-rw-r--r--Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_bg_enabled.pngbin0 -> 261 bytes
-rw-r--r--Source/WebKit/efl/DefaultTheme/widget/radio/radio.edc27
-rwxr-xr-xSource/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp6
-rw-r--r--Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp20
-rw-r--r--Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h2
-rw-r--r--Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp13
-rw-r--r--Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h1
-rw-r--r--Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp4
-rw-r--r--Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h1
-rw-r--r--Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.cpp7
-rw-r--r--Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.h1
-rw-r--r--Source/WebKit/efl/WebCoreSupport/IconDatabaseClientEfl.cpp6
-rw-r--r--Source/WebKit/efl/WebCoreSupport/IconDatabaseClientEfl.h1
-rw-r--r--Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp8
-rw-r--r--Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.cpp7
-rw-r--r--Source/WebKit/efl/ewk/ewk_history.cpp4
-rw-r--r--Source/WebKit/efl/ewk/ewk_intent.cpp2
-rw-r--r--Source/WebKit/efl/ewk/ewk_main.cpp22
-rw-r--r--Source/WebKit/efl/ewk/ewk_settings.cpp22
-rw-r--r--Source/WebKit/efl/ewk/ewk_settings_private.h2
-rw-r--r--Source/WebKit/efl/ewk/ewk_util.cpp105
-rw-r--r--Source/WebKit/efl/ewk/ewk_util_private.h29
-rw-r--r--Source/WebKit/efl/ewk/ewk_view.cpp17
-rw-r--r--Source/WebKit/efl/ewk/ewk_view.h46
-rw-r--r--Source/WebKit/efl/ewk/ewk_view_single.cpp8
-rw-r--r--Source/WebKit/efl/tests/UnitTestUtils/EWKTestBase.cpp69
-rw-r--r--Source/WebKit/efl/tests/UnitTestUtils/EWKTestBase.h48
-rw-r--r--Source/WebKit/efl/tests/UnitTestUtils/EWKTestEnvironment.cpp47
-rw-r--r--Source/WebKit/efl/tests/UnitTestUtils/EWKTestEnvironment.h38
-rw-r--r--Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.cpp114
-rw-r--r--Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.h36
-rw-r--r--Source/WebKit/efl/tests/test_ewk_view.cpp58
-rw-r--r--Source/WebKit/efl/tests/test_runner.cpp20
43 files changed, 899 insertions, 475 deletions
diff --git a/Source/WebKit/efl/ChangeLog b/Source/WebKit/efl/ChangeLog
index 2c7242e0b..f8d710e25 100644
--- a/Source/WebKit/efl/ChangeLog
+++ b/Source/WebKit/efl/ChangeLog
@@ -1,3 +1,429 @@
+2012-10-17 Byungwoo Lee <bw80.lee@samsung.com>
+
+ [EFL] Add background color to the checkbox theme.
+ https://bugs.webkit.org/show_bug.cgi?id=98788
+
+ Reviewed by Gyuyoung Kim.
+
+ Background color is added to the checkbox theme for identifying
+ checkbox status easily.
+
+ Checkbox theme uses images which has transparent background, and the
+ theme itself doesn't have the background color.
+
+ When the background of checkbox is black, checked/unchecked status
+ cannot be distinguished because check mark color is black.
+
+ And it is hard to identify whether the checkbox is disabled or not,
+ because there is no background color in the checkbox theme.
+
+ Instead of adding background color to the edc script, background
+ images are added because the shape of the check box can be various.
+
+ * DefaultTheme/widget/check/check.edc:
+ * DefaultTheme/widget/check/img_check_bg_enabled.png: Added.
+ * DefaultTheme/widget/check/img_check_bg_disabled.png: Added.
+
+2012-10-17 Byungwoo Lee <bw80.lee@samsung.com>
+
+ [EFL] Add background color to the radio button theme.
+ https://bugs.webkit.org/show_bug.cgi?id=98852
+
+ Reviewed by Gyuyoung Kim.
+
+ Background color is added to the radio button theme for identifying
+ radio button status easily.
+
+ Radio button theme uses images which has transparent background.
+
+ When the background of radio button is black, checked/unchecked status
+ cannot be distinguished because check mark color is black.
+
+ And it is hard to identify whether the radio button is disabled or not,
+ because there is no background color in the radio button theme.
+
+ * DefaultTheme/widget/radio/img_radio_bg_disabled.png: Added.
+ * DefaultTheme/widget/radio/img_radio_bg_enabled.png: Added.
+ * DefaultTheme/widget/radio/radio.edc:
+
+2012-10-15 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Implement Favicons API
+ https://bugs.webkit.org/show_bug.cgi?id=99087
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Remove ewk_util now that its code has been moved
+ to CairoUtilitiesEfl in WebCore.
+
+ * ewk/ewk_history.cpp:
+ (ewk_history_item_icon_object_add):
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_icon_database_icon_object_get):
+
+2012-10-15 Dongwoo Joshua Im <dw.im@samsung.com>
+
+ [EFL] Set the basepath of the File System API.
+ https://bugs.webkit.org/show_bug.cgi?id=98344
+
+ Reviewed by Gyuyoung Kim.
+
+ Set the basepath of the File System API using the internal setter function.
+
+ * ewk/ewk_main.cpp:
+ (_ewk_init_body): Call the setter function with the default path.
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_file_system_path_set): Set the given path as the base path of the file system.
+ * ewk/ewk_settings_private.h: Add ewk_settings_file_system_path_set.
+
+2012-10-14 Sam Weinig <sam@webkit.org>
+
+ Make UserScript and UserStyleSheet value objects that are copyable
+ https://bugs.webkit.org/show_bug.cgi?id=99275
+
+ Reviewed by Tim Horton.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::addUserScript):
+ (DumpRenderTreeSupportEfl::addUserStyleSheet):
+ Update for new PageGroup function signatures.
+
+2012-10-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ [EFL] Remove "web" word in web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=98724
+
+ Reviewed by Laszlo Gombos.
+
+ *web* word is redundant in web inspector. Beside r130494 and r130479 removed *web* from EFL WK2.
+
+ * WebCoreSupport/InspectorClientEfl.cpp:
+ (WebCore::notifyInspectorDestroy):
+ (WebCore::InspectorClientEfl::openInspectorFrontend):
+ (WebCore::InspectorFrontendClientEfl::InspectorFrontendClientEfl):
+ (WebCore::InspectorFrontendClientEfl::~InspectorFrontendClientEfl):
+ * ewk/ewk_view.cpp:
+ (ewk_view_inspector_show):
+ (ewk_view_inspector_close):
+ (ewk_view_inspector_view_get):
+ (ewk_view_inspector_view_set):
+ * ewk/ewk_view.h:
+
+2012-10-10 Jon Lee <jonlee@apple.com>
+
+ [WK2] Activate plugins when user clicks on snapshot
+ https://bugs.webkit.org/show_bug.cgi?id=98328
+ <rdar://problem/12426681>
+
+ Reviewed by Brady Eidson.
+
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+ (WebCore::FrameLoaderClientEfl::recreatePlugin): Stub implementation of recreatePlugin().
+
+2012-10-10 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [EFL] Use ewk_view_paint instead of ewk_view_paint_contents in ewk_view_single.
+ https://bugs.webkit.org/show_bug.cgi?id=98716
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ ewk_view_paint is the wrapper of ScrollView::paint and
+ ewk_view_paint_contents is the wrapper of FrameView::paintContents.
+
+ Because FrameView::paintContents just draw contents,
+ ewk_view_single should use ewk_view_paint instead of ewk_view_paint_contents
+ like other ports.
+
+ * ewk/ewk_view.cpp:
+ (ewk_view_paint):
+ Moved updateLayoutAndStyleIfNeededRecursive to share ewk_view_paint.
+ * ewk/ewk_view_single.cpp:
+ (_ewk_view_single_smart_repaints_process):
+ Modified to call ewk_view_paint.
+
+2012-10-10 Jaehun Lim <ljaehun.lim@samsung.com>
+
+ [EFL] Use Evas function instead of memcpy
+ https://bugs.webkit.org/show_bug.cgi?id=98483
+
+ Reviewed by Gyuyoung Kim.
+
+ Evas supports evas_object_image_data_copy_set() to copy raw image data.
+ Change memcpy() with evas_object_image_data_copy_set().
+
+ Spell out variable names and refactor variable declaration statements.
+
+ No new tests, no functionality was changed.
+
+ * ewk/ewk_util.cpp:
+ (ewk_util_image_from_cairo_surface_add):
+
+2012-10-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Rename first/second to key/value in HashMap iterators
+ https://bugs.webkit.org/show_bug.cgi?id=82784
+
+ Reviewed by Eric Seidel.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::evaluateScriptInIsolatedWorld):
+ * WebCoreSupport/PlatformStrategiesEfl.cpp:
+ (PlatformStrategiesEfl::getPluginInfo):
+ * ewk/ewk_intent.cpp:
+ (ewk_intent_extra_get):
+
+2012-10-05 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Fix window resizing / moving in WK1 and WKTR
+ https://bugs.webkit.org/show_bug.cgi?id=98486
+
+ Reviewed by Gyuyoung Kim.
+
+ Fix ChromeClientEfl::windowRect() code to use
+ ecore_evas_request_geometry_get() instead of
+ evas_object_geometry_get() and therefore avoid
+ returning incorrect values when the engine has
+ not processed a call to ecore_evas_move_resize()
+ yet. This fixes a couple of layout tests.
+
+ The code was also refactored a bit for
+ consistency with the WebKit2 EFL implementation.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::windowRect):
+ (WebCore::ChromeClientEfl::setWindowRect):
+
+2012-10-04 Simon Fraser <simon.fraser@apple.com>
+
+ Final part of "sync" to "flush" renaming
+ https://bugs.webkit.org/show_bug.cgi?id=98430
+
+ Reviewed by Tim Horton.
+
+ Change method names on GraphicsLayer and GraphicsLayerClient that
+ refer to "sync" to use the term "flush" instead, to be consistent
+ with the rest of the code.
+
+ * WebCoreSupport/AcceleratedCompositingContextEfl.cpp:
+ (WebCore::AcceleratedCompositingContext::syncLayersNow):
+ (WebCore::AcceleratedCompositingContext::attachRootGraphicsLayer):
+
+2012-10-04 Simon Fraser <simon.fraser@apple.com>
+
+ Standardize on "flush" terminology for compositing layer flushing/syncing
+ https://bugs.webkit.org/show_bug.cgi?id=98321
+
+ Reviewed by Simon Fraser.
+
+ Rename compositing-related methods that refer to "syncing" to instead
+ refer to "flushing".
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::scheduleCompositingLayerFlush):
+ * WebCoreSupport/ChromeClientEfl.h:
+ (ChromeClientEfl):
+
+2012-10-04 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] webintents/web-intents-failure.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98349
+
+ Reviewed by Gyuyoung Kim.
+
+ After r130344, OpaqueJSString().string() returns
+ an empty string instead of a null one. Therefore,
+ we need to update the check in
+ DumpRenderTreeSupportEfl::sendWebIntentResponse().
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::sendWebIntentResponse):
+
+2012-10-04 Christophe Dumez <christophe.dumez@intel.com>
+
+ Regression(r130363): Broke unit tests
+ https://bugs.webkit.org/show_bug.cgi?id=98341
+
+ Reviewed by Gyuyoung Kim.
+
+ Fix WebKitEFL unit tests to use X11 as
+ well.
+
+ * tests/UnitTestUtils/EWKTestBase.cpp:
+ (EWKUnitTests::EWKTestBase::SetUp):
+ * tests/UnitTestUtils/EWKTestEnvironment.h:
+ (EWKTestEnvironment):
+ * tests/UnitTestUtils/EWKTestView.cpp:
+ (EWKUnitTests::EWKTestView::init):
+ * tests/UnitTestUtils/EWKTestView.h:
+ (EWKTestView):
+
+2012-10-03 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [EFL] Default.edj should be generated although ENABLE_WEBKIT disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=97753
+
+ Reviewed by Laszlo Gombos.
+
+ default.edj is used in both webkit/efl and webkit2/efl.
+ However, it has been generated only when ENABLE_WEBKIT is enabled.
+
+ This patch separates the script which generates default.edj
+ from source/webkit/platformefl.cmake.
+
+ * DefaultTheme/CMakeLists.txt:
+ Extracted from Source/WebKit/PlatformEfl.cmake and sanitized.
+
+2012-10-03 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Enable use of X11 in DumpRenderTree / WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=98231
+
+ Reviewed by Gyuyoung Kim.
+
+ Initialize ecore_x library in ewk_main since it is used by
+ WebKitEFL.
+
+ * ewk/ewk_main.cpp:
+ (ewk_init):
+ (ewk_shutdown):
+
+2012-10-03 Kangil Han <kangil.han@samsung.com>
+
+ Fix unused parameter compile warnings.
+ https://bugs.webkit.org/show_bug.cgi?id=98243
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fixed unused parameter compile warning by removing page parameter name and UNUSED_PARAM usage.
+
+ * WebCoreSupport/PlatformStrategiesEfl.cpp:
+ (PlatformStrategiesEfl::getPluginInfo):
+
+2012-10-03 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ [EFL] Change the reversed expected and actual parameter in WebKit1 unit tests
+ https://bugs.webkit.org/show_bug.cgi?id=98276
+
+ Reviewed by Laszlo Gombos.
+
+ Expected value should be at first and actual value be followed in ASSERT_STREQ().
+
+ * tests/test_ewk_view.cpp:
+ (TEST_F):
+
+2012-10-02 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add API to get the web view that initiated a custom URI request to WebKit2 GTK+
+ https://bugs.webkit.org/show_bug.cgi?id=97895
+
+ Reviewed by Martin Robinson.
+
+ * WebCoreSupport/FrameNetworkingContextEfl.cpp:
+ (WebCore::FrameNetworkingContextEfl::initiatingPageID): Stub
+ implementation.
+ * WebCoreSupport/FrameNetworkingContextEfl.h:
+ (FrameNetworkingContextEfl): Added.
+
+2012-10-02 Krzysztof Czech <k.czech@samsung.com>
+
+ [EFL][UT] Refactoring an implementation of testing framework for wk1.
+ https://bugs.webkit.org/show_bug.cgi?id=94925
+
+ Reviewed by Gyuyoung Kim.
+
+ The reason of changing, was to adjust current implementation to use gtest features
+ related to cleaning (SetUp, TearDown), cleaning code in terms of useless methods
+ and lastly to make framework easier to use.
+
+ * tests/UnitTestUtils/EWKTestBase.cpp:
+ (EWKUnitTests::EWKTestBase::EWKTestBase):
+ (EWKUnitTests::EWKTestBase::webView): Returns current webview.
+ (EWKUnitTests::EWKTestBase::SetUp):
+ Before test is started, SetUp is called.
+ Used this to initialize test view.
+ (EWKUnitTests::EWKTestBase::onLoadFinished):
+ (EWKUnitTests::EWKTestBase::waitUntilLoadFinished): It waits till test page will be properly loaded.
+ (EWKUnitTests::EWKTestBase::loadUrl): Starts loading test page.
+ * tests/UnitTestUtils/EWKTestBase.h:
+ * tests/UnitTestUtils/EWKTestEnvironment.cpp:
+ Used to have global SetUp and TearDown.
+ Global SetUp starts initialization of webkit wherease
+ global TearDown shuts it down. Generally we would like to have
+ only one initialization of webkit while tests are executed.
+ (EWKUnitTests):
+ (EWKUnitTests::EWKTestEnvironment::EWKTestEnvironment):
+ (EWKUnitTests::EWKTestEnvironment::SetUp): Starts initialization of webkit.
+ (EWKUnitTests::EWKTestEnvironment::TearDown): Shuts down of webkit.
+ * tests/UnitTestUtils/EWKTestEnvironment.h:
+ (EWKUnitTests):
+ (EWKTestEnvironment):
+ (EWKUnitTests::EWKTestEnvironment::useX11Window):
+ * tests/UnitTestUtils/EWKTestView.cpp:
+ (EWKUnitTests::EWKTestView::EWKTestView):
+ (EWKUnitTests::EWKTestView::init): Starts initialization of test view.
+ * tests/UnitTestUtils/EWKTestView.h:
+ (EWKTestView):
+ * tests/test_ewk_view.cpp: adjusted current unit tests to new implementation.
+ (TEST_F):
+ * tests/test_runner.cpp: entry point of all tests.
+ (parseCustomArguments):
+ (main):
+
+2012-10-01 Brady Eidson <beidson@apple.com>
+
+ Remove the Safari 2 -> Safari 3 icon database import code.
+ https://bugs.webkit.org/show_bug.cgi?id=98113
+
+ Reviewed by Maciej Stachowiak.
+
+ Nuke the performImport() IconDatabaseClient method.
+
+ * WebCoreSupport/IconDatabaseClientEfl.cpp:
+ * WebCoreSupport/IconDatabaseClientEfl.h:
+
+2012-09-28 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ Code inside FrameLoaderClient::canShowMIMEType() implementations can be shared among different WK ports
+ https://bugs.webkit.org/show_bug.cgi?id=97547
+
+ Reviewed by Adam Barth.
+
+ Newly added WebCore::MIMETypeRegistry::canShowMIMEType() function is used
+ inside WebCore::FrameLoaderClientEfl::canShowMIMEType().
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::canShowMIMEType):
+
+2012-09-28 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL][DRT] EFL DRT should disable visited links tracking by default
+ https://bugs.webkit.org/show_bug.cgi?id=97881
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added aux DumpRenderTreeSupportEfl::setShouldTrackVisitedLinks() function.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::setShouldTrackVisitedLinks):
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
+2012-09-27 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] No way to exit video fullscreen mode once entered
+ https://bugs.webkit.org/show_bug.cgi?id=97631
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Fix default theme so that we have 2 fullscreen buttons, one
+ to enter fullscreen mode and another to exit it.
+
+ New icon by Alexander Shalamov.
+
+ * DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png: Added.
+ * DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png: Added.
+ * DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc:
+ * DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreenbutton.png: Removed.
+
2012-09-26 Jinwoo Song <jinwoo7.song@samsung.com>
[EFL] Fix the typo in the ewk_view_fullscreen_exit()
diff --git a/Source/WebKit/efl/DefaultTheme/CMakeLists.txt b/Source/WebKit/efl/DefaultTheme/CMakeLists.txt
new file mode 100644
index 000000000..850749e14
--- /dev/null
+++ b/Source/WebKit/efl/DefaultTheme/CMakeLists.txt
@@ -0,0 +1,110 @@
+SET(DefaultTheme_RESOURCE_NAME default.edj)
+SET(DefaultTheme_DIR "${WEBKIT_DIR}/efl/DefaultTheme")
+
+SET(DefaultTheme_DEFINITION "")
+IF (ENABLE_PROGRESS_ELEMENT)
+ LIST(APPEND DefaultTheme_DEFINITION "-DENABLE_PROGRESS_ELEMENT")
+ENDIF ()
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${THEME_BINARY_DIR}/${DefaultTheme_RESOURCE_NAME}
+ COMMAND ${EDJE_CC_EXECUTABLE} -v ${DefaultTheme_DEFINITION} default.edc ${THEME_BINARY_DIR}/${DefaultTheme_RESOURCE_NAME}
+ DEPENDS
+ default.edc
+ widget/button/button.edc
+ widget/button/img_button_focus.png
+ widget/button/img_button_hover.png
+ widget/button/img_button_normal.png
+ widget/button/img_button_press.png
+ widget/check/check.edc
+ widget/check/img_check_off_focus.png
+ widget/check/img_check_off_hover.png
+ widget/check/img_check_off.png
+ widget/check/img_check_on_focus.png
+ widget/check/img_check_on_hover.png
+ widget/check/img_check_on.png
+ widget/combo/combo.edc
+ widget/combo/combo_focus_button.png
+ widget/combo/combo_focus.png
+ widget/combo/combo_hover_button.png
+ widget/combo/combo_hover.png
+ widget/combo/combo_normal_button.png
+ widget/combo/combo_normal.png
+ widget/combo/combo_press_button.png
+ widget/combo/combo_press.png
+ widget/combo/icon.png
+ widget/entry/entry.edc
+ widget/entry/img_focused.png
+ widget/entry/img_hovered.png
+ widget/entry/img_normal.png
+ widget/file/file.edc
+ widget/file/file_focus.png
+ widget/file/file_hover.png
+ widget/file/file_normal.png
+ widget/file/file_press.png
+ widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png
+ widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png
+ widget/mediacontrol/fullscreenbutton/fullscreen_button.edc
+ widget/mediacontrol/mutebutton/mute_button.edc
+ widget/mediacontrol/mutebutton/mutebutton.png
+ widget/mediacontrol/mutebutton/unmutebutton.png
+ widget/mediacontrol/playpausebutton/pausebutton.png
+ widget/mediacontrol/playpausebutton/playbutton.png
+ widget/mediacontrol/playpausebutton/playpause_button.edc
+ widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc
+ widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png
+ widget/mediacontrol/seekforwardbutton/seekforward_button.edc
+ widget/mediacontrol/seekforwardbutton/seekforwardbutton.png
+ widget/mediacontrol/togglecaptionsbutton/closedcaption_disabled.png
+ widget/mediacontrol/togglecaptionsbutton/closedcaption.png
+ widget/mediacontrol/togglecaptionsbutton/toggle_captions_button.edc
+ widget/progressbar/bt_base.png
+ widget/progressbar/progressbar.edc
+ widget/progressbar/shelf_inset.png
+ widget/radio/img_radio_off_focus.png
+ widget/radio/img_radio_off_hover.png
+ widget/radio/img_radio_off.png
+ widget/radio/img_radio_on_focus.png
+ widget/radio/img_radio_on_hover.png
+ widget/radio/img_radio_on.png
+ widget/radio/radio.edc
+ widget/scrollbar/scrollbar.edc
+ widget/scrollbar/scrollbar_h.png
+ widget/scrollbar/scrollbar_knob_h.png
+ widget/scrollbar/scrollbar_knob_v.png
+ widget/scrollbar/scrollbar_v.png
+ widget/search/cancel/cancel_normal_button2.png
+ widget/search/cancel/cancel_normal_button.png
+ widget/search/cancel/search_cancel.edc
+ widget/search/decoration/decoration_normal_button.png
+ widget/search/decoration/search_decoration.edc
+ widget/search/field/field_focused.png
+ widget/search/field/field_hovered.png
+ widget/search/field/field_normal.png
+ widget/search/field/search_field.edc
+ widget/slider/slider.edc
+ widget/slider/slider_fill_h.png
+ widget/slider/slider_fill_v.png
+ widget/slider/slider_h.png
+ widget/slider/slider_thumb_h.png
+ widget/slider/slider_thumb_press_h.png
+ widget/slider/slider_thumb_press_v.png
+ widget/slider/slider_thumb_v.png
+ widget/slider/slider_v.png
+ widget/spinner/sp_bg.png
+ widget/spinner/sp_down_default.png
+ widget/spinner/sp_down_hover.png
+ widget/spinner/sp_down_pressed.png
+ widget/spinner/spinner.edc
+ widget/spinner/sp_up_default.png
+ widget/spinner/sp_up_hover.png
+ widget/spinner/sp_up_pressed.png
+ WORKING_DIRECTORY ${DefaultTheme_DIR}
+ VERBATIM
+)
+
+ADD_CUSTOM_TARGET(DefaultTheme ALL
+ DEPENDS ${THEME_BINARY_DIR}/${DefaultTheme_RESOURCE_NAME}
+)
+
+INSTALL(FILES ${THEME_BINARY_DIR}/${DefaultTheme_RESOURCE_NAME} DESTINATION ${DATA_INSTALL_DIR}/themes)
diff --git a/Source/WebKit/efl/DefaultTheme/widget/check/check.edc b/Source/WebKit/efl/DefaultTheme/widget/check/check.edc
index 0e093034c..0f8d43c1d 100644
--- a/Source/WebKit/efl/DefaultTheme/widget/check/check.edc
+++ b/Source/WebKit/efl/DefaultTheme/widget/check/check.edc
@@ -25,6 +25,8 @@
min: 12 12;
images {
+ image: "widget/check/img_check_bg_enabled.png" COMP;
+ image: "widget/check/img_check_bg_disabled.png" COMP;
image: "widget/check/img_check_on.png" COMP;
image: "widget/check/img_check_off.png" COMP;
image: "widget/check/img_check_off_focus.png" COMP;
@@ -43,6 +45,7 @@
public show() {
if (get_int(isEnabled) == 1) {
set_state(PART:"check_button", "default", 0.0);
+ set_state(PART:"bg", "enabled", 0.0);
if (get_int(isChecked) == 1) {
set_state(PART:"check_button", "enabled_checked", 0.0);
if (get_int(isFocused) == 1)
@@ -59,6 +62,7 @@
}
else {
set_state(PART:"check_button", "disabled", 0.0);
+ set_state(PART:"bg", "disabled", 0.0);
if (get_int(isChecked) == 1)
set_state(PART:"check_button", "disabled_checked", 0.0);
}
@@ -67,6 +71,29 @@
parts {
part {
+ name: "bg";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 12 12;
+ max: 12 12;
+ image {
+ normal: "widget/check/img_check_bg_enabled.png";
+ }
+ }
+ description {
+ state: "enabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/check/img_check_bg_disabled.png";
+ }
+ }
+ }
+ part {
name: "check_button";
type: IMAGE;
description {
diff --git a/Source/WebKit/efl/DefaultTheme/widget/check/img_check_bg_disabled.png b/Source/WebKit/efl/DefaultTheme/widget/check/img_check_bg_disabled.png
new file mode 100644
index 000000000..e624b10fd
--- /dev/null
+++ b/Source/WebKit/efl/DefaultTheme/widget/check/img_check_bg_disabled.png
Binary files differ
diff --git a/Source/WebKit/efl/DefaultTheme/widget/check/img_check_bg_enabled.png b/Source/WebKit/efl/DefaultTheme/widget/check/img_check_bg_enabled.png
new file mode 100644
index 000000000..0f1a68685
--- /dev/null
+++ b/Source/WebKit/efl/DefaultTheme/widget/check/img_check_bg_enabled.png
Binary files differ
diff --git a/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png
new file mode 100755
index 000000000..6616c06dd
--- /dev/null
+++ b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png
Binary files differ
diff --git a/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png
new file mode 100644
index 000000000..4158dde74
--- /dev/null
+++ b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png
Binary files differ
diff --git a/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc
index 1e087ae8c..f2803a246 100644
--- a/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc
+++ b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc
@@ -22,7 +22,8 @@
name: "webkit/widget/mediacontrol/fullscreen_button";
images {
- image: "widget/mediacontrol/fullscreenbutton/fullscreenbutton.png" COMP;
+ image: "widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png" COMP;
+ image: "widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png" COMP;
}
parts {
@@ -32,17 +33,26 @@
description { state: "default" 0.0;
min: 25 25;
}
- description { state: "fullscreen" 0.0;
+ description { state: "fullscreen_enter" 0.0;
inherit: "default" 0.0;
- image.normal: "widget/mediacontrol/fullscreenbutton/fullscreenbutton.png";
+ image.normal: "widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png";
+ }
+ description { state: "fullscreen_exit" 0.0;
+ inherit: "default" 0.0;
+ image.normal: "widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png";
}
}
}
programs {
program {
- signal: "fullscreen";
- action: STATE_SET "fullscreen" 0.0;
+ signal: "fullscreen_enter";
+ action: STATE_SET "fullscreen_enter" 0.0;
+ target: "fullscreen_button";
+ }
+ program {
+ signal: "fullscreen_exit";
+ action: STATE_SET "fullscreen_exit" 0.0;
target: "fullscreen_button";
}
}
diff --git a/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreenbutton.png b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreenbutton.png
deleted file mode 100755
index d6d487e13..000000000
--- a/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreenbutton.png
+++ /dev/null
Binary files differ
diff --git a/Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_bg_disabled.png b/Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_bg_disabled.png
new file mode 100644
index 000000000..aa897cfb3
--- /dev/null
+++ b/Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_bg_disabled.png
Binary files differ
diff --git a/Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_bg_enabled.png b/Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_bg_enabled.png
new file mode 100644
index 000000000..46ef35d1a
--- /dev/null
+++ b/Source/WebKit/efl/DefaultTheme/widget/radio/img_radio_bg_enabled.png
Binary files differ
diff --git a/Source/WebKit/efl/DefaultTheme/widget/radio/radio.edc b/Source/WebKit/efl/DefaultTheme/widget/radio/radio.edc
index f07b9b27e..ec014634e 100644
--- a/Source/WebKit/efl/DefaultTheme/widget/radio/radio.edc
+++ b/Source/WebKit/efl/DefaultTheme/widget/radio/radio.edc
@@ -24,6 +24,8 @@
min: 12 12;
images {
+ image: "widget/radio/img_radio_bg_enabled.png" COMP;
+ image: "widget/radio/img_radio_bg_disabled.png" COMP;
image: "widget/radio/img_radio_on.png" COMP;
image: "widget/radio/img_radio_off.png" COMP;
image: "widget/radio/img_radio_on_focus.png" COMP;
@@ -42,6 +44,7 @@
public show() {
if (get_int(isEnabled) == 1) {
set_state(PART:"radio_button", "default", 0.0);
+ set_state(PART:"bg", "enabled", 0.0);
if (get_int(isChecked) == 1) {
set_state(PART:"radio_button", "enabled_checked", 0.0);
if (get_int(isFocused) == 1)
@@ -58,6 +61,7 @@
}
else {
set_state(PART:"radio_button", "disabled", 0.0);
+ set_state(PART:"bg", "disabled", 0.0);
if (get_int(isChecked) == 1)
set_state(PART:"radio_button", "disabled_checked", 0.0);
}
@@ -66,6 +70,29 @@
parts {
part {
+ name: "bg";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 12 12;
+ max: 12 12;
+ image {
+ normal: "widget/radio/img_radio_bg_enabled.png";
+ }
+ }
+ description {
+ state: "enabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/radio/img_radio_bg_disabled.png";
+ }
+ }
+ }
+ part {
name: "radio_button";
type: IMAGE;
description {
diff --git a/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp b/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp
index d4bec6248..b1bff6486 100755
--- a/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp
@@ -68,9 +68,9 @@ bool AcceleratedCompositingContext::initialize(HostWindow* hostWindow)
void AcceleratedCompositingContext::syncLayersNow()
{
if (m_rootGraphicsLayer)
- m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
+ m_rootGraphicsLayer->flushCompositingStateForThisLayerOnly();
- EWKPrivate::corePage(m_view)->mainFrame()->view()->syncCompositingStateIncludingSubframes();
+ EWKPrivate::corePage(m_view)->mainFrame()->view()->flushCompositingStateIncludingSubframes();
}
void AcceleratedCompositingContext::renderLayers()
@@ -109,7 +109,7 @@ void AcceleratedCompositingContext::attachRootGraphicsLayer(GraphicsLayer* rootL
m_textureMapper = TextureMapperGL::create();
m_rootTextureMapperLayer->setTextureMapper(m_textureMapper.get());
- m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
+ m_rootGraphicsLayer->flushCompositingStateForThisLayerOnly();
}
GraphicsContext3D* AcceleratedCompositingContext::context()
diff --git a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index a1a4c37c6..d4b6d7ad0 100644
--- a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -118,12 +118,12 @@ void ChromeClientEfl::focusedFrameChanged(Frame*)
FloatRect ChromeClientEfl::windowRect()
{
- Ecore_Evas* ee = 0;
- int x, y, w, h;
+ int x, y, width, height;
- ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view));
- ecore_evas_geometry_get(ee, &x, &y, &w, &h);
- return FloatRect(x, y, w, h);
+ Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view));
+ ecore_evas_request_geometry_get(ee, &x, &y, &width, &height);
+
+ return FloatRect(x, y, width, height);
}
void ChromeClientEfl::setWindowRect(const FloatRect& rect)
@@ -131,12 +131,8 @@ void ChromeClientEfl::setWindowRect(const FloatRect& rect)
if (!ewk_view_setting_enable_auto_resize_window_get(m_view))
return;
- Ecore_Evas* ee = 0;
- IntRect intrect = IntRect(rect);
-
- ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view));
- ecore_evas_move(ee, intrect.x(), intrect.y());
- ecore_evas_resize(ee, intrect.width(), intrect.height());
+ Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view));
+ ecore_evas_move_resize(ee, rect.x(), rect.y(), rect.width(), rect.height());
}
FloatRect ChromeClientEfl::pageRect()
@@ -605,7 +601,7 @@ void ChromeClientEfl::setNeedsOneShotDrawingSynchronization()
notImplemented();
}
-void ChromeClientEfl::scheduleCompositingLayerSync()
+void ChromeClientEfl::scheduleCompositingLayerFlush()
{
notImplemented();
}
diff --git a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
index 267f5af47..68da45a8a 100644
--- a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
@@ -134,7 +134,7 @@ public:
#if USE(ACCELERATED_COMPOSITING)
virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);
virtual void setNeedsOneShotDrawingSynchronization();
- virtual void scheduleCompositingLayerSync();
+ virtual void scheduleCompositingLayerFlush();
virtual CompositingTriggerFlags allowedCompositingTriggers() const;
#endif
diff --git a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp b/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
index 305943c90..746602949 100644
--- a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
@@ -296,7 +296,7 @@ void DumpRenderTreeSupportEfl::addUserScript(const Evas_Object* ewkView, const S
DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
page->group().addUserScriptToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::KURL(),
- nullptr, nullptr, runAtStart ? WebCore::InjectAtDocumentStart : WebCore::InjectAtDocumentEnd,
+ Vector<String>(), Vector<String>(), runAtStart ? WebCore::InjectAtDocumentStart : WebCore::InjectAtDocumentEnd,
allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
}
@@ -311,7 +311,7 @@ void DumpRenderTreeSupportEfl::addUserStyleSheet(const Evas_Object* ewkView, con
{
DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
- page->group().addUserStyleSheetToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::KURL(), nullptr, nullptr, allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
+ page->group().addUserStyleSheetToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::KURL(), Vector<String>(), Vector<String>(), allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
}
void DumpRenderTreeSupportEfl::clearUserStyleSheets(const Evas_Object* ewkView)
@@ -485,7 +485,7 @@ void DumpRenderTreeSupportEfl::evaluateScriptInIsolatedWorld(const Evas_Object*
else {
WTF::HashMap<int, RefPtr<WebCore::DOMWrapperWorld > >::const_iterator it = worldMap.find(worldID);
if (it != worldMap.end())
- scriptWorld = (*it).second;
+ scriptWorld = (*it).value;
else {
scriptWorld = WebCore::ScriptController::createWorld();
worldMap.set(worldID, scriptWorld);
@@ -568,11 +568,16 @@ void DumpRenderTreeSupportEfl::setSerializeHTTPLoads(bool enabled)
WebCore::resourceLoadScheduler()->setSerialLoadingEnabled(enabled);
}
+void DumpRenderTreeSupportEfl::setShouldTrackVisitedLinks(bool shouldTrack)
+{
+ WebCore::PageGroup::setShouldTrackVisitedLinks(shouldTrack);
+}
+
void DumpRenderTreeSupportEfl::sendWebIntentResponse(Ewk_Intent_Request* request, JSStringRef response)
{
#if ENABLE(WEB_INTENTS)
String responseString = response->string();
- if (responseString.isNull())
+ if (responseString.isEmpty())
ewk_intent_request_failure_post(request, WebCore::SerializedScriptValue::create(String::fromUTF8("ERROR")));
else
ewk_intent_request_result_post(request, WebCore::SerializedScriptValue::create(String(responseString.impl())));
diff --git a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h b/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
index c8273b416..ccc087351 100644
--- a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
@@ -107,6 +107,7 @@ public:
static void setAuthorAndUserStylesEnabled(Evas_Object* ewkView, bool);
static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const String& scheme);
static void setSerializeHTTPLoads(bool);
+ static void setShouldTrackVisitedLinks(bool);
// Web Intents
static void sendWebIntentResponse(Ewk_Intent_Request*, JSStringRef response);
diff --git a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
index 410b4248f..e0327e114 100644
--- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
@@ -720,9 +720,7 @@ bool FrameLoaderClientEfl::canShowMIMETypeAsHTML(const String& /*MIMEType*/) con
bool FrameLoaderClientEfl::canShowMIMEType(const String& MIMEType) const
{
- if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType)
- || MIMETypeRegistry::isSupportedNonImageMIMEType(MIMEType)
- || MIMETypeRegistry::isSupportedMediaMIMEType(MIMEType))
+ if (MIMETypeRegistry::canShowMIMEType(MIMEType))
return true;
#if 0 // PluginDatabase is disabled until we have Plugin system done.
diff --git a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
index 6d66ee8aa..79d864568 100644
--- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
@@ -132,6 +132,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const WTF::Vector<String>&, const WTF::Vector<String>&, const String&, bool);
+ virtual void recreatePlugin(Widget*) { }
virtual void redirectDataToPlugin(Widget* pluginWidget);
virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const WTF::Vector<String>& paramNames, const WTF::Vector<String>& paramValues);
virtual String overrideMediaType() const;
diff --git a/Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.cpp b/Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.cpp
index 8c20b213a..53c05fb04 100644
--- a/Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.cpp
@@ -30,6 +30,7 @@
#include "config.h"
#include "FrameNetworkingContextEfl.h"
+#include "NotImplemented.h"
#include "ResourceHandle.h"
#include "ewk_frame.h"
#include "ewk_view.h"
@@ -54,4 +55,10 @@ SoupSession* FrameNetworkingContextEfl::soupSession() const
return ewk_view_soup_session_get(ewk_frame_view_get(m_ewkFrame));
}
+uint64_t FrameNetworkingContextEfl::initiatingPageID() const
+{
+ notImplemented();
+ return 0;
+}
+
}
diff --git a/Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.h b/Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.h
index 93ffd48bb..68531ccfe 100644
--- a/Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.h
@@ -41,6 +41,7 @@ public:
WebCore::Frame* coreFrame() const { return frame(); }
virtual SoupSession* soupSession() const;
+ virtual uint64_t initiatingPageID() const;
private:
FrameNetworkingContextEfl(Frame*, Evas_Object*);
diff --git a/Source/WebKit/efl/WebCoreSupport/IconDatabaseClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/IconDatabaseClientEfl.cpp
index c9e432887..4e35137d0 100644
--- a/Source/WebKit/efl/WebCoreSupport/IconDatabaseClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/IconDatabaseClientEfl.cpp
@@ -25,12 +25,6 @@
namespace WebCore {
-bool IconDatabaseClientEfl::performImport()
-{
- notImplemented();
- return true;
-}
-
void IconDatabaseClientEfl::didRemoveAllIcons()
{
notImplemented();
diff --git a/Source/WebKit/efl/WebCoreSupport/IconDatabaseClientEfl.h b/Source/WebKit/efl/WebCoreSupport/IconDatabaseClientEfl.h
index 51576141a..c14cdba95 100644
--- a/Source/WebKit/efl/WebCoreSupport/IconDatabaseClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/IconDatabaseClientEfl.h
@@ -28,7 +28,6 @@ namespace WebCore {
class IconDatabaseClientEfl : public IconDatabaseClient {
public:
- virtual bool performImport();
virtual void didRemoveAllIcons();
virtual void didImportIconURLForPageURL(const String&);
virtual void didImportIconDataForPageURL(const String&);
diff --git a/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp
index 701f306a9..3dd815ab9 100644
--- a/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp
@@ -30,7 +30,7 @@
namespace WebCore {
-static void notifyWebInspectorDestroy(void* userData, Evas_Object* /*webview*/, void* /*eventInfo*/)
+static void notifyInspectorDestroy(void* userData, Evas_Object* /*webview*/, void* /*eventInfo*/)
{
InspectorFrontendClientEfl* inspectorFrontendClient = static_cast<InspectorFrontendClientEfl*>(userData);
if (inspectorFrontendClient)
@@ -87,7 +87,7 @@ InspectorFrontendChannel* InspectorClientEfl::openInspectorFrontend(InspectorCon
{
evas_object_smart_callback_call(m_inspectedView, "inspector,view,create", 0);
- Evas_Object* inspectorView = ewk_view_web_inspector_view_get(m_inspectedView);
+ Evas_Object* inspectorView = ewk_view_inspector_view_get(m_inspectedView);
if (!inspectorView)
return 0;
@@ -153,12 +153,12 @@ InspectorFrontendClientEfl::InspectorFrontendClientEfl(Evas_Object* inspectedVie
, m_inspectorView(inspectorView)
, m_inspectorClient(inspectorClient)
{
- evas_object_smart_callback_add(m_inspectorView, "inspector,view,destroy", notifyWebInspectorDestroy, this);
+ evas_object_smart_callback_add(m_inspectorView, "inspector,view,destroy", notifyInspectorDestroy, this);
}
InspectorFrontendClientEfl::~InspectorFrontendClientEfl()
{
- evas_object_smart_callback_del(m_inspectorView, "inspector,view,destroy", notifyWebInspectorDestroy);
+ evas_object_smart_callback_del(m_inspectorView, "inspector,view,destroy", notifyInspectorDestroy);
if (m_inspectorClient) {
m_inspectorClient->releaseFrontendPage();
diff --git a/Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.cpp b/Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.cpp
index a76239ea1..c262085c3 100644
--- a/Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.cpp
@@ -79,7 +79,7 @@ void PlatformStrategiesEfl::refreshPlugins()
#endif
}
-void PlatformStrategiesEfl::getPluginInfo(const Page* page, Vector<PluginInfo>& outPlugins)
+void PlatformStrategiesEfl::getPluginInfo(const Page*, Vector<PluginInfo>& outPlugins)
{
#if ENABLE(NETSCAPE_PLUGIN_API)
PluginDatabase::installedPlugins()->refresh();
@@ -99,8 +99,8 @@ void PlatformStrategiesEfl::getPluginInfo(const Page* page, Vector<PluginInfo>&
for (MIMEToDescriptionsMap::const_iterator it = mimeToDescriptions.begin(); it != end; ++it) {
MimeClassInfo mime;
- mime.type = it->first;
- mime.desc = it->second;
+ mime.type = it->key;
+ mime.desc = it->value;
mime.extensions = package->mimeToExtensions().get(mime.type);
pluginInfo.mimes.append(mime);
}
@@ -108,7 +108,6 @@ void PlatformStrategiesEfl::getPluginInfo(const Page* page, Vector<PluginInfo>&
outPlugins.append(pluginInfo);
}
#else
- UNUSED_PARAM(page);
UNUSED_PARAM(outPlugins);
#endif
}
diff --git a/Source/WebKit/efl/ewk/ewk_history.cpp b/Source/WebKit/efl/ewk/ewk_history.cpp
index 0dae03d7e..49c3a1a3b 100644
--- a/Source/WebKit/efl/ewk/ewk_history.cpp
+++ b/Source/WebKit/efl/ewk/ewk_history.cpp
@@ -22,6 +22,7 @@
#include "ewk_history.h"
#include "BackForwardListImpl.h"
+#include "CairoUtilitiesEfl.h"
#include "HistoryItem.h"
#include "IconDatabaseBase.h"
#include "Image.h"
@@ -30,7 +31,6 @@
#include "PageGroup.h"
#include "ewk_history_private.h"
#include "ewk_private.h"
-#include "ewk_util_private.h"
#include <Eina.h>
#include <eina_safety_checks.h>
#include <wtf/text/CString.h>
@@ -355,7 +355,7 @@ Evas_Object* ewk_history_item_icon_object_add(const Ewk_History_Item* item, Evas
}
cairo_surface_t* surface = icon->surface();
- return surface ? ewk_util_image_from_cairo_surface_add(canvas, surface) : 0;
+ return surface ? WebCore::evasObjectFromCairoImageSurface(canvas, surface).leakRef() : 0;
}
Eina_Bool ewk_history_item_page_cache_exists(const Ewk_History_Item* item)
diff --git a/Source/WebKit/efl/ewk/ewk_intent.cpp b/Source/WebKit/efl/ewk/ewk_intent.cpp
index 76c2d68da..83bce8764 100644
--- a/Source/WebKit/efl/ewk/ewk_intent.cpp
+++ b/Source/WebKit/efl/ewk/ewk_intent.cpp
@@ -120,7 +120,7 @@ const char* ewk_intent_extra_get(const Ewk_Intent* intent, const char* key)
WTF::HashMap<String, String>::const_iterator val = core->extras().find(String::fromUTF8(key));
if (val == core->extras().end())
return 0;
- return eina_stringshare_add(val->second.utf8().data());
+ return eina_stringshare_add(val->value.utf8().data());
#else
return 0;
#endif
diff --git a/Source/WebKit/efl/ewk/ewk_main.cpp b/Source/WebKit/efl/ewk/ewk_main.cpp
index efa3398e1..c9a760936 100644
--- a/Source/WebKit/efl/ewk/ewk_main.cpp
+++ b/Source/WebKit/efl/ewk/ewk_main.cpp
@@ -35,6 +35,7 @@
#include "ewk_network.h"
#include "ewk_private.h"
#include "ewk_settings.h"
+#include "ewk_settings_private.h"
#include "runtime/InitializeThreading.h"
#include <Ecore.h>
#include <Ecore_Evas.h>
@@ -49,6 +50,10 @@
#include <sys/stat.h>
#include <wtf/Threading.h>
+#ifdef HAVE_ECORE_X
+#include <Ecore_X.h>
+#endif
+
static int _ewkInitCount = 0;
/**
@@ -93,6 +98,13 @@ int ewk_init(void)
goto error_edje;
}
+#ifdef HAVE_ECORE_X
+ if (!ecore_x_init(0)) {
+ CRITICAL("could not init ecore_x.");
+ goto error_ecore_x;
+ }
+#endif
+
if (!_ewk_init_body()) {
CRITICAL("could not init body");
goto error_edje;
@@ -100,6 +112,10 @@ int ewk_init(void)
return ++_ewkInitCount;
+#ifdef HAVE_ECORE_X
+error_ecore_x:
+ edje_shutdown();
+#endif
error_edje:
ecore_evas_shutdown();
error_ecore_evas:
@@ -121,6 +137,10 @@ int ewk_shutdown(void)
if (_ewkInitCount)
return _ewkInitCount;
+#ifdef HAVE_ECORE_X
+ ecore_x_shutdown();
+#endif
+ edje_shutdown();
ecore_evas_shutdown();
ecore_shutdown();
evas_shutdown();
@@ -163,10 +183,12 @@ Eina_Bool _ewk_init_body(void)
String localStorageDirectory = String::fromUTF8(efreet_data_home_get()) + "/WebKitEfl/LocalStorage";
String webDatabaseDirectory = String::fromUTF8(efreet_cache_home_get()) + "/WebKitEfl/Databases";
String applicationCacheDirectory = String::fromUTF8(efreet_cache_home_get()) + "/WebKitEfl/Applications";
+ String fileSystemDirectory = String::fromUTF8(efreet_data_home_get()) + "/WebKitEfl/FileSystem";
ewk_settings_local_storage_path_set(localStorageDirectory.utf8().data());
ewk_settings_web_database_path_set(webDatabaseDirectory.utf8().data());
ewk_settings_application_cache_path_set(applicationCacheDirectory.utf8().data());
+ ewk_settings_file_system_path_set(fileSystemDirectory.utf8().data());
ewk_network_tls_certificate_check_set(false);
diff --git a/Source/WebKit/efl/ewk/ewk_settings.cpp b/Source/WebKit/efl/ewk/ewk_settings.cpp
index f10523dc8..b65c88412 100644
--- a/Source/WebKit/efl/ewk/ewk_settings.cpp
+++ b/Source/WebKit/efl/ewk/ewk_settings.cpp
@@ -23,6 +23,7 @@
#include "ewk_settings.h"
#include "ApplicationCacheStorage.h"
+#include "CairoUtilitiesEfl.h"
#include "CrossOriginPreflightResultCache.h"
#include "DatabaseTracker.h"
#include "FontCache.h"
@@ -31,6 +32,7 @@
#include "Image.h"
#include "IntSize.h"
#include "KURL.h"
+#include "LocalFileSystem.h"
#include "MemoryCache.h"
#include "PageCache.h"
#include "RuntimeEnabledFeatures.h"
@@ -38,7 +40,6 @@
#include "StorageTracker.h"
#include "WebKitVersion.h"
#include "ewk_private.h"
-#include "ewk_util_private.h"
#include <Eina.h>
#include <eina_safety_checks.h>
#include <errno.h>
@@ -229,7 +230,7 @@ Evas_Object* ewk_settings_icon_database_icon_object_get(const char* url, Evas* c
}
cairo_surface_t* surface = icon->surface();
- return surface ? ewk_util_image_from_cairo_surface_add(canvas, surface) : 0;
+ return surface ? WebCore::evasObjectFromCairoImageSurface(canvas, surface).leakRef() : 0;
}
void ewk_settings_object_cache_capacity_set(unsigned minDeadCapacity, unsigned maxDeadCapacity, unsigned totalCapacity)
@@ -323,6 +324,23 @@ const char* ewk_settings_default_user_agent_get()
return eina_stringshare_add(staticUa.utf8().data());
}
+/**
+ * @internal
+ *
+ * Sets the given path to the directory where WebKit will write for
+ * the HTML5 file system API.
+ *
+ * @param path the new file system directory path
+ */
+void ewk_settings_file_system_path_set(const char* path)
+{
+#if ENABLE(FILE_SYSTEM)
+ WebCore::LocalFileSystem::initializeLocalFileSystem(String::fromUTF8(path));
+#else
+ UNUSED_PARAM(path);
+#endif
+}
+
void ewk_settings_application_cache_path_set(const char* path)
{
WebCore::cacheStorage().setCacheDirectory(WTF::String::fromUTF8(path));
diff --git a/Source/WebKit/efl/ewk/ewk_settings_private.h b/Source/WebKit/efl/ewk/ewk_settings_private.h
index 4d7ee585e..558f7b803 100644
--- a/Source/WebKit/efl/ewk/ewk_settings_private.h
+++ b/Source/WebKit/efl/ewk/ewk_settings_private.h
@@ -23,4 +23,6 @@
const char* ewk_settings_default_user_agent_get();
+void ewk_settings_file_system_path_set(const char *path);
+
#endif // ewk_settings_private_h
diff --git a/Source/WebKit/efl/ewk/ewk_util.cpp b/Source/WebKit/efl/ewk/ewk_util.cpp
deleted file mode 100644
index a1507cdc0..000000000
--- a/Source/WebKit/efl/ewk/ewk_util.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- Copyright (C) 2009-2010 ProFUSION embedded systems
- Copyright (C) 2009-2010 Samsung Electronics
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-
-#include "ewk_private.h"
-#include "ewk_util_private.h"
-#include <eina_safety_checks.h>
-
-/**
- * Converts an image from cairo_surface to the Evas_Object.
- *
- * @param canvas display canvas
- * @param surface cairo representation of an image
- * @return converted cairo_surface object to the Evas_Object
- */
-Evas_Object* ewk_util_image_from_cairo_surface_add(Evas* canvas, cairo_surface_t* surface)
-{
- cairo_status_t status;
- cairo_surface_type_t type;
- cairo_format_t format;
- int w, h, stride;
- Evas_Object* image;
- const void* src;
- void* dst;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
- EINA_SAFETY_ON_NULL_RETURN_VAL(surface, 0);
-
- status = cairo_surface_status(surface);
- if (status != CAIRO_STATUS_SUCCESS) {
- ERR("cairo surface is invalid: %s", cairo_status_to_string(status));
- return 0;
- }
-
- type = cairo_surface_get_type(surface);
- if (type != CAIRO_SURFACE_TYPE_IMAGE) {
- ERR("unknown surface type %d, required %d (CAIRO_SURFACE_TYPE_IMAGE).",
- type, CAIRO_SURFACE_TYPE_IMAGE);
- return 0;
- }
-
- format = cairo_image_surface_get_format(surface);
- if (format != CAIRO_FORMAT_ARGB32 && format != CAIRO_FORMAT_RGB24) {
- ERR("unknown surface format %d, expected %d or %d.",
- format, CAIRO_FORMAT_ARGB32, CAIRO_FORMAT_RGB24);
- return 0;
- }
-
- w = cairo_image_surface_get_width(surface);
- h = cairo_image_surface_get_height(surface);
- stride = cairo_image_surface_get_stride(surface);
- if (w <= 0 || h <= 0 || stride <= 0) {
- ERR("invalid image size %dx%d, stride=%d", w, h, stride);
- return 0;
- }
-
- src = cairo_image_surface_get_data(surface);
- if (!src) {
- ERR("could not get source data.");
- return 0;
- }
-
- image = evas_object_image_filled_add(canvas);
- if (!image) {
- ERR("could not add image to canvas.");
- return 0;
- }
-
- evas_object_image_colorspace_set(image, EVAS_COLORSPACE_ARGB8888);
- evas_object_image_size_set(image, w, h);
- evas_object_image_alpha_set(image, format == CAIRO_FORMAT_ARGB32);
-
- if (evas_object_image_stride_get(image) != stride) {
- ERR("evas' stride %d diverges from cairo's %d.",
- evas_object_image_stride_get(image), stride);
- evas_object_del(image);
- return 0;
- }
-
- dst = evas_object_image_data_get(image, true);
- memcpy(dst, src, h * stride);
- evas_object_image_data_set(image, dst);
-
- evas_object_resize(image, w, h); // helpful but not really required
-
- return image;
-}
diff --git a/Source/WebKit/efl/ewk/ewk_util_private.h b/Source/WebKit/efl/ewk/ewk_util_private.h
deleted file mode 100644
index bee2d0ebe..000000000
--- a/Source/WebKit/efl/ewk/ewk_util_private.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2009-2010 ProFUSION embedded systems
- Copyright (C) 2009-2010 Samsung Electronics
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef ewk_util_private_h
-#define ewk_util_private_h
-
-#include <Evas.h>
-#include <cairo.h>
-
-Evas_Object *ewk_util_image_from_cairo_surface_add(Evas *canvas, cairo_surface_t *surface);
-
-#endif // ewk_util_private_h
diff --git a/Source/WebKit/efl/ewk/ewk_view.cpp b/Source/WebKit/efl/ewk/ewk_view.cpp
index ef3564d6c..3a8b7138c 100644
--- a/Source/WebKit/efl/ewk/ewk_view.cpp
+++ b/Source/WebKit/efl/ewk/ewk_view.cpp
@@ -2862,7 +2862,14 @@ void ewk_view_scrolls_process(Ewk_View_Smart_Data* smartData)
Eina_Bool ewk_view_paint(Ewk_View_Private_Data* priv, cairo_t* cr, const Eina_Rectangle* area)
{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(priv, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(cr, false);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(area, false);
+
+ WebCore::FrameView* view = priv->mainFrame->view();
+ EINA_SAFETY_ON_NULL_RETURN_VAL(view, false);
+
+ view->updateLayoutAndStyleIfNeededRecursive();
Ewk_Paint_Context* context = ewk_paint_context_new(cr);
bool result = ewk_view_paint(priv, context, area);
@@ -2918,8 +2925,6 @@ Eina_Bool ewk_view_paint(Ewk_View_Private_Data* priv, Ewk_Paint_Context* context
WebCore::FrameView* view = priv->mainFrame->view();
EINA_SAFETY_ON_NULL_RETURN_VAL(view, false);
- view->updateLayoutAndStyleIfNeededRecursive();
-
ewk_paint_context_save(context);
ewk_paint_context_clip(context, area);
ewk_paint_context_paint(context, view, area);
@@ -4445,7 +4450,7 @@ void ewk_view_setting_should_display_text_descriptions_set(Evas_Object *ewkView,
#endif
}
-void ewk_view_web_inspector_show(const Evas_Object* ewkView)
+void ewk_view_inspector_show(const Evas_Object* ewkView)
{
#if ENABLE(INSPECTOR)
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
@@ -4455,7 +4460,7 @@ void ewk_view_web_inspector_show(const Evas_Object* ewkView)
#endif
}
-void ewk_view_web_inspector_close(const Evas_Object* ewkView)
+void ewk_view_inspector_close(const Evas_Object* ewkView)
{
#if ENABLE(INSPECTOR)
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
@@ -4465,7 +4470,7 @@ void ewk_view_web_inspector_close(const Evas_Object* ewkView)
#endif
}
-Evas_Object* ewk_view_web_inspector_view_get(const Evas_Object* ewkView)
+Evas_Object* ewk_view_inspector_view_get(const Evas_Object* ewkView)
{
#if ENABLE(INSPECTOR)
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
@@ -4477,7 +4482,7 @@ Evas_Object* ewk_view_web_inspector_view_get(const Evas_Object* ewkView)
#endif
}
-void ewk_view_web_inspector_view_set(Evas_Object* ewkView, Evas_Object* inspectorView)
+void ewk_view_inspector_view_set(Evas_Object* ewkView, Evas_Object* inspectorView)
{
#if ENABLE(INSPECTOR)
EWK_VIEW_SD_GET(ewkView, smartData);
diff --git a/Source/WebKit/efl/ewk/ewk_view.h b/Source/WebKit/efl/ewk/ewk_view.h
index 7a8b5d73b..c1a819fa3 100644
--- a/Source/WebKit/efl/ewk/ewk_view.h
+++ b/Source/WebKit/efl/ewk/ewk_view.h
@@ -46,8 +46,8 @@
* - "icon,received", void: main frame received an icon.
* - "inputmethod,changed", Eina_Bool: reports that input method was changed and
* it gives a boolean value whether it's enabled or not as an argument.
- * - "inspector,view,close", Evas_Object*: request to close the view for web inspector.
- * - "inspector,view,create", void: request to create the new view for web inspector.
+ * - "inspector,view,close", Evas_Object*: request to close the view for inspector.
+ * - "inspector,view,create", void: request to create the new view for inspector.
* - "js,windowobject,clear", void: Report that the JS window object has been cleared.
* - "link,hover,in", const char *link[2]: reports mouse is over a link.
* It gives the url in link[0] and link's title in link[1] as an argument.
@@ -2703,51 +2703,51 @@ EAPI Eina_Bool ewk_view_setting_web_audio_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_web_audio_set(Evas_Object *o, Eina_Bool enable);
/**
- * Show the web inspector to debug a web page.
+ * Show the inspector to debug a web page.
*
* The following signals are emiited.
* "inspector,view,create" and "inspector,view,close"
- * The first one will be called to request the view for web inspector on view that will be inspected.
- * This callback should create the view for web inspector and set the view with ewk_view_web_inspector_view_set().
- * The second one will be called to close the view for web inspector on view having the web inspector after disconnecting frontend
- * This callback should remove the view for web inspector.
+ * The first one will be called to request the view for inspector on view that will be inspected.
+ * This callback should create the view for inspector and set the view with ewk_view_inspector_view_set().
+ * The second one will be called to close the view for inspector on view having the inspector after disconnecting frontend
+ * This callback should remove the view for inspector.
*
- * When the view having the web inspector is removed,
- * please emit the "inspector,view,destroy" signal on view for web inspector.
+ * When the view having the inspector is removed,
+ * please emit the "inspector,view,destroy" signal on view for inspector.
*
- * @param o The view to show the web inspector.
+ * @param o The view to show the inspector.
*
- * @see ewk_view_web_inspector_close()
- * @see ewk_view_web_inspector_view_set()
+ * @see ewk_view_inspector_close()
+ * @see ewk_view_inspector_view_set()
*/
-EAPI void ewk_view_web_inspector_show(const Evas_Object *o);
+EAPI void ewk_view_inspector_show(const Evas_Object *o);
/**
- * Close the web inspector view
+ * Close the inspector view
*
- * @param o The view to close the web inspector.
+ * @param o The view to close the inspector.
*
- * @see ewk_view_web_inspector_show()
- * @see ewk_view_web_inspector_view_get()
+ * @see ewk_view_inspector_show()
+ * @see ewk_view_inspector_view_get()
*/
-EAPI void ewk_view_web_inspector_close(const Evas_Object *o);
+EAPI void ewk_view_inspector_close(const Evas_Object *o);
/**
- * Get the view of web inspector.
+ * Get the view of inspector.
*
* @param o The view that is inspected.
*
* @return view object on success or @c NULL on failure
*/
-EAPI Evas_Object* ewk_view_web_inspector_view_get(const Evas_Object *o);
+EAPI Evas_Object* ewk_view_inspector_view_get(const Evas_Object *o);
/**
- * Set the view of web inspector.
+ * Set the view of inspector.
*
* @param o The view that is inspected.
- * @param inspector_view The view of web inspector.
+ * @param inspector_view The view of inspector.
*/
-EAPI void ewk_view_web_inspector_view_set(Evas_Object *o, Evas_Object *inspector_view);
+EAPI void ewk_view_inspector_view_set(Evas_Object *o, Evas_Object *inspector_view);
/**
* Enables/disables the fullscreen mode by javascript fullscreen API.
diff --git a/Source/WebKit/efl/ewk/ewk_view_single.cpp b/Source/WebKit/efl/ewk/ewk_view_single.cpp
index 2d0597d87..294bbc8e1 100644
--- a/Source/WebKit/efl/ewk/ewk_view_single.cpp
+++ b/Source/WebKit/efl/ewk/ewk_view_single.cpp
@@ -260,15 +260,9 @@ static Eina_Bool _ewk_view_single_smart_repaints_process(Ewk_View_Smart_Data* sm
Ewk_Paint_Context* context = ewk_paint_context_from_image_new(smartData->backing_store);
ewk_paint_context_save(context);
- int scrollX, scrollY;
- ewk_frame_scroll_pos_get(smartData->main_frame, &scrollX, &scrollY);
- if (scrollX || scrollY)
- ewk_paint_context_translate(context, -scrollX, -scrollY);
-
Eina_Rectangle* rect;
EINA_ITERATOR_FOREACH(iterator, rect) {
- Eina_Rectangle scrolledRect = { rect->x + scrollX, rect->y + scrollY, rect->w, rect->h };
- ewk_view_paint_contents(smartData->_priv, context, &scrolledRect);
+ ewk_view_paint(smartData->_priv, context, rect);
evas_object_image_data_update_add(smartData->backing_store, rect->x, rect->y, rect->w, rect->h);
}
diff --git a/Source/WebKit/efl/tests/UnitTestUtils/EWKTestBase.cpp b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestBase.cpp
index 2d3e2ae9e..7dff49f20 100644
--- a/Source/WebKit/efl/tests/UnitTestUtils/EWKTestBase.cpp
+++ b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestBase.cpp
@@ -19,84 +19,45 @@
#include "config.h"
#include "EWKTestBase.h"
-#include "EWKTestConfig.h"
-#include "EWKTestView.h"
+#include "EWKTestEnvironment.h"
#include <EWebKit.h>
-
#include <Ecore.h>
#include <Edje.h>
-int EWKUnitTests::EWKTestBase::useX11Window;
+extern EWKUnitTests::EWKTestEnvironment* environment;
namespace EWKUnitTests {
-bool EWKTestBase::init()
+EWKTestBase::EWKTestBase()
{
- if (!ecore_evas_init())
- return false;
-
- if (!edje_init()) {
- ecore_evas_shutdown();
- return false;
- }
-
- int ret = ewk_init();
- const char* proxyUri = getenv("http_proxy");
-
- if (ret && proxyUri)
- ewk_network_proxy_uri_set(proxyUri);
-
- return ret;
}
-void EWKTestBase::shutdownAll()
+Evas_Object* EWKTestBase::webView()
{
- int count = 0;
-
- while ((count = ecore_evas_shutdown()) > 0) { }
- while ((count = edje_shutdown()) > 0) { }
- while ((count = ewk_shutdown()) > 0) { }
+ return m_ewkTestView.webView();
}
-void EWKTestBase::startTest()
+void EWKTestBase::SetUp()
{
- ecore_main_loop_begin();
+ ASSERT_TRUE(m_ewkTestView.init());
}
-void EWKTestBase::endTest()
+void EWKTestBase::onLoadFinished(void* data, Evas_Object* webView, void* eventInfo)
{
ecore_main_loop_quit();
}
-bool EWKTestBase::createTest(const char* url, void (*event_callback)(void*, Evas_Object*, void*), const char* event_name, void* event_data)
-{
- EFL_INIT_RET();
-
- EWKTestEcoreEvas evas(useX11Window);
- if (!evas.evas())
- return false;
- evas.show();
-
- EWKTestView view(evas.evas(), url);
- if (!view.init())
- return false;
-
- view.bindEvents(event_callback, event_name, event_data);
- view.show();
-
- START_TEST();
-
- return true;
-}
-
-bool EWKTestBase::runTest(void (*event_callback)(void*, Evas_Object*, void*), const char* event_name, void* event_data)
+void EWKTestBase::waitUntilLoadFinished()
{
- return createTest(Config::defaultTestPage, event_callback, event_name, event_data);
+ evas_object_smart_callback_add(webView(), "load,finished", onLoadFinished, 0);
+ ecore_main_loop_begin();
+ evas_object_smart_callback_del(webView(), "load,finished", onLoadFinished);
}
-bool EWKTestBase::runTest(const char* url, void (*event_callback)(void*, Evas_Object*, void*), const char* event_name, void* event_data)
+void EWKTestBase::loadUrl(const char* url)
{
- return createTest(url, event_callback, event_name, event_data);
+ ASSERT_TRUE(ewk_view_uri_set(webView(), url));
+ waitUntilLoadFinished();
}
}
diff --git a/Source/WebKit/efl/tests/UnitTestUtils/EWKTestBase.h b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestBase.h
index ec7513297..0e22351cb 100644
--- a/Source/WebKit/efl/tests/UnitTestUtils/EWKTestBase.h
+++ b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestBase.h
@@ -19,49 +19,25 @@
#ifndef EWKTestBase_h
#define EWKTestBase_h
-#include <Evas.h>
+#include "EWKTestConfig.h"
+#include "EWKTestView.h"
#include <gtest/gtest.h>
-#define RUN_TEST(args...) \
- do { \
- ASSERT_EQ(true, EWKTestBase::runTest(args)); \
- } while (0)
-
-#define START_TEST() \
- do { \
- EWKTestBase::startTest(); \
- } while (0)
-
-#define END_TEST() \
- do { \
- EWKTestBase::endTest(); \
- } while (0)
-
-#define EFL_INIT_RET() \
- do { \
- if (!EWKTestBase::init()) \
- return false; \
- } while (0)
-
-#define EFL_INIT() \
- do { \
- EWKTestBase::init(); \
- } while (0)
-
namespace EWKUnitTests {
-class EWKTestBase {
- static bool createTest(const char* url, void (*event_callback)(void*, Evas_Object*, void*), const char* event_name, void* event_data);
+class EWKTestBase: public ::testing::Test {
public:
- static bool init();
- static void shutdownAll();
- static void startTest();
- static void endTest();
+ static void onLoadFinished(void* data, Evas_Object* webView, void* eventInfo);
+
+ Evas_Object* webView();
+ virtual void SetUp();
+protected:
+ EWKTestBase();
- static bool runTest(const char* url, void (*event_callback)(void*, Evas_Object*, void*), const char* event_name = "load,finished", void* event_data = 0);
- static bool runTest(void (*event_callback)(void*, Evas_Object*, void*), const char* event_name = "load,finished", void* event_data = 0);
+ void loadUrl(const char* url = Config::defaultTestPage);
+ void waitUntilLoadFinished();
- static int useX11Window;
+ EWKTestView m_ewkTestView;
};
}
diff --git a/Source/WebKit/efl/tests/UnitTestUtils/EWKTestEnvironment.cpp b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestEnvironment.cpp
new file mode 100644
index 000000000..6a1fea45b
--- /dev/null
+++ b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestEnvironment.cpp
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 2012 Samsung Electronics
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#include "config.h"
+#include "EWKTestEnvironment.h"
+
+#include <EWebKit.h>
+#include <Ecore.h>
+#include <Edje.h>
+
+namespace EWKUnitTests {
+
+EWKTestEnvironment::EWKTestEnvironment(bool useX11Window)
+ : m_useX11Window(useX11Window)
+{
+}
+
+void EWKTestEnvironment::SetUp()
+{
+ ASSERT_GT(ewk_init(), 0);
+
+ const char* proxyUrl = getenv("http_proxy");
+ if (proxyUrl)
+ ewk_network_proxy_uri_set(proxyUrl);
+}
+
+void EWKTestEnvironment::TearDown()
+{
+ ewk_shutdown();
+}
+
+}
diff --git a/Source/WebKit/efl/tests/UnitTestUtils/EWKTestEnvironment.h b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestEnvironment.h
new file mode 100644
index 000000000..7ca6966ab
--- /dev/null
+++ b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestEnvironment.h
@@ -0,0 +1,38 @@
+/*
+ Copyright (C) 2012 Samsung Electronics
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#ifndef EWKTestEnvironment_h
+#define EWKTestEnvironment_h
+
+#include <gtest/gtest.h>
+
+namespace EWKUnitTests {
+
+class EWKTestEnvironment : public ::testing::Environment {
+public:
+ explicit EWKTestEnvironment(bool useX11Window);
+
+ virtual void SetUp();
+ virtual void TearDown();
+private:
+ bool m_useX11Window;
+};
+
+}
+
+#endif
diff --git a/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.cpp b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.cpp
index dbb0092e8..ce43e33f4 100644
--- a/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.cpp
+++ b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.cpp
@@ -19,131 +19,49 @@
#include "config.h"
#include "EWKTestView.h"
-#include "EWKTestConfig.h"
#include <EWebKit.h>
-
+#include <wtf/NullPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/RefPtr.h>
namespace EWKUnitTests {
-EWKTestEcoreEvas::EWKTestEcoreEvas(int useX11Window)
+EWKTestView::EWKTestView()
{
- if (useX11Window)
- m_ecoreEvas = adoptPtr(ecore_evas_new(0, 0, 0, Config::defaultViewWidth, Config::defaultViewHeight, 0));
- else
- m_ecoreEvas = adoptPtr(ecore_evas_buffer_new(Config::defaultViewWidth, Config::defaultViewHeight));
}
-EWKTestEcoreEvas::EWKTestEcoreEvas(const char* engine_name, int viewport_x, int viewport_y, int viewport_w, int viewport_h, const char* extra_options, int useX11Window)
+bool EWKTestView::init(EwkViewType testViewType, int width, int height)
{
- if (useX11Window)
- m_ecoreEvas = adoptPtr(ecore_evas_new(engine_name, viewport_x, viewport_y, viewport_w, viewport_h, extra_options));
- else
- m_ecoreEvas = adoptPtr(ecore_evas_buffer_new(viewport_x, viewport_y));
-}
-
-Evas* EWKTestEcoreEvas::evas()
-{
- if (m_ecoreEvas.get())
- return ecore_evas_get(m_ecoreEvas.get());
- return 0;
-}
-
-void EWKTestEcoreEvas::show()
-{
- if (m_ecoreEvas.get())
- ecore_evas_show(m_ecoreEvas.get());
-}
-
-EWKTestView::EWKTestView(Evas* evas)
- : m_evas(evas)
- , m_url(Config::defaultTestPage)
- , m_defaultViewType(TiledView)
- , m_width(Config::defaultViewWidth)
- , m_height(Config::defaultViewHeight)
-{
-}
-
-EWKTestView::EWKTestView(Evas* evas, const char* url)
- : m_evas(evas)
- , m_url(url)
- , m_defaultViewType(TiledView)
- , m_width(Config::defaultViewWidth)
- , m_height(Config::defaultViewHeight)
-{
-}
-
-EWKTestView::EWKTestView(Evas* evas, EwkViewType type, const char* url)
- : m_evas(evas)
- , m_url(url)
- , m_defaultViewType(type)
- , m_width(Config::defaultViewWidth)
- , m_height(Config::defaultViewHeight)
-{
-}
+ m_webView = nullptr;
-EWKTestView::EWKTestView(Evas* evas, EwkViewType type, const char* url, int width, int height)
- : m_evas(evas)
- , m_url(url)
- , m_defaultViewType(type)
- , m_width(width)
- , m_height(height)
-{
-}
+ m_ecoreEvas = adoptPtr(ecore_evas_new(0, 0, 0, width, height, 0));
+ if (!m_ecoreEvas)
+ return false;
-bool EWKTestView::init()
-{
- if (!m_evas || m_url.empty())
+ ecore_evas_show(m_ecoreEvas.get());
+ Evas* evas = ecore_evas_get(m_ecoreEvas.get());
+ if (!evas)
return false;
- switch (m_defaultViewType) {
+ switch (testViewType) {
case SingleView:
- m_webView = adoptRef(ewk_view_single_add(m_evas));
+ m_webView = adoptRef(ewk_view_single_add(evas));
break;
case TiledView:
- m_webView = adoptRef(ewk_view_tiled_add(m_evas));
+ m_webView = adoptRef(ewk_view_tiled_add(evas));
break;
}
- if (!m_webView.get())
+ if (!m_webView)
return false;
ewk_view_theme_set(m_webView.get(), Config::defaultThemePath);
- ewk_view_uri_set(m_webView.get(), m_url.c_str());
-}
-void EWKTestView::show()
-{
- if (!m_webView.get())
- return;
- evas_object_resize(m_webView.get(), m_width, m_height);
+ evas_object_resize(m_webView.get(), width, height);
evas_object_show(m_webView.get());
evas_object_focus_set(m_webView.get(), EINA_TRUE);
-}
-
-Evas_Object* EWKTestView::mainFrame()
-{
- if (m_webView.get())
- return ewk_view_frame_main_get(m_webView.get());
- return 0;
-}
-
-Evas* EWKTestView::evas()
-{
- if (m_webView.get())
- return evas_object_evas_get(m_webView.get());
- return 0;
-}
-
-void EWKTestView::bindEvents(void (*callback)(void*, Evas_Object*, void*), const char* eventName, void* ptr)
-{
- if (!m_webView.get())
- return;
-
- evas_object_smart_callback_del(m_webView.get(), eventName, callback);
- evas_object_smart_callback_add(m_webView.get(), eventName, callback, ptr);
+ return true;
}
}
diff --git a/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.h b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.h
index 1bdd9edae..f792a3894 100644
--- a/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.h
+++ b/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.h
@@ -19,56 +19,32 @@
#ifndef EWKTestView_h
#define EWKTestView_h
+#include "EWKTestConfig.h"
#include <Ecore_Evas.h>
#include <Evas.h>
-#include <string>
#include <wtf/OwnPtr.h>
#include <wtf/efl/RefPtrEfl.h>
namespace EWKUnitTests {
-class EWKTestEcoreEvas {
-public:
- EWKTestEcoreEvas(int useX11Window);
- EWKTestEcoreEvas(const char* engine_name, int viewport_x, int viewport_y, int viewport_w, int viewport_h, const char* extra_options, int useX11Window);
-
- Evas* evas();
- void show();
-
-private:
- OwnPtr<Ecore_Evas> m_ecoreEvas;
-};
-
class EWKTestView {
public:
enum EwkViewType {
SingleView = 0,
- TiledView,
+ TiledView
};
- explicit EWKTestView(Evas*);
- EWKTestView(Evas*, const char* url);
- EWKTestView(Evas*, EwkViewType, const char* url);
- EWKTestView(Evas*, EwkViewType, const char* url, int width, int height);
+ EWKTestView();
Evas_Object* webView() { return m_webView.get(); }
- Evas_Object* mainFrame();
- Evas* evas();
- void show();
-
- bool init();
- void bindEvents(void (*callback)(void*, Evas_Object*, void*), const char* eventName, void* ptr);
+ bool init(EwkViewType testViewType = TiledView, int width = Config::defaultViewWidth, int height = Config::defaultViewHeight);
private:
EWKTestView(const EWKTestView&);
- EWKTestView operator=(const EWKTestView&);
+ EWKTestView& operator=(const EWKTestView&);
- Evas* m_evas;
+ OwnPtr<Ecore_Evas> m_ecoreEvas;
RefPtr<Evas_Object> m_webView;
-
- int m_width, m_height;
- EwkViewType m_defaultViewType;
- std::string m_url;
};
}
diff --git a/Source/WebKit/efl/tests/test_ewk_view.cpp b/Source/WebKit/efl/tests/test_ewk_view.cpp
index b5bbc7b8f..9fa23fb00 100644
--- a/Source/WebKit/efl/tests/test_ewk_view.cpp
+++ b/Source/WebKit/efl/tests/test_ewk_view.cpp
@@ -19,66 +19,54 @@
#include "config.h"
#include "UnitTestUtils/EWKTestBase.h"
+#include "UnitTestUtils/EWKTestConfig.h"
#include <EWebKit.h>
-#include <gtest/gtest.h>
+#include <Ecore.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
using namespace EWKUnitTests;
/**
* @brief Checking whether function properly returns correct value.
*/
-static void ewkViewEditableGetCb(void* eventInfo, Evas_Object* o, void* data)
+TEST_F(EWKTestBase, ewk_view_editable_get)
{
- ewk_view_editable_set(o, EINA_FALSE);
- EXPECT_EQ(EINA_FALSE, ewk_view_editable_get(o));
- END_TEST();
-}
-
-TEST(test_ewk_view, ewk_view_editable_get)
-{
- RUN_TEST(ewkViewEditableGetCb);
+ loadUrl();
+ ewk_view_editable_set(webView(), true);
+ ASSERT_TRUE(ewk_view_editable_get(webView()));
}
/**
* @brief Checking whether function returns correct uri string.
*/
-static void ewkViewUriGetCb(void* eventInfo, Evas_Object* o, void* data)
+TEST_F(EWKTestBase, ewk_view_uri_get)
{
- EXPECT_STREQ("http://www.webkit.org/", ewk_view_uri_get(o));
- END_TEST();
-}
-
-TEST(test_ewk_view, ewk_view_uri_get)
-{
- RUN_TEST("http://www.webkit.org", ewkViewUriGetCb);
+ loadUrl();
+ ASSERT_STREQ(Config::defaultTestPage, ewk_view_uri_get(webView()));
}
/**
* @brief Checking whether function properly get/set fullscreen setting value.
*/
-static void ewkViewEnableFullscreenCb(void* eventInfo, Evas_Object* webView, void* data)
+TEST_F(EWKTestBase, ewk_view_setting_enable_fullscreen)
{
+ loadUrl();
#if ENABLE(FULLSCREEN_API)
- ASSERT_TRUE(ewk_view_setting_enable_fullscreen_get(webView));
+ ASSERT_TRUE(ewk_view_setting_enable_fullscreen_get(webView()));
- ASSERT_TRUE(ewk_view_setting_enable_fullscreen_set(webView, true));
- ASSERT_TRUE(ewk_view_setting_enable_fullscreen_get(webView));
+ ASSERT_TRUE(ewk_view_setting_enable_fullscreen_set(webView(), true));
+ ASSERT_TRUE(ewk_view_setting_enable_fullscreen_get(webView()));
- ASSERT_TRUE(ewk_view_setting_enable_fullscreen_set(webView, false));
- ASSERT_FALSE(ewk_view_setting_enable_fullscreen_get(webView));
+ ASSERT_TRUE(ewk_view_setting_enable_fullscreen_set(webView(), false));
+ ASSERT_FALSE(ewk_view_setting_enable_fullscreen_get(webView()));
#else
- ASSERT_FALSE(ewk_view_setting_enable_fullscreen_get(webView));
+ ASSERT_FALSE(ewk_view_setting_enable_fullscreen_get(webView()));
- ASSERT_FALSE(ewk_view_setting_enable_fullscreen_set(webView, true));
- ASSERT_FALSE(ewk_view_setting_enable_fullscreen_get(webView));
+ ASSERT_FALSE(ewk_view_setting_enable_fullscreen_set(webView(), true));
+ ASSERT_FALSE(ewk_view_setting_enable_fullscreen_get(webView()));
- ASSERT_FALSE(ewk_view_setting_enable_fullscreen_set(webView, false));
- ASSERT_FALSE(ewk_view_setting_enable_fullscreen_get(webView));
+ ASSERT_FALSE(ewk_view_setting_enable_fullscreen_set(webView(), false));
+ ASSERT_FALSE(ewk_view_setting_enable_fullscreen_get(webView()));
#endif
- END_TEST();
-}
-
-TEST(test_ewk_view, ewk_view_setting_enable_fullscreen)
-{
- RUN_TEST(ewkViewEnableFullscreenCb);
}
diff --git a/Source/WebKit/efl/tests/test_runner.cpp b/Source/WebKit/efl/tests/test_runner.cpp
index 702a61f6c..e8f3c087d 100644
--- a/Source/WebKit/efl/tests/test_runner.cpp
+++ b/Source/WebKit/efl/tests/test_runner.cpp
@@ -16,25 +16,37 @@
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
+
#include "UnitTestUtils/EWKTestBase.h"
+#include "UnitTestUtils/EWKTestEnvironment.h"
#include <getopt.h>
#include <gtest/gtest.h>
-static void parseCustomArguments(int argc, char** argv)
+using namespace EWKUnitTests;
+
+EWKTestEnvironment* environment = 0;
+
+static int parseCustomArguments(int argc, char** argv)
{
+ int useX11Window = 0;
static const option options[] = {
- {"useX11Window", no_argument, &EWKUnitTests::EWKTestBase::useX11Window, true},
+ {"useX11Window", no_argument, &useX11Window, true},
{0, 0, 0, 0}
};
int option;
while ((option = getopt_long(argc, argv, "", options, 0)) != -1) { }
+
+ return useX11Window;
}
int main(int argc, char** argv)
{
- atexit(EWKUnitTests::EWKTestBase::shutdownAll);
- parseCustomArguments(argc, argv);
+ int useX11Window = parseCustomArguments(argc, argv);
+ environment = new EWKTestEnvironment(useX11Window);
+ testing::AddGlobalTestEnvironment(environment);
::testing::InitGoogleTest(&argc, argv);
+
return RUN_ALL_TESTS();
}