diff options
Diffstat (limited to 'Source/WebKit/android/nav/WebView.cpp')
-rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index 945a785..8835f70 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -1482,6 +1482,11 @@ void setBaseLayer(BaseLayerAndroid* layer, SkRegion& inval, bool showVisualIndic root->setRootLayer(compositeRoot()); } +void getTextSelectionRegion(SkRegion *region) +{ + m_selectText.getSelectionRegion(getVisibleRect(), region); +} + void replaceBaseContent(PictureSet* set) { if (!m_baseLayer) @@ -1576,6 +1581,7 @@ class GLDrawFunctor : Functor { WebCore::IntRect clip(info->clipLeft, info->clipTop, info->clipRight - info->clipLeft, info->clipBottom - info->clipTop); + TilesManager::instance()->shader()->setWebViewMatrix(info->transform); bool retVal = (*wvInstance.*funcPtr)(localViewRect, &inval, webViewRect, titlebarHeight, clip, scale, extras); if (retVal) { @@ -1910,6 +1916,14 @@ static void nativeSetBaseLayer(JNIEnv *env, jobject obj, jint layer, jobject inv registerPageSwapCallback); } +static void nativeGetTextSelectionRegion(JNIEnv *env, jobject obj, jobject region) +{ + if (!region) + return; + SkRegion* nregion = GraphicsJNI::getNativeRegion(env, region); + GET_NATIVE_VIEW(env, obj)->getTextSelectionRegion(nregion); +} + static BaseLayerAndroid* nativeGetBaseLayer(JNIEnv *env, jobject obj) { return GET_NATIVE_VIEW(env, obj)->getBaseLayer(); @@ -2794,6 +2808,8 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeSetHeightCanMeasure }, { "nativeSetBaseLayer", "(ILandroid/graphics/Region;ZZZ)V", (void*) nativeSetBaseLayer }, + { "nativeGetTextSelectionRegion", "(Landroid/graphics/Region;)V", + (void*) nativeGetTextSelectionRegion }, { "nativeGetBaseLayer", "()I", (void*) nativeGetBaseLayer }, { "nativeReplaceBaseContent", "(I)V", |