summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-05-31 17:05:18 -0700
committerChris Craik <ccraik@google.com>2012-05-31 17:13:31 -0700
commit33f8fde94cdb7f753bfb1d98dc3bb076a811f344 (patch)
tree32fa6822912b135d9af99a89948c92048decdd84 /Source/WebKit/android/jni/WebViewCore.cpp
parent150a26fa5442a5fc931e5df05808e33aac1a7dea (diff)
downloadexternal_webkit-33f8fde94cdb7f753bfb1d98dc3bb076a811f344.zip
external_webkit-33f8fde94cdb7f753bfb1d98dc3bb076a811f344.tar.gz
external_webkit-33f8fde94cdb7f753bfb1d98dc3bb076a811f344.tar.bz2
Invalidate webview content on setBackgroundColor
bug:6593154 Change-Id: Ic9438f758c7c67d0a2e0579dbc53dcdf8dd109cd
Diffstat (limited to 'Source/WebKit/android/jni/WebViewCore.cpp')
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index 81c080d..34a9485 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -3888,11 +3888,18 @@ void WebViewCore::setBackgroundColor(SkColor c)
// need (int) cast to find the right constructor
WebCore::Color bcolor((int)SkColorGetR(c), (int)SkColorGetG(c),
(int)SkColorGetB(c), (int)SkColorGetA(c));
+
+ if (view->baseBackgroundColor() == bcolor)
+ return;
+
view->setBaseBackgroundColor(bcolor);
// Background color of 0 indicates we want a transparent background
if (c == 0)
view->setTransparent(true);
+
+ //invalidate so the new color is shown
+ contentInvalidateAll();
}
jclass WebViewCore::getPluginClass(const WTF::String& libName, const char* className)