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

Unified Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 15425006: Revert "Remove NonCompositedContentHost" and follow-up rebaselining. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/rendering/RenderLayerCompositor.h ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
index 85dc6b44a54ec35b1ff3288e42453f4370ed3597..5f7b4ab1229906167ddc7693dfacb90864c32f86 100644
--- a/Source/core/rendering/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/RenderLayerCompositor.cpp
@@ -1148,8 +1148,10 @@ void RenderLayerCompositor::frameViewDidScroll()
// If there's a scrolling coordinator that manages scrolling for this frame view,
// it will also manage updating the scroll layer position.
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) {
+ if (scrollingCoordinator->coordinatesScrollingForFrameView(frameView))
+ return;
if (Settings* settings = m_renderView->document()->settings()) {
- if (isMainFrame() || settings->compositedScrollingForFramesEnabled())
+ if (settings->compositedScrollingForFramesEnabled())
scrollingCoordinator->scrollableAreaScrollLayerDidChange(frameView);
}
}
@@ -1513,6 +1515,7 @@ bool RenderLayerCompositor::requiresOwnBackingStore(const RenderLayer* layer, co
RenderObject* renderer = layer->renderer();
if (compositingAncestorLayer
&& !(compositingAncestorLayer->backing()->graphicsLayer()->drawsContent()
+ || compositingAncestorLayer->backing()->paintsIntoWindow()
|| compositingAncestorLayer->backing()->paintsIntoCompositedAncestor()))
return true;
@@ -2489,6 +2492,7 @@ void RenderLayerCompositor::attachRootLayer(RootLayerAttachment attachment)
}
m_rootLayerAttachment = attachment;
+ rootLayerAttachmentChanged();
}
void RenderLayerCompositor::detachRootLayer()
@@ -2523,6 +2527,7 @@ void RenderLayerCompositor::detachRootLayer()
}
m_rootLayerAttachment = RootLayerUnattached;
+ rootLayerAttachmentChanged();
}
void RenderLayerCompositor::updateRootLayerAttachment()
@@ -2535,6 +2540,15 @@ bool RenderLayerCompositor::isMainFrame() const
return !m_renderView->document()->ownerElement();
}
+void RenderLayerCompositor::rootLayerAttachmentChanged()
+{
+ // The attachment can affect whether the RenderView layer's paintsIntoWindow() behavior,
+ // so call updateGraphicsLayerGeometry() to udpate that.
+ RenderLayer* layer = m_renderView->layer();
+ if (RenderLayerBacking* backing = layer ? layer->backing() : 0)
+ backing->updateDrawsContent();
+}
+
// IFrames are special, because we hook compositing layers together across iframe boundaries
// when both parent and iframe content are composited. So when this frame becomes composited, we have
// to use a synthetic style change to get the iframes into RenderLayers in order to allow them to composite.
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.h ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698