Sometimes scroll is not working. 12/79512/2
authorLim DoHyung <delight.lim@samsung.com>
Mon, 11 Jul 2016 13:57:04 +0000 (06:57 -0700)
committerHye Kyoung Hwang <cookie@samsung.com>
Mon, 11 Jul 2016 13:57:30 +0000 (06:57 -0700)
Revert "Fix for not working history list"

This reverts commit 933348348cf450b45ec957a7ec2c4f6015ea999f.

Change-Id: If467d6539954c042e6d667396a14fd8ada0a7eda

services/SimpleUI/SimpleUI.cpp
services/SimpleUI/SimpleUI.h
services/WebPageUI/URIEntry.cpp
services/WebPageUI/URIEntry.h
services/WebPageUI/UrlHistoryList/UrlHistoryList.cpp
services/WebPageUI/WebPageUI.cpp
services/WebPageUI/WebPageUI.h

index 40b0216fe8f69867228efac9e2c4f7da13747dca..5f770fe2c09bf056b6e764cb755c1ebffb9e7683 100644 (file)
@@ -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()
index 6dd10c697e505746e2fcea7e3b2dbc675e1680a1..9c7ccb690a083d54b8e95e8f7a05d184a1e362a7 100644 (file)
@@ -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();
index d83a07bddae9c10af9d0eca39e2866f4f9faa612..1c8575294a1bd11ce9a3cd9b5a22cfe46bfeaddb 100644 (file)
@@ -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*/)
index 3776e66bed4ef9c8a80827f9cf45841613559508..3684a2b7df1cf85a972d9766314cfdf7fa1f37f0 100644 (file)
@@ -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
index abdf0142e08d51fc49a77ad0f449e16e6f4e06a1..ac28b49c581f425845602670221e6d30c1649936 100644 (file)
@@ -148,8 +148,6 @@ void UrlHistoryList::onItemSelect(std::string content)
     } else {
         uriChanged(content);
     }
-    if (getGenlistVisible())
-        hideWidget();
 }
 
 void UrlHistoryList::onListWidgetFocusChange(bool focused)
index 58b023877a87f289f1cf5d6e3dd74c373c161128..f68a4fd99543b6428659df4e6998ab0b757c5651 100755 (executable)
@@ -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
index e129bebfddee93c7969b380e72596e834d47871f..a189f97c692a2da2f350254ac6e1112fc9a5e5b9 100644 (file)
@@ -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