Loading core/java/android/webkit/WebView.java +3 −11 Original line number Diff line number Diff line Loading @@ -6625,15 +6625,10 @@ public class WebView extends AbsoluteLayout * @param y New y position of the WebTextView in view coordinates */ /* package */ void scrollFocusedTextInputY(int y) { if (!inEditingMode()) { if (!inEditingMode() || mWebViewCore == null) { return; } int xPos = viewToContentX((mWebTextView.getLeft() + mWebTextView.getRight()) / 2); int yPos = viewToContentY((mWebTextView.getTop() + mWebTextView.getBottom()) / 2); int layer = nativeScrollableLayer(xPos, yPos, null, null); if (layer != 0) { nativeScrollLayer(layer, 0, viewToContentDimension(y)); } mWebViewCore.sendMessage(EventHub.SCROLL_TEXT_INPUT, 0, viewToContentDimension(y)); } /** Loading Loading @@ -7980,18 +7975,15 @@ public class WebView extends AbsoluteLayout * @param node Pointer to the node touched. * @param x x-position of the touch. * @param y y-position of the touch. * @param scrollY Only used when touching on a textarea. Otherwise, use -1. * Tells how much the textarea is scrolled. */ private void sendMotionUp(int touchGeneration, int frame, int node, int x, int y, int scrollY) { int frame, int node, int x, int y) { WebViewCore.TouchUpData touchUpData = new WebViewCore.TouchUpData(); touchUpData.mMoveGeneration = touchGeneration; touchUpData.mFrame = frame; touchUpData.mNode = node; touchUpData.mX = x; touchUpData.mY = y; touchUpData.mScrollY = scrollY; mWebViewCore.sendMessage(EventHub.TOUCH_UP, touchUpData); } Loading core/java/android/webkit/WebViewCore.java +9 −7 Original line number Diff line number Diff line Loading @@ -559,7 +559,7 @@ final class WebViewCore { private native String nativeRetrieveImageSource(int x, int y); private native void nativeTouchUp(int touchGeneration, int framePtr, int nodePtr, int x, int y, int scrollY); int framePtr, int nodePtr, int x, int y); private native boolean nativeHandleTouchEvent(int action, int[] idArray, int[] xArray, int[] yArray, int count, int metaState); Loading Loading @@ -777,8 +777,6 @@ final class WebViewCore { int mNode; int mX; int mY; // Used in the case of a scrolled textarea int mScrollY; } static class TouchHighlightData { Loading Loading @@ -1086,8 +1084,13 @@ final class WebViewCore { break; case SCROLL_TEXT_INPUT: nativeScrollFocusedTextInput( ((Float) msg.obj).floatValue(), msg.arg1); float xPercent; if (msg.obj == null) { xPercent = 0f; } else { xPercent = ((Float) msg.obj).floatValue(); } nativeScrollFocusedTextInput(xPercent, msg.arg2); break; case LOAD_URL: { Loading Loading @@ -1307,8 +1310,7 @@ final class WebViewCore { TouchUpData touchUpData = (TouchUpData) msg.obj; nativeTouchUp(touchUpData.mMoveGeneration, touchUpData.mFrame, touchUpData.mNode, touchUpData.mX, touchUpData.mY, touchUpData.mScrollY); touchUpData.mX, touchUpData.mY); break; case TOUCH_EVENT: { Loading Loading
core/java/android/webkit/WebView.java +3 −11 Original line number Diff line number Diff line Loading @@ -6625,15 +6625,10 @@ public class WebView extends AbsoluteLayout * @param y New y position of the WebTextView in view coordinates */ /* package */ void scrollFocusedTextInputY(int y) { if (!inEditingMode()) { if (!inEditingMode() || mWebViewCore == null) { return; } int xPos = viewToContentX((mWebTextView.getLeft() + mWebTextView.getRight()) / 2); int yPos = viewToContentY((mWebTextView.getTop() + mWebTextView.getBottom()) / 2); int layer = nativeScrollableLayer(xPos, yPos, null, null); if (layer != 0) { nativeScrollLayer(layer, 0, viewToContentDimension(y)); } mWebViewCore.sendMessage(EventHub.SCROLL_TEXT_INPUT, 0, viewToContentDimension(y)); } /** Loading Loading @@ -7980,18 +7975,15 @@ public class WebView extends AbsoluteLayout * @param node Pointer to the node touched. * @param x x-position of the touch. * @param y y-position of the touch. * @param scrollY Only used when touching on a textarea. Otherwise, use -1. * Tells how much the textarea is scrolled. */ private void sendMotionUp(int touchGeneration, int frame, int node, int x, int y, int scrollY) { int frame, int node, int x, int y) { WebViewCore.TouchUpData touchUpData = new WebViewCore.TouchUpData(); touchUpData.mMoveGeneration = touchGeneration; touchUpData.mFrame = frame; touchUpData.mNode = node; touchUpData.mX = x; touchUpData.mY = y; touchUpData.mScrollY = scrollY; mWebViewCore.sendMessage(EventHub.TOUCH_UP, touchUpData); } Loading
core/java/android/webkit/WebViewCore.java +9 −7 Original line number Diff line number Diff line Loading @@ -559,7 +559,7 @@ final class WebViewCore { private native String nativeRetrieveImageSource(int x, int y); private native void nativeTouchUp(int touchGeneration, int framePtr, int nodePtr, int x, int y, int scrollY); int framePtr, int nodePtr, int x, int y); private native boolean nativeHandleTouchEvent(int action, int[] idArray, int[] xArray, int[] yArray, int count, int metaState); Loading Loading @@ -777,8 +777,6 @@ final class WebViewCore { int mNode; int mX; int mY; // Used in the case of a scrolled textarea int mScrollY; } static class TouchHighlightData { Loading Loading @@ -1086,8 +1084,13 @@ final class WebViewCore { break; case SCROLL_TEXT_INPUT: nativeScrollFocusedTextInput( ((Float) msg.obj).floatValue(), msg.arg1); float xPercent; if (msg.obj == null) { xPercent = 0f; } else { xPercent = ((Float) msg.obj).floatValue(); } nativeScrollFocusedTextInput(xPercent, msg.arg2); break; case LOAD_URL: { Loading Loading @@ -1307,8 +1310,7 @@ final class WebViewCore { TouchUpData touchUpData = (TouchUpData) msg.obj; nativeTouchUp(touchUpData.mMoveGeneration, touchUpData.mFrame, touchUpData.mNode, touchUpData.mX, touchUpData.mY, touchUpData.mScrollY); touchUpData.mX, touchUpData.mY); break; case TOUCH_EVENT: { Loading