diff options
author | Chris Craik <ccraik@google.com> | 2012-05-31 17:55:01 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-05-31 17:55:01 -0700 |
commit | c40f87a1970b5377976087f2ffb4f0c621d39fd5 (patch) | |
tree | 954d785e7371b8e9dcdf9d7e0341f1e7760658fc | |
parent | 9af7514f84d41c3aa4add011ef0ffe5af04e7143 (diff) | |
parent | b5d3edac71ca2c54cbf9ce5bf42cc7727216ac09 (diff) | |
download | external_webkit-c40f87a1970b5377976087f2ffb4f0c621d39fd5.zip external_webkit-c40f87a1970b5377976087f2ffb4f0c621d39fd5.tar.gz external_webkit-c40f87a1970b5377976087f2ffb4f0c621d39fd5.tar.bz2 |
am b5d3edac: Merge "Invalidate webview content on setBackgroundColor" into jb-dev
* commit 'b5d3edac71ca2c54cbf9ce5bf42cc7727216ac09':
Invalidate webview content on setBackgroundColor
-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 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) |