summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-05-31 17:52:35 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-31 17:52:35 -0700
commitb5d3edac71ca2c54cbf9ce5bf42cc7727216ac09 (patch)
tree954d785e7371b8e9dcdf9d7e0341f1e7760658fc /Source
parenteffdd108fdcbfad1612f8be305ea716bdd7d927e (diff)
parent33f8fde94cdb7f753bfb1d98dc3bb076a811f344 (diff)
downloadexternal_webkit-b5d3edac71ca2c54cbf9ce5bf42cc7727216ac09.zip
external_webkit-b5d3edac71ca2c54cbf9ce5bf42cc7727216ac09.tar.gz
external_webkit-b5d3edac71ca2c54cbf9ce5bf42cc7727216ac09.tar.bz2
Merge "Invalidate webview content on setBackgroundColor" into jb-dev
Diffstat (limited to 'Source')
-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)