From: Hye Kyoung Hwang Date: Thu, 30 Jun 2016 02:35:12 +0000 (-0700) Subject: Revert "Revert "[Workaround] Highlight text color is gray"" X-Git-Tag: submit/tizen_mobile/20160630.040808~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e76cb3e6e5401471020d88bcba990434aaf21e7d;p=profile%2Fcommon%2Fapps%2Fweb%2Fbrowser.git Revert "Revert "[Workaround] Highlight text color is gray"" This reverts commit 909739dbb63c1c3da9368e00645e8375586378eb. Change-Id: Idf889da0b7e199fe6554853b44315769c6147c79 --- diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index 7da0394f..5b0327a3 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -82,6 +82,7 @@ SimpleUI::SimpleUI() , m_tabLimit(0) , m_favoritesLimit(0) , m_wvIMEStatus(false) + , m_webEngineHadFocusBeforeSuspend(false) #if PROFILE_MOBILE , m_current_angle(0) , m_temp_angle(0) @@ -129,18 +130,32 @@ SimpleUI::~SimpleUI() { void SimpleUI::suspend() { + //TODO: Delete when web_view fixed unfocus on suspend issue + m_webEngineHadFocusBeforeSuspend = m_webEngine->hasFocus(); m_webEngine->suspend(); } void SimpleUI::resume() { m_webEngine->resume(); + //TODO: Delete when web_view fixed unfocus on suspend issue + if (m_webEngineHadFocusBeforeSuspend) + m_webEngineFocusWorkaroundTimer = ecore_timer_add(0.0, web_view_set_focus_timer, this); + #if PROFILE_MOBILE if (m_findOnPageUI && (evas_object_visible_get(m_findOnPageUI->getContent()) == EINA_TRUE)) m_findOnPageUI->show_ime(); #endif } +Eina_Bool SimpleUI::web_view_set_focus_timer(void *data) +{ + BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); + SimpleUI * simpleUI = static_cast(data); + simpleUI->m_webEngine->setFocus(); + return ECORE_CALLBACK_CANCEL; +} + void SimpleUI::destroyUI() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); diff --git a/services/SimpleUI/SimpleUI.h b/services/SimpleUI/SimpleUI.h index c95b2c26..532a2d99 100644 --- a/services/SimpleUI/SimpleUI.h +++ b/services/SimpleUI/SimpleUI.h @@ -87,6 +87,7 @@ public: void resume(); void destroyUI(); + static Eina_Bool web_view_set_focus_timer(void *data); private: // setup functions void loadUIServices(); @@ -360,6 +361,7 @@ private: int m_tabLimit; int m_favoritesLimit; bool m_wvIMEStatus; + bool m_webEngineHadFocusBeforeSuspend; std::string m_folder_name; //helper object used to view management @@ -370,6 +372,7 @@ private: int m_current_angle; int m_temp_angle; #endif + Ecore_Timer* m_webEngineFocusWorkaroundTimer; }; }