diff options
author | m.kawonczyk <m.kawonczyk@samsung.com> | 2016-09-22 15:44:00 +0200 |
---|---|---|
committer | HyeKyoung Hwang <cookie@samsung.com> | 2016-10-28 11:10:18 +0900 |
commit | 37663bfecd30501b0aaea5b48e1341a31d101733 (patch) | |
tree | e53e6fb6d8826bd20ce5e1c36a928e1d4babb21b /services/WebPageUI | |
parent | 33024a74876057a5c791438689f37f81d52be6c8 (diff) | |
download | browser-37663bfecd30501b0aaea5b48e1341a31d101733.tar.gz browser-37663bfecd30501b0aaea5b48e1341a31d101733.tar.bz2 browser-37663bfecd30501b0aaea5b48e1341a31d101733.zip |
The Dummy Button removal
[Issue] N/A
[Problem] WebView team managed to extract Evas_Object from
ewk_view smart object. This object can be focused
and unfocused, so The Dummy Button - proxy widget is
not needed anymore
[Solution] Delete The Dummy Button, add support for extracted
Evas_Object.
[Verify] Open any website, check if focus is working as
intended.
Change-Id: Idf388056f1c6be494f76b5d36fef0be6bcef4556
Diffstat (limited to 'services/WebPageUI')
-rwxr-xr-x | services/WebPageUI/WebPageUI.cpp | 40 | ||||
-rw-r--r-- | services/WebPageUI/WebPageUI.h | 4 | ||||
-rw-r--r-- | services/WebPageUI/edc/WebPageUI_mob.edc | 19 |
3 files changed, 2 insertions, 61 deletions
diff --git a/services/WebPageUI/WebPageUI.cpp b/services/WebPageUI/WebPageUI.cpp index 0c6227f1..efb210cb 100755 --- a/services/WebPageUI/WebPageUI.cpp +++ b/services/WebPageUI/WebPageUI.cpp @@ -37,7 +37,6 @@ EXPORT_SERVICE(WebPageUI, "org.tizen.browser.webpageui") WebPageUI::WebPageUI() : m_parent(nullptr) , m_mainLayout(nullptr) - , m_dummy_button(nullptr) , m_errorLayout(nullptr) , m_privateLayout(nullptr) , m_bookmarkManagerButton(nullptr) @@ -60,8 +59,6 @@ WebPageUI::WebPageUI() WebPageUI::~WebPageUI() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); - evas_object_smart_callback_del(m_dummy_button, "focused", _dummy_button_focused); - evas_object_smart_callback_del(m_dummy_button, "unfocused", _dummy_button_unfocused); } void WebPageUI::init(Evas_Object* parent) @@ -486,43 +483,6 @@ void WebPageUI::createLayout() #endif } -void WebPageUI::createDummyButton() -{ - BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); - if (!m_dummy_button) { - M_ASSERT(m_mainLayout); - m_dummy_button = elm_button_add(m_mainLayout); - elm_object_style_set(m_dummy_button, "invisible_button"); - evas_object_size_hint_align_set(m_dummy_button, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(m_dummy_button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_focus_allow_set(m_dummy_button, EINA_TRUE); - elm_object_focus_set(m_dummy_button, EINA_TRUE); - evas_object_show(m_dummy_button); - elm_object_part_content_set(m_mainLayout, "web_view_dummy_button", m_dummy_button); - - evas_object_smart_callback_add(m_dummy_button, "focused", _dummy_button_focused, this); - evas_object_smart_callback_add(m_dummy_button, "unfocused", _dummy_button_unfocused, this); - } -} - -void WebPageUI::_dummy_button_focused(void *data, Evas_Object *, void *) -{ - BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); - if (data != nullptr) { - WebPageUI* webPageUI = static_cast<WebPageUI*>(data); - webPageUI->focusWebView(); - } -} - -void WebPageUI::_dummy_button_unfocused(void *data, Evas_Object *, void *) -{ - BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); - if (data != nullptr) { - WebPageUI* webPageUI = static_cast<WebPageUI*>(data); - webPageUI->unfocusWebView(); - } -} - void WebPageUI::createErrorLayout() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); diff --git a/services/WebPageUI/WebPageUI.h b/services/WebPageUI/WebPageUI.h index 850dfaba..9080fba5 100644 --- a/services/WebPageUI/WebPageUI.h +++ b/services/WebPageUI/WebPageUI.h @@ -53,7 +53,6 @@ public: UrlHistoryPtr getUrlHistoryList(); virtual void showUI(); virtual void hideUI(); - void createDummyButton(); #if PROFILE_MOBILE virtual void orientationChanged() override; void fullscreenModeSet(bool state); @@ -121,8 +120,6 @@ private: static void faviconClicked(void* data, Evas_Object* obj, const char* emission, const char* source); static Eina_Bool _cb_down_pressed_on_urlbar(void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, void *event_info); static void _bookmark_manager_clicked(void * data, Evas_Object *, void *); - static void _dummy_button_focused(void *data, Evas_Object *, void *); - static void _dummy_button_unfocused(void *data, Evas_Object *, void *); #if PROFILE_MOBILE static void _more_menu_background_clicked(void* data, Evas_Object*, const char*, const char*); static void _content_clicked(void * data, Evas_Object *, void *); @@ -163,7 +160,6 @@ private: Evas_Object* m_parent; Evas_Object* m_mainLayout; - Evas_Object* m_dummy_button; Evas_Object* m_errorLayout; Evas_Object* m_privateLayout; Evas_Object* m_bookmarkManagerButton; diff --git a/services/WebPageUI/edc/WebPageUI_mob.edc b/services/WebPageUI/edc/WebPageUI_mob.edc index 74b58071..116caa02 100644 --- a/services/WebPageUI/edc/WebPageUI_mob.edc +++ b/services/WebPageUI/edc/WebPageUI_mob.edc @@ -286,23 +286,8 @@ collections { base_scale: 2.6; name: "web_view"; type: SWALLOW; scale: 1; - description { - state: "default" 0.0; - visible: 1; - align: 0.0 0.0; - fixed: 0 0; - min: 0 0; - max: -1 -1; - rel1 { relative: 0.0 1.0; to: "uri_bar_bg"; } - rel2 { relative: 1.0 1.0; to: "bg"; } - } - } - part { - name: "web_view_dummy_button"; - type: SWALLOW; mouse_events: 1; repeat_events: 1; - scale: 1; description { state: "default" 0.0; visible: 1; @@ -310,8 +295,8 @@ collections { base_scale: 2.6; fixed: 0 0; min: 0 0; max: -1 -1; - rel1 { relative: 0.0 0.0; to: "web_view"; } - rel2 { relative: 1.0 1.0; to: "web_view"; } + rel1 { relative: 0.0 1.0; to: "uri_bar_bg"; } + rel2 { relative: 1.0 1.0; to: "bg"; } } } part { name: "progressbar_bg"; |