diff options
author | Chris Craik <ccraik@google.com> | 2012-05-31 18:06:09 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-05-31 18:06:09 -0700 |
commit | 1d988a5cfd58943ebc6097ff78b68b6fba9ac232 (patch) | |
tree | 80ccb737c8e76360db9bb569204ed5e07f574673 /Source/WebKit/android | |
parent | 9fed119f4e16b29234168801aa19f896eb1c2a1f (diff) | |
parent | c40f87a1970b5377976087f2ffb4f0c621d39fd5 (diff) | |
download | external_webkit-1d988a5cfd58943ebc6097ff78b68b6fba9ac232.zip external_webkit-1d988a5cfd58943ebc6097ff78b68b6fba9ac232.tar.gz external_webkit-1d988a5cfd58943ebc6097ff78b68b6fba9ac232.tar.bz2 |
am c40f87a1: am b5d3edac: Merge "Invalidate webview content on setBackgroundColor" into jb-dev
* commit 'c40f87a1970b5377976087f2ffb4f0c621d39fd5':
Invalidate webview content on setBackgroundColor
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 161c0b2..0a7658f 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) |