Loading core/java/android/view/MotionEvent.java +3 −0 Original line number Diff line number Diff line Loading @@ -1550,6 +1550,7 @@ public final class MotionEvent extends InputEvent implements Parcelable { @Override public String toString() { return "MotionEvent{" + Integer.toHexString(System.identityHashCode(this)) + " pointerId=" + getPointerId(0) + " action=" + actionToString(mAction) + " x=" + getX() + " y=" + getY() Loading @@ -1567,6 +1568,8 @@ public final class MotionEvent extends InputEvent implements Parcelable { + " edgeFlags=0x" + Integer.toHexString(mEdgeFlags) + " device=" + mDeviceId + " source=0x" + Integer.toHexString(mSource) + (getPointerCount() > 1 ? " pointerId2=" + getPointerId(1) + " x2=" + getX(2) + " y2=" + getY(2) : "") + "}"; } Loading core/java/android/webkit/WebView.java +14 −0 Original line number Diff line number Diff line Loading @@ -5471,6 +5471,8 @@ public class WebView extends AbsoluteLayout if (shouldForwardTouchEvent()) { TouchEventData ted = new TouchEventData(); ted.mAction = action; ted.mIds = new int[1]; ted.mIds[0] = ev.getPointerId(0); ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(contentX, contentY); ted.mMetaState = ev.getMetaState(); Loading Loading @@ -5513,6 +5515,8 @@ public class WebView extends AbsoluteLayout || eventTime - mLastSentTouchTime > mCurrentTouchInterval)) { TouchEventData ted = new TouchEventData(); ted.mAction = action; ted.mIds = new int[1]; ted.mIds[0] = ev.getPointerId(0); ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(contentX, contentY); ted.mMetaState = ev.getMetaState(); Loading Loading @@ -5682,6 +5686,8 @@ public class WebView extends AbsoluteLayout // pass the touch events from UI thread to WebCore thread if (shouldForwardTouchEvent()) { TouchEventData ted = new TouchEventData(); ted.mIds = new int[1]; ted.mIds[0] = ev.getPointerId(0); ted.mAction = action; ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(contentX, contentY); Loading @@ -5699,6 +5705,8 @@ public class WebView extends AbsoluteLayout mPrivateHandler.removeMessages(SWITCH_TO_LONGPRESS); if (inFullScreenMode() || mDeferTouchProcess) { TouchEventData ted = new TouchEventData(); ted.mIds = new int[1]; ted.mIds[0] = ev.getPointerId(0); ted.mAction = WebViewCore.ACTION_DOUBLETAP; ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(contentX, contentY); Loading Loading @@ -5832,8 +5840,10 @@ public class WebView extends AbsoluteLayout TouchEventData ted = new TouchEventData(); ted.mAction = ev.getAction() & MotionEvent.ACTION_MASK; final int count = ev.getPointerCount(); ted.mIds = new int[count]; ted.mPoints = new Point[count]; for (int c = 0; c < count; c++) { ted.mIds[c] = ev.getPointerId(c); int x = viewToContentX((int) ev.getX(c) + mScrollX); int y = viewToContentY((int) ev.getY(c) + mScrollY); ted.mPoints[c] = new Point(x, y); Loading Loading @@ -5927,6 +5937,8 @@ public class WebView extends AbsoluteLayout mWebViewCore.removeMessages(EventHub.TOUCH_EVENT); } TouchEventData ted = new TouchEventData(); ted.mIds = new int[1]; ted.mIds[0] = 0; ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(x, y); ted.mAction = MotionEvent.ACTION_CANCEL; Loading Loading @@ -7054,6 +7066,8 @@ public class WebView extends AbsoluteLayout if (inFullScreenMode() || mDeferTouchProcess) { TouchEventData ted = new TouchEventData(); ted.mAction = WebViewCore.ACTION_LONGPRESS; ted.mIds = new int[1]; ted.mIds[0] = 0; ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(viewToContentX((int) mLastTouchX + mScrollX), viewToContentY((int) mLastTouchY + mScrollY)); Loading core/java/android/webkit/WebViewCore.java +5 −4 Original line number Diff line number Diff line Loading @@ -562,8 +562,8 @@ final class WebViewCore { private native void nativeTouchUp(int touchGeneration, int framePtr, int nodePtr, int x, int y); private native boolean nativeHandleTouchEvent(int action, int[] x, int[] y, int count, int metaState); private native boolean nativeHandleTouchEvent(int action, int[] idArray, int[] xArray, int[] yArray, int count, int metaState); private native void nativeUpdateFrameCache(); Loading Loading @@ -828,6 +828,7 @@ final class WebViewCore { static class TouchEventData { int mAction; int[] mIds; // Ids of the touch points Point[] mPoints; int mMetaState; boolean mReprocess; Loading Loading @@ -1336,8 +1337,8 @@ final class WebViewCore { mWebView.mPrivateHandler, WebView.PREVENT_TOUCH_ID, ted.mAction, nativeHandleTouchEvent(ted.mAction, xArray, yArray, count, ted.mMetaState) ? 1 : 0, nativeHandleTouchEvent(ted.mAction, ted.mIds, xArray, yArray, count, ted.mMetaState) ? 1 : 0, ted.mReprocess ? ted : null).sendToTarget(); break; } Loading Loading
core/java/android/view/MotionEvent.java +3 −0 Original line number Diff line number Diff line Loading @@ -1550,6 +1550,7 @@ public final class MotionEvent extends InputEvent implements Parcelable { @Override public String toString() { return "MotionEvent{" + Integer.toHexString(System.identityHashCode(this)) + " pointerId=" + getPointerId(0) + " action=" + actionToString(mAction) + " x=" + getX() + " y=" + getY() Loading @@ -1567,6 +1568,8 @@ public final class MotionEvent extends InputEvent implements Parcelable { + " edgeFlags=0x" + Integer.toHexString(mEdgeFlags) + " device=" + mDeviceId + " source=0x" + Integer.toHexString(mSource) + (getPointerCount() > 1 ? " pointerId2=" + getPointerId(1) + " x2=" + getX(2) + " y2=" + getY(2) : "") + "}"; } Loading
core/java/android/webkit/WebView.java +14 −0 Original line number Diff line number Diff line Loading @@ -5471,6 +5471,8 @@ public class WebView extends AbsoluteLayout if (shouldForwardTouchEvent()) { TouchEventData ted = new TouchEventData(); ted.mAction = action; ted.mIds = new int[1]; ted.mIds[0] = ev.getPointerId(0); ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(contentX, contentY); ted.mMetaState = ev.getMetaState(); Loading Loading @@ -5513,6 +5515,8 @@ public class WebView extends AbsoluteLayout || eventTime - mLastSentTouchTime > mCurrentTouchInterval)) { TouchEventData ted = new TouchEventData(); ted.mAction = action; ted.mIds = new int[1]; ted.mIds[0] = ev.getPointerId(0); ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(contentX, contentY); ted.mMetaState = ev.getMetaState(); Loading Loading @@ -5682,6 +5686,8 @@ public class WebView extends AbsoluteLayout // pass the touch events from UI thread to WebCore thread if (shouldForwardTouchEvent()) { TouchEventData ted = new TouchEventData(); ted.mIds = new int[1]; ted.mIds[0] = ev.getPointerId(0); ted.mAction = action; ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(contentX, contentY); Loading @@ -5699,6 +5705,8 @@ public class WebView extends AbsoluteLayout mPrivateHandler.removeMessages(SWITCH_TO_LONGPRESS); if (inFullScreenMode() || mDeferTouchProcess) { TouchEventData ted = new TouchEventData(); ted.mIds = new int[1]; ted.mIds[0] = ev.getPointerId(0); ted.mAction = WebViewCore.ACTION_DOUBLETAP; ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(contentX, contentY); Loading Loading @@ -5832,8 +5840,10 @@ public class WebView extends AbsoluteLayout TouchEventData ted = new TouchEventData(); ted.mAction = ev.getAction() & MotionEvent.ACTION_MASK; final int count = ev.getPointerCount(); ted.mIds = new int[count]; ted.mPoints = new Point[count]; for (int c = 0; c < count; c++) { ted.mIds[c] = ev.getPointerId(c); int x = viewToContentX((int) ev.getX(c) + mScrollX); int y = viewToContentY((int) ev.getY(c) + mScrollY); ted.mPoints[c] = new Point(x, y); Loading Loading @@ -5927,6 +5937,8 @@ public class WebView extends AbsoluteLayout mWebViewCore.removeMessages(EventHub.TOUCH_EVENT); } TouchEventData ted = new TouchEventData(); ted.mIds = new int[1]; ted.mIds[0] = 0; ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(x, y); ted.mAction = MotionEvent.ACTION_CANCEL; Loading Loading @@ -7054,6 +7066,8 @@ public class WebView extends AbsoluteLayout if (inFullScreenMode() || mDeferTouchProcess) { TouchEventData ted = new TouchEventData(); ted.mAction = WebViewCore.ACTION_LONGPRESS; ted.mIds = new int[1]; ted.mIds[0] = 0; ted.mPoints = new Point[1]; ted.mPoints[0] = new Point(viewToContentX((int) mLastTouchX + mScrollX), viewToContentY((int) mLastTouchY + mScrollY)); Loading
core/java/android/webkit/WebViewCore.java +5 −4 Original line number Diff line number Diff line Loading @@ -562,8 +562,8 @@ final class WebViewCore { private native void nativeTouchUp(int touchGeneration, int framePtr, int nodePtr, int x, int y); private native boolean nativeHandleTouchEvent(int action, int[] x, int[] y, int count, int metaState); private native boolean nativeHandleTouchEvent(int action, int[] idArray, int[] xArray, int[] yArray, int count, int metaState); private native void nativeUpdateFrameCache(); Loading Loading @@ -828,6 +828,7 @@ final class WebViewCore { static class TouchEventData { int mAction; int[] mIds; // Ids of the touch points Point[] mPoints; int mMetaState; boolean mReprocess; Loading Loading @@ -1336,8 +1337,8 @@ final class WebViewCore { mWebView.mPrivateHandler, WebView.PREVENT_TOUCH_ID, ted.mAction, nativeHandleTouchEvent(ted.mAction, xArray, yArray, count, ted.mMetaState) ? 1 : 0, nativeHandleTouchEvent(ted.mAction, ted.mIds, xArray, yArray, count, ted.mMetaState) ? 1 : 0, ted.mReprocess ? ted : null).sendToTarget(); break; } Loading