From 2f2fea028a346bdd07058cd740d0816f3662714f Mon Sep 17 00:00:00 2001 From: Yunchan Cho Date: Wed, 25 Sep 2013 11:19:18 +0900 Subject: Fix an issue that PD scrolling doesn't work so well [Issue#] P130919-00809 [Problem] Scrolling in PD doesn't work well [Cause] WebKit decides scrolling operation after calculating timestamp of touch events, but timestamp format sent by Home is different to the format used by WebKit. which led the WebKit calculation incorrect, causing scrolling doesn't work well. [Solution] web-provider creates timestamp that can be used by WebKit, and then sends it to WebKit using evas_event_feed function. Change-Id: Id16d062c8a4be617aed5e1f5fec32121ffd977b4 --- src/Core/Buffer/PdRenderBuffer.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Core/Buffer/PdRenderBuffer.cpp b/src/Core/Buffer/PdRenderBuffer.cpp index 917786d..af65e08 100644 --- a/src/Core/Buffer/PdRenderBuffer.cpp +++ b/src/Core/Buffer/PdRenderBuffer.cpp @@ -18,6 +18,7 @@ * @author Yunchan Cho (yunchan.cho@samsung.com) */ #include +#include #include #include #include @@ -102,17 +103,20 @@ int PdRenderBuffer::handleTouchEventCallback( void PdRenderBuffer::didHandleTouchEvent( TouchType type, double timestamp, double x, double y) { - LogD("enter"); + // timestamp format sent by viewer is not same to the timestamp format used by webkit-efl + // so web-provider should get timestamp using ecore_time_get() + // and then feed event with the timestamp to webkit + switch (type) { case TOUCH_EVENT_MOVE: LogD("move event"); evas_event_feed_mouse_move( - getCanvas(), x * m_width, y * m_height, timestamp, NULL); + getCanvas(), x * m_width, y * m_height, ecore_time_get() * 1000, NULL); break; case TOUCH_EVENT_DOWN: LogD("down event"); evas_event_feed_mouse_move( - getCanvas(), x * m_width, y * m_height, timestamp, NULL); + getCanvas(), x * m_width, y * m_height, ecore_time_get() * 1000, NULL); evas_event_feed_mouse_down( getCanvas(), 1, EVAS_BUTTON_NONE, 0, NULL); break; -- cgit v1.2.3