Fixed problem that scrollbar blink in NPRuntime
authorbunam.jeon <bunam.jeon@samsung.com>
Mon, 14 Oct 2013 07:10:39 +0000 (16:10 +0900)
committerbunam.jeon <bunam.jeon@samsung.com>
Mon, 14 Oct 2013 07:10:39 +0000 (16:10 +0900)
[Title]    Fixed problem that scrollbar blink in NPRuntime
[Issue#]   N_SE-55128
[Problem]  Scrollbar blinks for a while when pressing on number keypad in NPRuntime
[Cause]    scroll position is different when input field zoom and pressing on number keypad.
[Solution] Rounded up to scroll position when input field zoom.

Change-Id: I781b8efacdf1ea06fab1da8788ceca3982c1bc6c

Source/WebKit2/UIProcess/API/efl/tizen/InputFieldZoom.cpp

index fce8f6d..f5d3beb 100755 (executable)
@@ -134,7 +134,7 @@ bool InputFieldZoom::process()
     rect.setHeight(m_baseRect.height() + (m_targetRect.height() - m_baseRect.height()) * multiplier);
 
     float scaleFactor = m_viewImpl->page()->viewSize().width() / rect.width();
-    IntPoint scrollPosition(rect.x() * scaleFactor, rect.y() * scaleFactor);
+    IntPoint scrollPosition(ceil(rect.x() * scaleFactor), ceil(rect.y() * scaleFactor));
     m_viewImpl->page()->scaleImage(scaleFactor, scrollPosition);
 
     if (m_scaleIndex < 0)
@@ -157,7 +157,7 @@ void InputFieldZoom::stop()
     EINA_SAFETY_ON_NULL_RETURN(m_viewImpl->page());
 
     float scaleFactor = m_viewImpl->page()->viewSize().width() / m_targetRect.width();
-    IntPoint scrollPosition(m_targetRect.x() * scaleFactor, m_targetRect.y() * scaleFactor);
+    IntPoint scrollPosition(ceil(m_targetRect.x() * scaleFactor), ceil(m_targetRect.y() * scaleFactor));
     m_viewImpl->page()->scale(scaleFactor, scrollPosition);
     m_isWorking = false;
 }