Find on page does not hide on fullscreen 58/91558/2
authorKamil Nowac <k.nowac@samsung.com>
Mon, 10 Oct 2016 07:37:59 +0000 (09:37 +0200)
committerKamil Nowac <k.nowac@samsung.com>
Tue, 11 Oct 2016 09:34:17 +0000 (11:34 +0200)
[Issue]    http://suprem.sec.samsung.net/jira/browse/TWF-2257
[Problem]  As in the title
[Solution] Added signal
[Verify]   - Open youtube.com. open find on page. go to fullscreen
           in portrait mode. rotate while in fullscreen to
           landscape mode.
           find on page should not be visible.
           - turn off fullscreen mode
           find on page should be visible

Change-Id: I0d300dada3806ed1568277dc56de314d5e4ed846

services/SimpleUI/SimpleUI.cpp
services/WebPageUI/WebPageUI.cpp
services/WebPageUI/WebPageUI.h

index 2a2bb64..b83e559 100755 (executable)
@@ -581,6 +581,7 @@ void SimpleUI::connectModelSignals()
     m_webEngine->uriChanged.connect(boost::bind(&SimpleUI::webEngineURLChanged, this, _1));
     m_webEngine->confirmationRequest.connect(boost::bind(&SimpleUI::handleConfirmationRequest, this, _1));
     m_webEngine->getRotation.connect(boost::bind(&SimpleUI::getRotation, this));
+    m_webPageUI->isFindOnPageVisible.connect(boost::bind(&FindOnPageUI::isVisible, m_findOnPageUI.get()));
     m_webEngine->openFindOnPage.connect(boost::bind(&SimpleUI::showFindOnPageUI, this, _1));
     m_webEngine->closeFindOnPage.connect(boost::bind(&SimpleUI::closeFindOnPageUI, this));
     m_webEngine->unsecureConnection.connect(boost::bind(&SimpleUI::showUnsecureConnectionPopup, this));
index c2b4f98..f024842 100755 (executable)
@@ -434,13 +434,18 @@ void WebPageUI::fullscreenModeSet(bool state)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     auto landscape = isLandscape();
+    auto findonpage = isFindOnPageVisible();
     m_fullscreen = state;
-    if (!state)
+    if (!state) {
         elm_object_signal_emit(m_mainLayout, "show_uri_bar", "ui");
-    else if (landscape && state) {
+        if (findonpage && *findonpage)
+            elm_object_signal_emit(m_mainLayout, "show_findonpage", "ui");
+    } else if (landscape && state) {
         (*landscape) ?
             elm_object_signal_emit(m_mainLayout, "hide_uri_bar_landscape", "ui") :
             elm_object_signal_emit(m_mainLayout, "hide_uri_bar_vertical", "ui");
+        if (findonpage && *findonpage)
+            hideFindOnPage();
     }
 }
 #endif
index 459879d..89a6b1e 100755 (executable)
@@ -110,6 +110,7 @@ public:
     boost::signals2::signal<void ()> updateManualRotation;
     boost::signals2::signal<void ()> hideMoreMenu;
     boost::signals2::signal<void ()> qaOrientationChanged;
+    boost::signals2::signal<bool ()> isFindOnPageVisible;
 #else
     boost::signals2::signal<void ()> showZoomNavigation;
 #endif