am 4ed2b1c3
: Pass touch event time from Java to WebKit
Merge commit '4ed2b1c34b2dd0e2bd2f403a6f3de0bdbf473b98' into eclair-mr2-plus-aosp * commit '4ed2b1c34b2dd0e2bd2f403a6f3de0bdbf473b98': Pass touch event time from Java to WebKit
This commit is contained in:
@ -4144,6 +4144,7 @@ public class WebView extends AbsoluteLayout
|
||||
ted.mAction = action;
|
||||
ted.mX = viewToContentX((int) x + mScrollX);
|
||||
ted.mY = viewToContentY((int) y + mScrollY);
|
||||
ted.mEventTime = eventTime;
|
||||
mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
|
||||
mLastSentTouchTime = eventTime;
|
||||
}
|
||||
@ -4415,6 +4416,7 @@ public class WebView extends AbsoluteLayout
|
||||
ted.mAction = WebViewCore.ACTION_DOUBLETAP;
|
||||
ted.mX = viewToContentX((int) x + mScrollX);
|
||||
ted.mY = viewToContentY((int) y + mScrollY);
|
||||
ted.mEventTime = eventTime;
|
||||
mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
|
||||
} else if (mFullScreenHolder == null) {
|
||||
doDoubleTap();
|
||||
@ -5430,6 +5432,7 @@ public class WebView extends AbsoluteLayout
|
||||
ted.mAction = WebViewCore.ACTION_LONGPRESS;
|
||||
ted.mX = viewToContentX((int) mLastTouchX + mScrollX);
|
||||
ted.mY = viewToContentY((int) mLastTouchY + mScrollY);
|
||||
ted.mEventTime = SystemClock.uptimeMillis();
|
||||
mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
|
||||
} else if (mPreventDrag == PREVENT_DRAG_NO) {
|
||||
mTouchMode = TOUCH_DONE_MODE;
|
||||
|
@ -512,7 +512,7 @@ final class WebViewCore {
|
||||
private native void nativeTouchUp(int touchGeneration,
|
||||
int framePtr, int nodePtr, int x, int y);
|
||||
|
||||
private native int nativeHandleTouchEvent(int action, int x, int y);
|
||||
private native int nativeHandleTouchEvent(int action, int x, int y, long time);
|
||||
|
||||
private native void nativeUpdateFrameCache();
|
||||
|
||||
@ -726,6 +726,7 @@ final class WebViewCore {
|
||||
int mAction;
|
||||
int mX;
|
||||
int mY;
|
||||
long mEventTime;
|
||||
}
|
||||
|
||||
static class GeolocationPermissionsData {
|
||||
@ -1168,7 +1169,7 @@ final class WebViewCore {
|
||||
mWebView.mPrivateHandler,
|
||||
WebView.PREVENT_TOUCH_ID, ted.mAction,
|
||||
nativeHandleTouchEvent(ted.mAction, ted.mX,
|
||||
ted.mY)).sendToTarget();
|
||||
ted.mY, ted.mEventTime)).sendToTarget();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user