diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-27 21:51:42 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-27 21:51:42 +0200 |
| commit | be01689f43cf6882cf670d33df49ead1f570c53a (patch) | |
| tree | 4bb2161d8983b38e3e7ed37b4a50303bfd5e2e85 /Source/WebCore/rendering/RenderLayerBacking.cpp | |
| parent | a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (diff) | |
| download | qtwebkit-be01689f43cf6882cf670d33df49ead1f570c53a.tar.gz | |
Imported WebKit commit 8d6c5efc74f0222dfc7bcce8d845d4a2707ed9e6 (http://svn.webkit.org/repository/webkit/trunk@118629)
Diffstat (limited to 'Source/WebCore/rendering/RenderLayerBacking.cpp')
| -rw-r--r-- | Source/WebCore/rendering/RenderLayerBacking.cpp | 15 |
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()); |
