Index: Source/core/paint/SVGClipPainter.cpp |
diff --git a/Source/core/paint/SVGClipPainter.cpp b/Source/core/paint/SVGClipPainter.cpp |
index 6f213c207e11604657b6e6c28af73fcca4e8fc53..7496877b253ba4f98d614fffce8f9505c646e372 100644 |
--- a/Source/core/paint/SVGClipPainter.cpp |
+++ b/Source/core/paint/SVGClipPainter.cpp |
@@ -101,9 +101,8 @@ void SVGClipPainter::postApplyStatefulResource(const LayoutObject& target, Graph |
case ClipperAppliedPath: |
// Path-only clipping, no layers to restore but we need to emit an end to the clip path display item. |
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
- if (context->displayItemList()->displayItemConstructionIsDisabled()) |
- return; |
- context->displayItemList()->add(EndClipPathDisplayItem::create(target)); |
+ if (!context->displayItemList()->displayItemConstructionIsDisabled()) |
+ context->displayItemList()->createAndAppendIfNeeded<EndClipPathDisplayItem>(target); |
} else { |
EndClipPathDisplayItem endClipPathDisplayItem(target); |
endClipPathDisplayItem.replay(*context); |