summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/SimpleUI/SimpleUI.cpp16
-rw-r--r--services/SimpleUI/SimpleUI.h1
-rw-r--r--services/WebPageUI/URIEntry.cpp6
-rw-r--r--services/WebPageUI/URIEntry.h1
-rw-r--r--services/WebPageUI/UrlHistoryList/UrlHistoryList.cpp2
-rwxr-xr-xservices/WebPageUI/WebPageUI.cpp20
-rw-r--r--services/WebPageUI/WebPageUI.h2
7 files changed, 17 insertions, 31 deletions
diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp
index 40b0216f..5f770fe2 100644
--- a/services/SimpleUI/SimpleUI.cpp
+++ b/services/SimpleUI/SimpleUI.cpp
@@ -371,10 +371,6 @@ 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));
@@ -1195,12 +1191,10 @@ 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
}
@@ -1250,7 +1244,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
@@ -1260,6 +1254,7 @@ 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)
@@ -1351,13 +1346,6 @@ 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 6dd10c69..9c7ccb69 100644
--- a/services/SimpleUI/SimpleUI.h
+++ b/services/SimpleUI/SimpleUI.h
@@ -207,7 +207,6 @@ 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 d83a07bd..1c857529 100644
--- a/services/WebPageUI/URIEntry.cpp
+++ b/services/WebPageUI/URIEntry.cpp
@@ -347,9 +347,6 @@ 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()
@@ -387,9 +384,6 @@ 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 3776e66b..3684a2b7 100644
--- a/services/WebPageUI/URIEntry.h
+++ b/services/WebPageUI/URIEntry.h
@@ -59,7 +59,6 @@ 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 abdf0142..ac28b49c 100644
--- a/services/WebPageUI/UrlHistoryList/UrlHistoryList.cpp
+++ b/services/WebPageUI/UrlHistoryList/UrlHistoryList.cpp
@@ -148,8 +148,6 @@ 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 58b02387..f68a4fd9 100755
--- a/services/WebPageUI/WebPageUI.cpp
+++ b/services/WebPageUI/WebPageUI.cpp
@@ -550,12 +550,8 @@ void WebPageUI::setContentFocus()
void WebPageUI::_content_clicked(void *data, Evas_Object *, void *)
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- if (data) {
- WebPageUI* webpageUI = static_cast<WebPageUI*>(data);
- webpageUI->hideHistoryList();
- webpageUI->setContentFocus();
- } else
- BROWSER_LOGE("WebPageUI data is null!");
+ WebPageUI* webpageUI = static_cast<WebPageUI*>(data);
+ webpageUI->setContentFocus();
}
void WebPageUI::_more_menu_background_clicked(void* data, Evas_Object*, const char*, const char*)
@@ -760,7 +756,19 @@ 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 e129bebf..a189f97c 100644
--- a/services/WebPageUI/WebPageUI.h
+++ b/services/WebPageUI/WebPageUI.h
@@ -92,6 +92,7 @@ public:
void mobileEntryFocused();
void mobileEntryUnfocused();
void setContentFocus();
+ static Eina_Bool _hideDelay(void *data);
#else
void onRedKeyPressed();
void onYellowKeyPressed();
@@ -105,7 +106,6 @@ 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