Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index e525031ce93686e42f3caf18ad834c0a7c5ad6bd..892e595750d75035e5ef6b1fb2f866a0ff454a06 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -138,7 +138,6 @@ |
#include "core/platform/chromium/KeyboardCodes.h" |
#include "core/platform/chromium/TraceEvent.h" |
#include "core/platform/chromium/support/WebActiveGestureAnimation.h" |
-#include "core/platform/graphics/Color.h" |
#include "core/platform/graphics/ColorSpace.h" |
#include "core/platform/graphics/Extensions3D.h" |
#include "core/platform/graphics/FontCache.h" |
@@ -427,6 +426,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) |
, m_showDebugBorders(false) |
, m_continuousPaintingEnabled(false) |
, m_showScrollBottleneckRects(false) |
+ , m_baseBackgroundColor(Color::white) |
{ |
Page::PageClients pageClients; |
pageClients.chromeClient = &m_chromeClientImpl; |
@@ -2459,11 +2459,11 @@ WebColor WebViewImpl::backgroundColor() const |
if (isTransparent()) |
return Color::transparent; |
if (!m_page) |
- return Color::white; |
+ return m_baseBackgroundColor.rgb(); |
FrameView* view = m_page->mainFrame()->view(); |
Color backgroundColor = view->documentBackgroundColor(); |
if (!backgroundColor.isValid()) |
- return Color::white; |
+ return m_baseBackgroundColor.rgb(); |
return backgroundColor.rgb(); |
} |
@@ -3571,6 +3571,17 @@ void WebViewImpl::setIsTransparent(bool isTransparent) |
m_isTransparent = isTransparent; |
} |
+void WebViewImpl::setBaseBackgroundColor(WebColor color) |
aelias_OOO_until_Jul13
2013/07/23 19:05:01
Please add an early return if the color hasn't cha
joth
2013/07/23 21:13:16
Done
|
+{ |
+ m_baseBackgroundColor = Color(static_cast<RGBA32>(color)); |
+ m_isTransparent = !m_baseBackgroundColor.alpha(); |
aelias_OOO_until_Jul13
2013/07/23 19:02:16
This is testing for complete transparency, but isn
joth
2013/07/23 21:13:16
My reading of WebViewImpl::backgroundColor() is th
|
+ |
+ m_page->mainFrame()->view()->updateBackgroundRecursively(m_baseBackgroundColor, m_isTransparent); |
+ |
+ if (m_layerTreeView) |
+ m_layerTreeView->setBackgroundColor(backgroundColor()); |
+} |
+ |
bool WebViewImpl::isTransparent() const |
{ |
return m_isTransparent; |