fix layer scrollbar updates
Bug: 5868791
tell webkit the layer has been scrolled
Change-Id: Ib12963340d950be992fbe5f9520c9a33c04404e8
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 168baad..ab4665a 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3742,6 +3742,8 @@
nativeScrollLayer(mCurrentScrollingLayerId, x, y);
mScrollingLayerRect.left = x;
mScrollingLayerRect.top = y;
+ mWebViewCore.sendMessage(WebViewCore.EventHub.SCROLL_LAYER, mCurrentScrollingLayerId,
+ mScrollingLayerRect);
onScrollChanged(mScrollX, mScrollY, mScrollX, mScrollY);
invalidate();
}
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 824f556..962a8f1 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -1097,6 +1097,8 @@
static final int HEARTBEAT = 197;
+ static final int SCROLL_LAYER = 198;
+
// private message ids
private static final int DESTROY = 200;
@@ -1708,6 +1710,11 @@
mBrowserFrame.stringByEvaluatingJavaScriptFromString((String) msg.obj);
}
break;
+ case SCROLL_LAYER:
+ int nativeLayer = msg.arg1;
+ Rect rect = (Rect) msg.obj;
+ nativeScrollLayer(mNativeClass, nativeLayer,
+ rect);
}
}
};