Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1059)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 22613004: [android_webivew] Implement flingScroll, pageUp, pageDown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index b6e5580acc22588c3b1a8c5aa8532c54bf127cb1..7a932889f1531f9015b37cda73bb28bcc11a2da1 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -1202,18 +1202,6 @@ import java.util.Map;
// End FrameLayout overrides.
/**
- * @see {@link android.webkit.WebView#flingScroll(int, int)}
- */
- public void flingScroll(int vx, int vy) {
- // Notes:
- // (1) Use large negative values for the x/y parameters so we don't accidentally scroll a
- // nested frame.
- // (2) vx and vy are inverted to match WebView behavior.
- mContentViewGestureHandler.fling(
- System.currentTimeMillis(), -Integer.MAX_VALUE, -Integer.MIN_VALUE, -vx, -vy);
- }
-
- /**
* @see View#onTouchEvent(MotionEvent)
*/
public boolean onTouchEvent(MotionEvent event) {
@@ -2897,43 +2885,6 @@ import java.util.Map;
}
/**
- * @See android.webkit.WebView#pageDown(boolean)
- */
- public boolean pageDown(boolean bottom) {
- final int maxVerticalScrollPix = mRenderCoordinates.getMaxVerticalScrollPixInt();
- if (computeVerticalScrollOffset() >= maxVerticalScrollPix) {
- // We seem to already be at the bottom of the page, so no scrolling will occur.
- return false;
- }
-
- if (bottom) {
- scrollTo(computeHorizontalScrollOffset(), maxVerticalScrollPix);
- } else {
- dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_PAGE_DOWN));
- dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_PAGE_DOWN));
- }
- return true;
- }
-
- /**
- * @See android.webkit.WebView#pageUp(boolean)
- */
- public boolean pageUp(boolean top) {
- if (computeVerticalScrollOffset() == 0) {
- // We seem to already be at the top of the page, so no scrolling will occur.
- return false;
- }
-
- if (top) {
- scrollTo(computeHorizontalScrollOffset(), 0);
- } else {
- dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_PAGE_UP));
- dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_PAGE_UP));
- }
- return true;
- }
-
- /**
* Callback factory method for nativeGetNavigationHistory().
*/
@CalledByNative
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698