diff options
author | Nicolas Roard <nicolasroard@google.com> | 2012-05-23 18:47:46 -0700 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2012-05-23 18:47:46 -0700 |
commit | e13f94616ccce173b7eb3f9f691d8ff5e3eb86f3 (patch) | |
tree | bf8b29d86d6137d8b3d85c23d9e8beb3b546cfd4 /Source/WebKit/android/jni/WebViewCore.cpp | |
parent | a6645da2a8bfb194b7ee9c790f1da607e0e984c0 (diff) | |
download | external_webkit-e13f94616ccce173b7eb3f9f691d8ff5e3eb86f3.zip external_webkit-e13f94616ccce173b7eb3f9f691d8ff5e3eb86f3.tar.gz external_webkit-e13f94616ccce173b7eb3f9f691d8ff5e3eb86f3.tar.bz2 |
Don't set up background images if 1x1
We do this check in other places. We still need a better
solution for the general case.
bug:6540356
Change-Id: I3f75c62141d7b6993928927117d972d0ec224b55
Diffstat (limited to 'Source/WebKit/android/jni/WebViewCore.cpp')
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index d07b00e..9592d29 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -843,8 +843,11 @@ BaseLayerAndroid* WebViewCore::createBaseLayer(GraphicsLayerAndroid* root) Color viewBackground = view->baseBackgroundColor(); background = bodyHasCSSBackground ? viewBackground.blend(background) : viewBackground; } - bodyHasFixedBackgroundImage = style->hasFixedBackgroundImage() - && FixedBackgroundImageLayerAndroid::GetCachedImage(style); + if (style->hasFixedBackgroundImage()) { + Image* backgroundImage = FixedBackgroundImageLayerAndroid::GetCachedImage(style); + if (backgroundImage && backgroundImage->width() > 1 && backgroundImage->height() > 1) + bodyHasFixedBackgroundImage = true; + } } PicturePileLayerContent* content = new PicturePileLayerContent(m_content); |