Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index dcad19b352389879f734234ca6fe73442cc48d20..f2e5168d9e3c472a85f197bc5b1f0d16ce6b0937 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -427,6 +427,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; |
@@ -2461,11 +2462,11 @@ WebColor WebViewImpl::backgroundColor() const |
if (isTransparent()) |
return Color::transparent; |
if (!m_page) |
- return Color::white; |
+ return m_baseBackgroundColor; |
FrameView* view = m_page->mainFrame()->view(); |
StyleColor backgroundColor = view->documentBackgroundColor(); |
if (!backgroundColor.isValid()) |
- return Color::white; |
+ return m_baseBackgroundColor; |
return backgroundColor.rgb(); |
} |
@@ -3578,6 +3579,19 @@ bool WebViewImpl::isTransparent() const |
return m_isTransparent; |
} |
+void WebViewImpl::setBaseBackgroundColor(WebColor color) |
+{ |
+ if (m_baseBackgroundColor == color) |
+ return; |
+ |
+ m_baseBackgroundColor = color; |
+ |
+ m_page->mainFrame()->view()->updateBackgroundRecursively(color, m_isTransparent); |
jamesr
2013/07/25 00:02:28
hmm, why recursive? won't this only change the bac
jamesr
2013/07/25 00:16:06
I'm pretty sure calling FrameView::setBaseBackgrou
joth
2013/07/25 00:39:43
Done.
(just to clarify: I am relying on the exist
|
+ |
+ if (m_layerTreeView) |
+ m_layerTreeView->setBackgroundColor(backgroundColor()); |
+} |
+ |
void WebViewImpl::setIsActive(bool active) |
{ |
if (page() && page()->focusController()) |