diff options
author | Kamil Nowac <k.nowac@samsung.com> | 2016-07-06 14:23:01 +0200 |
---|---|---|
committer | Hye Kyoung Hwang <cookie@samsung.com> | 2016-07-08 19:17:42 -0700 |
commit | 933348348cf450b45ec957a7ec2c4f6015ea999f (patch) | |
tree | a53cdff7ae5ddf6b99803f6a0fb213a265af7e22 | |
parent | 82a932e1255bc675aabacaccf4337c7390ef1cae (diff) | |
download | browser-933348348cf450b45ec957a7ec2c4f6015ea999f.tar.gz browser-933348348cf450b45ec957a7ec2c4f6015ea999f.tar.bz2 browser-933348348cf450b45ec957a7ec2c4f6015ea999f.zip |
Fix for not working history listsubmit/tizen_mobile/20160709.025049accepted/tizen/mobile/20160709.072130
[Issue] http://suprem.sec.samsung.net/jira/browse/TSAM-5971
[Problem] List does not react on click
[Solution] Moved hide function and removed timer
[Verify] Open few pages. Enter few letters into url bar
until history list appear. Click on the record from
the list.
Page should change.
Change-Id: Ie2e0a610b76a46d3c654fbb4ed6bf98a56079f47
-rw-r--r-- | services/SimpleUI/SimpleUI.cpp | 16 | ||||
-rw-r--r-- | services/SimpleUI/SimpleUI.h | 1 | ||||
-rw-r--r-- | services/WebPageUI/URIEntry.cpp | 6 | ||||
-rw-r--r-- | services/WebPageUI/URIEntry.h | 1 | ||||
-rw-r--r-- | services/WebPageUI/UrlHistoryList/UrlHistoryList.cpp | 2 | ||||
-rwxr-xr-x | services/WebPageUI/WebPageUI.cpp | 20 | ||||
-rw-r--r-- | services/WebPageUI/WebPageUI.h | 2 |
7 files changed, 31 insertions, 17 deletions
diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index db9cf70d..1b545ba4 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -371,6 +371,10 @@ void SimpleUI::connectUISignals() #endif M_ASSERT(m_webPageUI.get()); +#if PROFILE_MOBILE + m_webPageUI->hideHistoryList.connect(boost::bind(&SimpleUI::hideHistoryList, this)); + m_webPageUI->getURIEntry().hideHistoryList.connect(boost::bind(&SimpleUI::hideHistoryList, this)); +#endif m_webPageUI->getURIEntry().uriChanged.connect(boost::bind(&SimpleUI::filterURL, this, _1)); m_webPageUI->getURIEntry().uriEntryEditingChangedByUser.connect(boost::bind(&SimpleUI::onURLEntryEditedByUser, this, _1)); m_webPageUI->getUrlHistoryList()->openURL.connect(boost::bind(&SimpleUI::onOpenURL, this, _1)); @@ -1187,10 +1191,12 @@ void SimpleUI::stopEnable(bool enable) void SimpleUI::loadStarted() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); + elm_object_focus_allow_set(m_webPageUI->getURIEntry().getEntryWidget(), EINA_TRUE); m_webPageUI->loadStarted(); #if PROFILE_MOBILE if (m_findOnPageUI->isVisible()) closeFindOnPageUI(); + m_webPageUI->setContentFocus(); #endif } @@ -1240,7 +1246,7 @@ void SimpleUI::filterURL(const std::string& url) //check if url is in blocked //no filtering - + elm_object_focus_allow_set(m_webPageUI->getURIEntry().getEntryWidget(), EINA_FALSE); if (m_webPageUI->stateEquals(WPUState::QUICK_ACCESS)) openNewTab(url, "", boost::none, false, false, basic_webengine::TabOrigin::QUICKACCESS); else @@ -1250,7 +1256,6 @@ void SimpleUI::filterURL(const std::string& url) m_webPageUI->stateEquals(WPUState::MAIN_ERROR_PAGE)) switchViewToWebPage(); } - m_webPageUI->getURIEntry().clearFocus(); } void SimpleUI::onURLEntryEditedByUser(const std::shared_ptr<std::string> editedUrlPtr) @@ -1342,6 +1347,13 @@ void SimpleUI::closeFindOnPageUI() if (m_findOnPageUI) m_findOnPageUI->hideUI(); } + +void SimpleUI::hideHistoryList() +{ + BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); + if (m_webPageUI && m_webPageUI->getUrlHistoryList()->getGenlistVisible()) + m_webPageUI->getUrlHistoryList()->hideWidget(); +} #endif void SimpleUI::showTabUI() diff --git a/services/SimpleUI/SimpleUI.h b/services/SimpleUI/SimpleUI.h index 9c7ccb69..6dd10c69 100644 --- a/services/SimpleUI/SimpleUI.h +++ b/services/SimpleUI/SimpleUI.h @@ -207,6 +207,7 @@ private: * and this is a back function that checks if address emited from browser should be changed. */ void webEngineURLChanged(const std::string url); + void hideHistoryList(); #else void onRedKeyPressed(); void onYellowKeyPressed(); diff --git a/services/WebPageUI/URIEntry.cpp b/services/WebPageUI/URIEntry.cpp index 1c857529..d83a07bd 100644 --- a/services/WebPageUI/URIEntry.cpp +++ b/services/WebPageUI/URIEntry.cpp @@ -347,6 +347,9 @@ void URIEntry::clearFocus() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); elm_object_focus_set(m_entry, EINA_FALSE); +#if PROFILE_MOBILE + hideHistoryList(); +#endif } void URIEntry::setFocus() @@ -384,6 +387,9 @@ void URIEntry::_uri_entry_selection_changed(void* data, Evas_Object* /*obj*/, vo BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); URIEntry* self = static_cast<URIEntry*>(data); self->m_entrySelectionState = SelectionState::SELECTION_KEEP; +#if PROFILE_MOBILE + self->hideHistoryList(); +#endif } void URIEntry::_uri_entry_longpressed(void* data, Evas_Object* /*obj*/, void* /*event_info*/) diff --git a/services/WebPageUI/URIEntry.h b/services/WebPageUI/URIEntry.h index 3684a2b7..3776e66b 100644 --- a/services/WebPageUI/URIEntry.h +++ b/services/WebPageUI/URIEntry.h @@ -59,6 +59,7 @@ public: boost::signals2::signal<void ()> mobileEntryUnfocused; boost::signals2::signal<void ()> secureIconClicked; boost::signals2::signal<bool (const std::string&)> isValidCert; + boost::signals2::signal<void ()> hideHistoryList; void updateSecureIcon(); void showSecureIcon(bool show, bool secure); #endif diff --git a/services/WebPageUI/UrlHistoryList/UrlHistoryList.cpp b/services/WebPageUI/UrlHistoryList/UrlHistoryList.cpp index ac28b49c..abdf0142 100644 --- a/services/WebPageUI/UrlHistoryList/UrlHistoryList.cpp +++ b/services/WebPageUI/UrlHistoryList/UrlHistoryList.cpp @@ -148,6 +148,8 @@ void UrlHistoryList::onItemSelect(std::string content) } else { uriChanged(content); } + if (getGenlistVisible()) + hideWidget(); } void UrlHistoryList::onListWidgetFocusChange(bool focused) diff --git a/services/WebPageUI/WebPageUI.cpp b/services/WebPageUI/WebPageUI.cpp index f68a4fd9..58b02387 100755 --- a/services/WebPageUI/WebPageUI.cpp +++ b/services/WebPageUI/WebPageUI.cpp @@ -550,8 +550,12 @@ void WebPageUI::setContentFocus() void WebPageUI::_content_clicked(void *data, Evas_Object *, void *) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); - WebPageUI* webpageUI = static_cast<WebPageUI*>(data); - webpageUI->setContentFocus(); + if (data) { + WebPageUI* webpageUI = static_cast<WebPageUI*>(data); + webpageUI->hideHistoryList(); + webpageUI->setContentFocus(); + } else + BROWSER_LOGE("WebPageUI data is null!"); } void WebPageUI::_more_menu_background_clicked(void* data, Evas_Object*, const char*, const char*) @@ -756,19 +760,7 @@ void WebPageUI::mobileEntryUnfocused() } else { elm_object_signal_emit(m_mainLayout, "decrease_unfocused_uri_wp", "ui"); } - - // delay hiding on one efl loop iteration to enable genlist item selected callback to come - ecore_timer_add(0.0, _hideDelay, this); } - -Eina_Bool WebPageUI::_hideDelay(void *data) -{ - BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); - auto self = static_cast<WebPageUI*>(data); - self->m_urlHistoryList->hideWidget(); - return ECORE_CALLBACK_CANCEL; -} - #endif } // namespace tizen_browser diff --git a/services/WebPageUI/WebPageUI.h b/services/WebPageUI/WebPageUI.h index a189f97c..e129bebf 100644 --- a/services/WebPageUI/WebPageUI.h +++ b/services/WebPageUI/WebPageUI.h @@ -92,7 +92,6 @@ public: void mobileEntryFocused(); void mobileEntryUnfocused(); void setContentFocus(); - static Eina_Bool _hideDelay(void *data); #else void onRedKeyPressed(); void onYellowKeyPressed(); @@ -106,6 +105,7 @@ public: #if PROFILE_MOBILE boost::signals2::signal<void ()> hideMoreMenu; boost::signals2::signal<void ()> qaOrientationChanged; + boost::signals2::signal<void ()> hideHistoryList; #else boost::signals2::signal<void ()> showZoomNavigation; #endif |