Improve scrolling smoothness of URL bar 81/142081/4
authorSanghyup Lee <sh53.lee@samsung.com>
Wed, 9 Aug 2017 08:59:35 +0000 (17:59 +0900)
committerSanghyup Lee <sh53.lee@samsung.com>
Wed, 9 Aug 2017 09:00:03 +0000 (18:00 +0900)
[Problem] When we scroll web page, motion of URL bar is not smooth.
[Cause] Odd offset of top controls is skipped in |WebPageUI::urlbarOffsetSet|.
[Solution] Remove unneeded condition.

Change-Id: I9203247113630ebc7c76326bcfe639567851ea51
Signed-off-by: Sanghyup Lee <sh53.lee@samsung.com>
services/WebPageUI/WebPageUI.cpp

index daeaba8..4c2f27c 100755 (executable)
@@ -600,8 +600,7 @@ void WebPageUI::urlbarOffsetSet(const float& offset)
     BROWSER_LOGD("[%s:%d] %f", __PRETTY_FUNCTION__, __LINE__, offset);
     Edje_Message_Int message;
     message.val = static_cast<int>(offset);
-    if (message.val % 2 == 0)
-        edje_object_message_send(elm_layout_edje_get(m_mainLayout), EDJE_MESSAGE_INT, 0, &message);
+    edje_object_message_send(elm_layout_edje_get(m_mainLayout), EDJE_MESSAGE_INT, 0, &message);
 }
 
 void WebPageUI::bottombarOffsetSet(const float& offset)
@@ -610,10 +609,8 @@ void WebPageUI::bottombarOffsetSet(const float& offset)
     Edje_Message_Int message;
     message.val = static_cast<int>(offset);
     auto edje = elm_layout_edje_get(m_mainLayout);
-    if (message.val % 2 == 0) {
-        edje_object_message_send(edje, EDJE_MESSAGE_INT, 1, &message);
-        edje_object_message_signal_process(edje);
-    }
+    edje_object_message_send(edje, EDJE_MESSAGE_INT, 1, &message);
+    edje_object_message_signal_process(edje);
 }
 
 bool WebPageUI::isBrighterThanDefault(const int& r, const int& g, const int& b)