#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));
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
}
//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
m_webPageUI->stateEquals(WPUState::MAIN_ERROR_PAGE))
switchViewToWebPage();
}
+ m_webPageUI->getURIEntry().clearFocus();
}
void SimpleUI::onURLEntryEditedByUser(const std::shared_ptr<std::string> editedUrlPtr)
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()
* 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();
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
elm_object_focus_set(m_entry, EINA_FALSE);
-#if PROFILE_MOBILE
- hideHistoryList();
-#endif
}
void URIEntry::setFocus()
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*/)
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
} else {
uriChanged(content);
}
- if (getGenlistVisible())
- hideWidget();
}
void UrlHistoryList::onListWidgetFocusChange(bool focused)
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*)
} 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
void mobileEntryFocused();
void mobileEntryUnfocused();
void setContentFocus();
+ static Eina_Bool _hideDelay(void *data);
#else
void onRedKeyPressed();
void onYellowKeyPressed();
#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