diff options
| author | Patrick Scott <phanna@android.com> | 2010-12-03 07:41:08 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-03 07:41:08 -0800 |
| commit | 5ad363b60f5b5db4f0096a3f999a843dae7f646a (patch) | |
| tree | d37aaeb34f460372b948f54c1dbe9b8c27f1fcb8 /WebKit/android/jni/WebViewCore.cpp | |
| parent | f1be25c028fafac3594d4a566fcca4708803ea72 (diff) | |
| parent | 8598c9fb9f861f25ab14efde9efb19cb91d7df1c (diff) | |
| download | external_webkit-5ad363b60f5b5db4f0096a3f999a843dae7f646a.zip external_webkit-5ad363b60f5b5db4f0096a3f999a843dae7f646a.tar.gz external_webkit-5ad363b60f5b5db4f0096a3f999a843dae7f646a.tar.bz2 | |
Merge "Attempt to scroll layers everytime the user drags."
Diffstat (limited to 'WebKit/android/jni/WebViewCore.cpp')
| -rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 5f5bb53..f134cb6 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -3557,10 +3557,17 @@ void WebViewCore::addVisitedLink(const UChar* string, int length) m_groupForVisitedLinks->addVisitedLink(string, length); } -static jint UpdateLayers(JNIEnv *env, jobject obj) +static jint UpdateLayers(JNIEnv *env, jobject obj, jobject region) { WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj); BaseLayerAndroid* result = viewImpl->createBaseLayer(); + SkRegion* nativeRegion = GraphicsJNI::getNativeRegion(env, region); + if (result) { + SkIRect bounds; + LayerAndroid* root = static_cast<LayerAndroid*>(result->getChild(0)); + root->bounds().roundOut(&bounds); + nativeRegion->setRect(bounds); + } return reinterpret_cast<jint>(result); } @@ -4096,7 +4103,7 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = { (void*) UpdateFrameCache }, { "nativeGetContentMinPrefWidth", "()I", (void*) GetContentMinPrefWidth }, - { "nativeUpdateLayers", "()I", + { "nativeUpdateLayers", "(Landroid/graphics/Region;)I", (void*) UpdateLayers }, { "nativeRecordContent", "(Landroid/graphics/Region;Landroid/graphics/Point;)I", (void*) RecordContent }, |
