From ec1b71adc6c882b6cef3ad8c985d7e7d475e9c0f Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 25 May 2012 14:02:26 -0700 Subject: Copy over the scroll position for the scrolling layer Bug: 6557664 Change-Id: I9b1257ee0a4d75f5b445e9f72455d51e4add1c77 --- core/java/android/webkit/WebViewClassic.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core/java/android/webkit/WebViewClassic.java') diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java index f03fb86a6b64..65fd59a9f369 100644 --- a/core/java/android/webkit/WebViewClassic.java +++ b/core/java/android/webkit/WebViewClassic.java @@ -4403,8 +4403,11 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc if (mNativeClass == 0) return; boolean queueFull; + final int scrollingLayer = (mTouchMode == TOUCH_DRAG_LAYER_MODE) + ? mCurrentScrollingLayerId : 0; queueFull = nativeSetBaseLayer(mNativeClass, layer, - showVisualIndicator, isPictureAfterFirstLayout); + showVisualIndicator, isPictureAfterFirstLayout, + scrollingLayer); if (queueFull) { mWebViewCore.pauseWebKitDraw(); @@ -8515,7 +8518,8 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc private native String nativeGetSelection(); private native void nativeSetHeightCanMeasure(boolean measure); private native boolean nativeSetBaseLayer(int nativeInstance, - int layer, boolean showVisualIndicator, boolean isPictureAfterFirstLayout); + int layer, boolean showVisualIndicator, boolean isPictureAfterFirstLayout, + int scrollingLayer); private native int nativeGetBaseLayer(int nativeInstance); private native void nativeCopyBaseContentToPicture(Picture pict); private native boolean nativeHasContent(); -- cgit v1.2.3