diff options
| -rw-r--r-- | Source/WebCore/rendering/RenderLayerCompositor.cpp | 9 | ||||
| -rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 15 |
2 files changed, 24 insertions, 0 deletions
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp index 786f806..66dcf40 100644 --- a/Source/WebCore/rendering/RenderLayerCompositor.cpp +++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp @@ -1520,6 +1520,15 @@ bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* lay bool RenderLayerCompositor::requiresScrollLayer(RootLayerAttachment attachment) const { +#if PLATFORM(ANDROID) + // Recently, RenderLayerCompositor is changed to be a subclass of + // GraphicsLayerClient, and it is used for iframe. + // http://trac.webkit.org/changeset/75262 + // We have our own support for iframe, before we embrace this new approach, + // we will disable it. + // TODO: Investigate how to utilize this way to support iframe. + return false; +#endif // We need to handle our own scrolling if we're: return !m_renderView->frameView()->platformWidget() // viewless (i.e. non-Mac, or Mac in WebKit2) || attachment == RootLayerAttachedViaEnclosingFrame; // a composited frame on Mac diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index 61bc159..236c07b 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -2527,6 +2527,19 @@ static void nativeSetExpandedTileBounds(JNIEnv*, jobject, jboolean enabled) TilesManager::instance()->setExpandedTileBounds(enabled); } +static int nativeGetBackgroundColor(JNIEnv* env, jobject obj) +{ + WebView* view = GET_NATIVE_VIEW(env, obj); + BaseLayerAndroid* baseLayer = view->getBaseLayer(); + if (baseLayer) { + WebCore::Color color = baseLayer->getBackgroundColor(); + if (color.isValid()) + return SkColorSetARGB(color.alpha(), color.red(), + color.green(), color.blue()); + } + return SK_ColorWHITE; +} + /* * JNI registration */ @@ -2709,6 +2722,8 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeScrollLayer }, { "nativeSetExpandedTileBounds", "(Z)V", (void*) nativeSetExpandedTileBounds }, + { "nativeGetBackgroundColor", "()I", + (void*) nativeGetBackgroundColor }, }; int registerWebView(JNIEnv* env) |
