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; |