summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunchan Cho <yunchan.cho@samsung.com>2013-09-25 11:19:18 +0900
committerSoo-Hyun Choi <sh9.choi@samsung.com>2013-09-25 14:47:58 +0900
commit2f2fea028a346bdd07058cd740d0816f3662714f (patch)
tree2243c2e2bc3b8874e31de955d89b7c0cd420edc7
parent0ad76ac6c7fb8735d07b14f4a576d44a9c914710 (diff)
downloadweb-provider-2f2fea028a346bdd07058cd740d0816f3662714f.tar.gz
web-provider-2f2fea028a346bdd07058cd740d0816f3662714f.tar.bz2
web-provider-2f2fea028a346bdd07058cd740d0816f3662714f.zip
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
-rw-r--r--src/Core/Buffer/PdRenderBuffer.cpp10
1 files 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 <string>
+#include <Ecore.h>
#include <Evas.h>
#include <provider.h>
#include <provider_buffer.h>
@@ -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;