Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1215)

Unified Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 10146014: Merge 113677 - [chromium] Viewport is not filled when out of texture memory on mac (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.h ('k') | Source/WebKit/chromium/tests/CCLayerImplTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebViewImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/WebViewImpl.cpp (revision 114754)
+++ Source/WebKit/chromium/src/WebViewImpl.cpp (working copy)
@@ -38,6 +38,7 @@
#include "CSSStyleSelector.h"
#include "CSSValueKeywords.h"
#include "Chrome.h"
+#include "Color.h"
#include "ColorSpace.h"
#include "CompositionUnderlineVectorBuilder.h"
#include "ContextMenu.h"
@@ -3213,6 +3214,14 @@
return m_nonCompositedContentHost.get();
}
+void WebViewImpl::setBackgroundColor(const WebCore::Color& color)
+{
+ WebCore::Color documentBackgroundColor = color.isValid() ? color : WebCore::Color::white;
+ WebColor webDocumentBackgroundColor = documentBackgroundColor.rgb();
+ m_nonCompositedContentHost->setBackgroundColor(documentBackgroundColor);
+ m_layerTreeView.setBackgroundColor(webDocumentBackgroundColor);
+}
+
#if ENABLE(REQUEST_ANIMATION_FRAME)
void WebViewImpl::scheduleAnimation()
{
@@ -3248,8 +3257,7 @@
PlatformSupport::histogramCustomCounts("Renderer4.AccelRootPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
PlatformSupport::histogramCustomCounts("Renderer4.AccelRootPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
- m_webViewImpl->nonCompositedContentHost()->setBackgroundColor(view->documentBackgroundColor());
-
+ m_webViewImpl->setBackgroundColor(view->documentBackgroundColor());
}
private:
@@ -3296,9 +3304,6 @@
m_nonCompositedContentHost = NonCompositedContentHost::create(WebViewImplContentPainter::create(this));
m_nonCompositedContentHost->setShowDebugBorders(page()->settings()->showDebugBorders());
- if (page() && page()->mainFrame()->view())
- m_nonCompositedContentHost->setBackgroundColor(page()->mainFrame()->view()->documentBackgroundColor());
-
m_layerTreeView.initialize(this, m_rootLayer, layerTreeViewSettings);
if (!m_layerTreeView.isNull()) {
m_layerTreeView.setPageScaleFactorAndLimits(pageScaleFactor(), m_minimumPageScaleFactor, m_maximumPageScaleFactor);
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.h ('k') | Source/WebKit/chromium/tests/CCLayerImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698