summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-02-02 19:08:37 -0800
committerGrace Kloba <klobag@google.com>2010-02-03 09:45:07 -0800
commit22c64e5cc7b7c54cea1cf6cb3bb1021f072e365c (patch)
treed556cec3ecc5cbbde2ada12a9d5100d4c73d7d62 /WebKit/android/jni
parent52d25f0b47a8bb2c38de3a8429316221f742b8f9 (diff)
downloadexternal_webkit-22c64e5cc7b7c54cea1cf6cb3bb1021f072e365c.zip
external_webkit-22c64e5cc7b7c54cea1cf6cb3bb1021f072e365c.tar.gz
external_webkit-22c64e5cc7b7c54cea1cf6cb3bb1021f072e365c.tar.bz2
Pass touch event time from Java to WebKit
merge from https://android-git.corp.google.com/g/#change,39356
Diffstat (limited to 'WebKit/android/jni')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp10
-rw-r--r--WebKit/android/jni/WebViewCore.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 2ba29b9..8d8ebb9 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -1929,7 +1929,7 @@ void WebViewCore::click(WebCore::Frame* frame, WebCore::Node* node) {
}
}
-int WebViewCore::handleTouchEvent(int action, int x, int y)
+int WebViewCore::handleTouchEvent(int action, int x, int y, long time)
{
int preventDefault = 0;
@@ -1984,7 +1984,7 @@ int WebViewCore::handleTouchEvent(int action, int x, int y)
m_lastTouchPoint = pt;
- WebCore::PlatformTouchEvent te(pt, type, touchState);
+ WebCore::PlatformTouchEvent te(pt, type, touchState, time);
preventDefault = m_mainFrame->eventHandler()->handleTouchEvent(te);
#endif
@@ -2677,14 +2677,14 @@ static jstring FindAddress(JNIEnv *env, jobject obj, jstring addr,
return ret;
}
-static jint HandleTouchEvent(JNIEnv *env, jobject obj, jint action, jint x, jint y)
+static jint HandleTouchEvent(JNIEnv *env, jobject obj, jint action, jint x, jint y, jlong time)
{
#ifdef ANDROID_INSTRUMENT
TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
- return viewImpl->handleTouchEvent(action, x, y);
+ return viewImpl->handleTouchEvent(action, x, y, time);
}
static void TouchUp(JNIEnv *env, jobject obj, jint touchGeneration,
@@ -3087,7 +3087,7 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = {
(void*) SaveDocumentState },
{ "nativeFindAddress", "(Ljava/lang/String;Z)Ljava/lang/String;",
(void*) FindAddress },
- { "nativeHandleTouchEvent", "(III)I",
+ { "nativeHandleTouchEvent", "(IIIJ)I",
(void*) HandleTouchEvent },
{ "nativeTouchUp", "(IIIII)V",
(void*) TouchUp },
diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h
index 2252878..58cb7df 100644
--- a/WebKit/android/jni/WebViewCore.h
+++ b/WebKit/android/jni/WebViewCore.h
@@ -282,7 +282,7 @@ namespace android {
/**
* Handle touch event
*/
- int handleTouchEvent(int action, int x, int y);
+ int handleTouchEvent(int action, int x, int y, long time);
/**
* Handle motionUp event from the UI thread (called touchUp in the