Index: Source/core/rendering/compositing/CompositedLayerMapping.cpp |
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp |
index fa67c9f8a3e9f3a572993175a72cc37fc4a0f527..2e0126aa42c15ac1a1d31e828f7f30184c9c9239 100644 |
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp |
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp |
@@ -335,34 +335,6 @@ static bool hasNonZeroTransformOrigin(const RenderObject* renderer) |
|| (style->transformOriginY().type() == Fixed && style->transformOriginY().value()); |
} |
-static bool layerOrAncestorIsTransformedOrUsingCompositedScrolling(RenderLayer* layer) |
-{ |
- for (RenderLayer* curr = layer; curr; curr = curr->parent()) { |
- if (curr->hasTransform() || curr->needsCompositedScrolling()) |
- return true; |
- } |
- |
- return false; |
-} |
- |
-bool CompositedLayerMapping::shouldClipCompositedBounds() const |
-{ |
- // Scrollbar layers use this layer for relative positioning, so don't clip. |
- if (layerForHorizontalScrollbar() || layerForVerticalScrollbar()) |
- return false; |
- |
- if (layerOrAncestorIsTransformedOrUsingCompositedScrolling(&m_owningLayer)) |
- return false; |
- |
- // Scrolled composited layers are clipped by their ancestor clipping layer, |
- // so don't clip these, either. |
- if (compositor()->clippedByNonAncestorInStackingTree(&m_owningLayer) |
- && m_owningLayer.renderer()->containingBlock()->enclosingLayer() == m_owningLayer.ancestorScrollingLayer()) |
- return false; |
- |
- return true; |
-} |
- |
void CompositedLayerMapping::updateCompositedBounds(GraphicsLayerUpdater::UpdateType updateType) |
{ |
if (!shouldUpdateGraphicsLayer(updateType)) |
@@ -374,29 +346,6 @@ void CompositedLayerMapping::updateCompositedBounds(GraphicsLayerUpdater::Update |
LayoutRect layerBounds = m_owningLayer.boundingBoxForCompositing(); |
- // Clip to the size of the document or enclosing overflow-scroll layer. |
- // If this or an ancestor is transformed, we can't currently compute the correct rect to intersect with. |
- // We'd need RenderObject::convertContainerToLocalQuad(), which doesn't yet exist. |
- if (shouldClipCompositedBounds()) { |
- RenderView* view = m_owningLayer.renderer()->view(); |
- RenderLayer* rootLayer = view->layer(); |
- |
- LayoutRect clippingBounds; |
- if (renderer()->style()->position() == FixedPosition && renderer()->container() == view) |
- clippingBounds = view->frameView()->viewportConstrainedVisibleContentRect(); |
- else |
- clippingBounds = view->unscaledDocumentRect(); |
- |
- if (&m_owningLayer != rootLayer) |
- clippingBounds.intersect(m_owningLayer.clipper().backgroundClipRect(ClipRectsContext(rootLayer, AbsoluteClipRects)).rect()); |
- |
- LayoutPoint delta; |
- m_owningLayer.convertToLayerCoords(rootLayer, delta); |
- clippingBounds.move(-delta.x(), -delta.y()); |
- |
- layerBounds.intersect(clippingBounds); |
- } |
- |
// If the element has a transform-origin that has fixed lengths, and the renderer has zero size, |
// then we need to ensure that the compositing layer has non-zero size so that we can apply |
// the transform-origin via the GraphicsLayer anchorPoint (which is expressed as a fractional value). |