summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android/jni/WebViewCore.cpp')
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp31
1 files changed, 5 insertions, 26 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index d8e2a0b..966a540 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -3102,7 +3102,7 @@ GraphicsLayerAndroid* WebViewCore::graphicsRootLayer() const
}
#endif
-bool WebViewCore::handleTouchEvent(int action, long eventTimeInMs, Vector<int>& ids, Vector<IntPoint>& points, Vector<float>& pressures, Vector<int>& touchMajor, Vector<int>& touchMinor, Vector<float>& orientation, int actionIndex, int metaState)
+bool WebViewCore::handleTouchEvent(int action, Vector<int>& ids, Vector<IntPoint>& points, int actionIndex, int metaState)
{
bool preventDefault = false;
@@ -3175,9 +3175,6 @@ bool WebViewCore::handleTouchEvent(int action, long eventTimeInMs, Vector<int>&
};
}
- // TODO: use the pressure, size and timestamp data once WebKit is synced to
- // the upstream version that has the fields for these data in Touch.h and
- // PlatformTouchPoint.h.
WebCore::PlatformTouchEvent te(ids, points, type, touchStates, metaState);
preventDefault = m_mainFrame->eventHandler()->handleTouchEvent(te);
#endif
@@ -4173,10 +4170,8 @@ static jstring FindAddress(JNIEnv *env, jobject obj, jstring addr,
return ret;
}
-static jboolean HandleTouchEvent(JNIEnv *env, jobject obj, jint action, jlong eventTimeInMs,
- jintArray idArray, jintArray xArray, jintArray yArray,
- jfloatArray pressureArray, jintArray touchMajorArray,
- jintArray touchMinorArray, jfloatArray orientationArray,
+static jboolean HandleTouchEvent(JNIEnv *env, jobject obj, jint action, jintArray idArray,
+ jintArray xArray, jintArray yArray,
jint count, jint actionIndex, jint metaState)
{
#ifdef ANDROID_INSTRUMENT
@@ -4187,34 +4182,18 @@ static jboolean HandleTouchEvent(JNIEnv *env, jobject obj, jint action, jlong ev
jint* ptrIdArray = env->GetIntArrayElements(idArray, 0);
jint* ptrXArray = env->GetIntArrayElements(xArray, 0);
jint* ptrYArray = env->GetIntArrayElements(yArray, 0);
- jfloat* ptrPressureArray = env->GetFloatArrayElements(pressureArray, 0);
- jint* ptrTouchMajorArray = env->GetIntArrayElements(touchMajorArray, 0);
- jint* ptrTouchMinorArray = env->GetIntArrayElements(touchMinorArray, 0);
- jfloat* ptrOrientationArray = env->GetFloatArrayElements(orientationArray, 0);
Vector<int> ids(count);
Vector<IntPoint> points(count);
- Vector<float> pressures(count);
- Vector<int> touchMajor(count);
- Vector<int> touchMinor(count);
- Vector<float> orientation(count);
for (int c = 0; c < count; c++) {
ids[c] = ptrIdArray[c];
points[c].setX(ptrXArray[c]);
points[c].setY(ptrYArray[c]);
- pressures[c] = ptrPressureArray[c];
- touchMajor[c] = ptrTouchMajorArray[c];
- touchMinor[c] = ptrTouchMinorArray[c];
- orientation[c] = ptrOrientationArray[c];
}
env->ReleaseIntArrayElements(idArray, ptrIdArray, JNI_ABORT);
env->ReleaseIntArrayElements(xArray, ptrXArray, JNI_ABORT);
env->ReleaseIntArrayElements(yArray, ptrYArray, JNI_ABORT);
- env->ReleaseFloatArrayElements(pressureArray, ptrPressureArray, JNI_ABORT);
- env->ReleaseIntArrayElements(touchMajorArray, ptrTouchMajorArray, JNI_ABORT);
- env->ReleaseIntArrayElements(touchMinorArray, ptrTouchMinorArray, JNI_ABORT);
- env->ReleaseFloatArrayElements(orientationArray, ptrOrientationArray, JNI_ABORT);
- return viewImpl->handleTouchEvent(action, eventTimeInMs, ids, points, pressures, touchMajor, touchMinor, orientation, actionIndex, metaState);
+ return viewImpl->handleTouchEvent(action, ids, points, actionIndex, metaState);
}
static void TouchUp(JNIEnv *env, jobject obj, jint touchGeneration,
@@ -4650,7 +4629,7 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = {
(void*) SaveDocumentState },
{ "nativeFindAddress", "(Ljava/lang/String;Z)Ljava/lang/String;",
(void*) FindAddress },
- { "nativeHandleTouchEvent", "(IJ[I[I[I[F[I[I[FIII)Z",
+ { "nativeHandleTouchEvent", "(I[I[I[IIII)Z",
(void*) HandleTouchEvent },
{ "nativeTouchUp", "(IIIII)V",
(void*) TouchUp },