Index: Source/core/paint/LayerClipRecorder.cpp |
diff --git a/Source/core/paint/LayerClipRecorder.cpp b/Source/core/paint/LayerClipRecorder.cpp |
index 748999d616ee5be0b64ce38d9cd791740081ea58..cc24eb0aa167135254bf3844e0bd1196245067f1 100644 |
--- a/Source/core/paint/LayerClipRecorder.cpp |
+++ b/Source/core/paint/LayerClipRecorder.cpp |
@@ -39,6 +39,28 @@ LayerClipRecorder::LayerClipRecorder(GraphicsContext& graphicsContext, const Lay |
} |
} |
+LayerClipRecorder::LayerClipRecorder(GraphicsContext& context, const LayoutBox& layoutBox, const LayoutPoint& paintOffset) |
+ : m_graphicsContext(context) |
+ , m_layoutObject(layoutBox) |
+ , m_clipType(DisplayItem::ClipDescendantStackingContext) |
+{ |
+ ASSERT(layoutBox.hasOverflowClip()); |
pdr.
2015/09/03 06:16:59
Can you assert spv2 here?
ASSERT(RuntimeEnabledFea
trchen
2015/09/04 06:10:15
Done.
|
+ |
+ LayoutRect clipRect = layoutBox.overflowClipRect(paintOffset); |
+ Vector<FloatRoundedRect> roundedRects; |
+ if (layoutBox.style()->hasBorderRadius()) |
+ roundedRects.append(layoutBox.style()->getRoundedInnerBorderFor(LayoutRect(paintOffset, layoutBox.size()))); |
+ |
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
+ if (m_graphicsContext.displayItemList()->displayItemConstructionIsDisabled()) |
+ return; |
+ m_graphicsContext.displayItemList()->createAndAppend<ClipDisplayItem>(m_layoutObject, m_clipType, pixelSnappedIntRect(clipRect), roundedRects); |
+ } else { |
+ ClipDisplayItem clipDisplayItem(m_layoutObject, m_clipType, pixelSnappedIntRect(clipRect), roundedRects); |
+ clipDisplayItem.replay(m_graphicsContext); |
+ } |
+} |
+ |
static bool inContainingBlockChain(DeprecatedPaintLayer* startLayer, DeprecatedPaintLayer* endLayer) |
{ |
if (startLayer == endLayer) |