summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderLayerBacking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/RenderLayerBacking.cpp')
-rw-r--r--Source/WebCore/rendering/RenderLayerBacking.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp
index ee39912a9..1085eabc0 100644
--- a/Source/WebCore/rendering/RenderLayerBacking.cpp
+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp
@@ -267,7 +267,7 @@ void RenderLayerBacking::updateCompositedBounds()
LayoutRect clippingBounds = view->unscaledDocumentRect();
if (m_owningLayer != rootLayer)
- clippingBounds.intersect(m_owningLayer->backgroundClipRect(rootLayer, 0, true).rect()); // FIXME: Incorrect for CSS regions.
+ clippingBounds.intersect(m_owningLayer->backgroundClipRect(rootLayer, 0, AbsoluteClipRects).rect()); // FIXME: Incorrect for CSS regions.
LayoutPoint delta;
m_owningLayer->convertToLayerCoords(rootLayer, delta);
@@ -465,7 +465,7 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
// Call calculateRects to get the backgroundRect which is what is used to clip the contents of this
// layer. Note that we call it with temporaryClipRects = true because normally when computing clip rects
// for a compositing layer, rootLayer is the layer itself.
- IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer->backgroundClipRect(compAncestor, 0, true).rect()); // FIXME: Incorrect for CSS regions.
+ IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer->backgroundClipRect(compAncestor, 0, TemporaryClipRects).rect()); // FIXME: Incorrect for CSS regions.
ASSERT(parentClipRect != PaintInfo::infiniteRect());
m_ancestorClippingLayer->setPosition(FloatPoint() + (parentClipRect.location() - graphicsLayerParentLocation));
m_ancestorClippingLayer->setSize(parentClipRect.size());
@@ -1112,6 +1112,17 @@ bool RenderLayerBacking::paintsIntoWindow() const
return false;
}
+void RenderLayerBacking::setRequiresOwnBackingStore(bool flag)
+{
+ if (flag == m_requiresOwnBackingStore)
+ return;
+
+ // This affects the answer to paintsIntoCompositedAncestor(), which in turn affects
+ // cached clip rects, so when it changes we have to clear clip rects on descendants.
+ m_owningLayer->clearClipRectsIncludingDescendants(PaintingClipRects);
+ m_requiresOwnBackingStore = flag;
+}
+
void RenderLayerBacking::setContentsNeedDisplay()
{
ASSERT(!paintsIntoCompositedAncestor());