Index: third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
diff --git a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
index eab8db4016e64c7acf95bde7fe8ce018da59d96b..0cae3dadef83380db031e09c202fd01ff762f01e 100644 |
--- a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
+++ b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp |
@@ -62,6 +62,24 @@ bool SVGPaintContext::applyClipMaskAndFilterIfNecessary() { |
m_applyClipMaskAndFilterIfNecessaryCalled = true; |
#endif |
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
+ // SVGRoot works like normal CSS replaced element and its effects are |
+ // applied as stacking context effect by PaintLayerPainter. |
+ if (m_object.isSVGRoot()) |
+ return true; |
+ |
+ const auto* paintProperties = m_object.paintProperties(); |
+ const EffectPaintPropertyNode* effect = paintProperties ? paintProperties->effect() : nullptr; |
+ if (!effect) |
+ return true; |
+ |
+ auto& paintController = paintInfo().context.getPaintController(); |
+ PaintChunkProperties properties(paintController.currentPaintChunkProperties()); |
+ properties.effect = effect; |
+ m_scopedPaintChunkProperties.emplace(paintController, m_object, properties); |
+ return true; |
+ } |
+ |
// When rendering clip paths as masks, only geometric operations should be |
// included so skip non-geometric operations such as compositing, masking, and |
// filtering. |