From 70adfd756fa5e71bd6913f3a1d8223ca26d8ec92 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Thu, 1 Dec 2011 15:31:25 -0800 Subject: Scroll position now passed to all layers bug:5666027 Previously, only the most recent version of the scrollablelayerandroid would have its position updated. This caused issues with position inconsistency between the painting and drawing version of the layer, if both existed. Change-Id: Ife29ae4e2cb00fbaa2f6fc95d9914b3434862f10 --- Source/WebKit/android/nav/WebView.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Source/WebKit/android/nav/WebView.cpp') diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index 2be01dc..4a15a5b 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -1093,6 +1093,12 @@ int scrollableLayer(int x, int y, SkIRect* layerRect, SkIRect* bounds) return 0; } +void scrollLayer(int layerId, int x, int y) +{ + if (m_glWebViewState) + m_glWebViewState->scrollLayer(layerId, x, y); +} + int getBlockLeftEdge(int x, int y, float scale) { CachedRoot* root = getFrameCache(AllowNewer); @@ -2659,6 +2665,9 @@ static bool nativeScrollLayer(JNIEnv* env, jobject obj, jint layerId, jint x, { #if ENABLE(ANDROID_OVERFLOW_SCROLL) WebView* view = GET_NATIVE_VIEW(env, obj); + view->scrollLayer(layerId, x, y); + + //TODO: the below only needed for the SW rendering path LayerAndroid* root = view->compositeRoot(); if (!root) return false; -- cgit v1.1