Index: Source/core/rendering/compositing/CompositedLayerMapping.h |
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.h b/Source/core/rendering/compositing/CompositedLayerMapping.h |
index dcb0253677b7fab01b03d4bcc956002ca236ff2b..f27798cfeac168db33fe721544692d688571ebf7 100644 |
--- a/Source/core/rendering/compositing/CompositedLayerMapping.h |
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.h |
@@ -51,6 +51,9 @@ struct GraphicsLayerPaintInfo { |
// known, then we can trivially convert this offset to m_squashingLayer's space. |
LayoutSize offsetFromSquashingCLM; |
+ // The clip rect to apply, in the local coordinate space of the squashed layer, when painting it. |
+ IntRect localClipRectForSquashedLayer; |
+ |
// Offset describing where this squashed RenderLayer paints into the shared GraphicsLayer backing. |
IntSize offsetFromRenderer; |
LayoutSize subpixelAccumulation; |
@@ -205,6 +208,9 @@ public: |
return m_squashingLayerOffsetFromTransformedAncestor; |
} |
+ // If there is a squashed layer painting into this CLM that is an ancestor of the given RenderObject, return it. Otherwise return 0. |
+ const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObject*) const; |
+ |
private: |
void createPrimaryGraphicsLayer(); |
void destroyGraphicsLayers(); |
@@ -276,6 +282,13 @@ private: |
void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& clip); |
+ // Computes the background clip rect for the given squashed layer, up to any containing layer that is squashed into the |
+ // same squashing layer and contains this squashed layer's clipping ancestor. |
+ // The clip rect is returned in the coordinate space of the given squashed layer. |
+ // If there is no such containing layer, returns the infinite rect. |
+ // FIXME: unify this code with the code that sets up m_ancestorClippingLayer. They are doing very similar things. |
+ IntRect localClipRectForSquashedLayer(const GraphicsLayerPaintInfo&) const; |
+ |
RenderLayer& m_owningLayer; |
// The hierarchy of layers that is maintained by the CompositedLayerMapping looks like this: |