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

Unified Diff: Source/core/page/FrameView.cpp

Issue 15973002: Remove NonCompositedContentHost -- Take 2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase, update comments, add FrameView::didChangeBackgroundOpaqueness Created 7 years, 7 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/core/page/FrameView.h ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/FrameView.cpp
diff --git a/Source/core/page/FrameView.cpp b/Source/core/page/FrameView.cpp
index ba2e4e7c21899666a3bf348d98f73748a536113e..d96040ed96f49bb6f025606424eeec83a2895fdc 100644
--- a/Source/core/page/FrameView.cpp
+++ b/Source/core/page/FrameView.cpp
@@ -2043,6 +2043,7 @@ bool FrameView::isTransparent() const
void FrameView::setTransparent(bool isTransparent)
{
m_isTransparent = isTransparent;
+ didChangeBackgroundOpaqueness();
}
bool FrameView::hasOpaqueBackground() const
@@ -2062,6 +2063,7 @@ void FrameView::setBaseBackgroundColor(const Color& backgroundColor)
else
m_baseBackgroundColor = backgroundColor;
+ didChangeBackgroundOpaqueness();
recalculateScrollbarOverlayStyle();
}
@@ -2075,6 +2077,16 @@ void FrameView::updateBackgroundRecursively(const Color& backgroundColor, bool t
}
}
+void FrameView::didChangeBackgroundOpaqueness()
jamesr 2013/05/28 23:03:52 I think this function would be clearer if this jus
+{
+ if (!m_frame->page() || m_frame->page()->mainFrame() != m_frame.get())
+ return;
+ if (!renderView() || !renderView()->layer()->backing())
+ return;
+ if (GraphicsLayer* layer = renderView()->layer()->backing()->graphicsLayer())
+ layer->setContentsOpaque(hasOpaqueBackground());
+}
+
bool FrameView::shouldUpdateWhileOffscreen() const
{
return m_shouldUpdateWhileOffscreen;
« no previous file with comments | « Source/core/page/FrameView.h ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698