Loading core/java/android/webkit/WebView.java +20 −3 Original line number Original line Diff line number Diff line Loading @@ -4380,15 +4380,20 @@ public class WebView extends AbsoluteLayout } } WebViewCore.CursorData cursorData() { WebViewCore.CursorData cursorData() { WebViewCore.CursorData result = new WebViewCore.CursorData(); WebViewCore.CursorData result = cursorDataNoPosition(); result.mMoveGeneration = nativeMoveGeneration(); result.mFrame = nativeCursorFramePointer(); Point position = nativeCursorPosition(); Point position = nativeCursorPosition(); result.mX = position.x; result.mX = position.x; result.mY = position.y; result.mY = position.y; return result; return result; } } WebViewCore.CursorData cursorDataNoPosition() { WebViewCore.CursorData result = new WebViewCore.CursorData(); result.mMoveGeneration = nativeMoveGeneration(); result.mFrame = nativeCursorFramePointer(); return result; } /** /** * Delete text from start to end in the focused textfield. If there is no * Delete text from start to end in the focused textfield. If there is no * focus, or if start == end, silently fail. If start and end are out of * focus, or if start == end, silently fail. If start and end are out of Loading Loading @@ -5587,6 +5592,18 @@ public class WebView extends AbsoluteLayout // density of the screen. // density of the screen. private static final int DRAG_LAYER_FINGER_DISTANCE = 20000; private static final int DRAG_LAYER_FINGER_DISTANCE = 20000; @Override public boolean onHoverEvent(MotionEvent event) { if (mNativeClass == 0) { return false; } WebViewCore.CursorData data = cursorDataNoPosition(); data.mX = viewToContentX((int) event.getX()); data.mY = viewToContentY((int) event.getY()); mWebViewCore.sendMessage(EventHub.SET_MOVE_MOUSE, data); return true; } @Override @Override public boolean onTouchEvent(MotionEvent ev) { public boolean onTouchEvent(MotionEvent ev) { if (mNativeClass == 0 || (!isClickable() && !isLongClickable())) { if (mNativeClass == 0 || (!isClickable() && !isLongClickable())) { Loading Loading
core/java/android/webkit/WebView.java +20 −3 Original line number Original line Diff line number Diff line Loading @@ -4380,15 +4380,20 @@ public class WebView extends AbsoluteLayout } } WebViewCore.CursorData cursorData() { WebViewCore.CursorData cursorData() { WebViewCore.CursorData result = new WebViewCore.CursorData(); WebViewCore.CursorData result = cursorDataNoPosition(); result.mMoveGeneration = nativeMoveGeneration(); result.mFrame = nativeCursorFramePointer(); Point position = nativeCursorPosition(); Point position = nativeCursorPosition(); result.mX = position.x; result.mX = position.x; result.mY = position.y; result.mY = position.y; return result; return result; } } WebViewCore.CursorData cursorDataNoPosition() { WebViewCore.CursorData result = new WebViewCore.CursorData(); result.mMoveGeneration = nativeMoveGeneration(); result.mFrame = nativeCursorFramePointer(); return result; } /** /** * Delete text from start to end in the focused textfield. If there is no * Delete text from start to end in the focused textfield. If there is no * focus, or if start == end, silently fail. If start and end are out of * focus, or if start == end, silently fail. If start and end are out of Loading Loading @@ -5587,6 +5592,18 @@ public class WebView extends AbsoluteLayout // density of the screen. // density of the screen. private static final int DRAG_LAYER_FINGER_DISTANCE = 20000; private static final int DRAG_LAYER_FINGER_DISTANCE = 20000; @Override public boolean onHoverEvent(MotionEvent event) { if (mNativeClass == 0) { return false; } WebViewCore.CursorData data = cursorDataNoPosition(); data.mX = viewToContentX((int) event.getX()); data.mY = viewToContentY((int) event.getY()); mWebViewCore.sendMessage(EventHub.SET_MOVE_MOUSE, data); return true; } @Override @Override public boolean onTouchEvent(MotionEvent ev) { public boolean onTouchEvent(MotionEvent ev) { if (mNativeClass == 0 || (!isClickable() && !isLongClickable())) { if (mNativeClass == 0 || (!isClickable() && !isLongClickable())) { Loading