diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/paint/svg_foreign_object_painter.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/paint/svg_foreign_object_painter.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/chromium/third_party/blink/renderer/core/paint/svg_foreign_object_painter.cc b/chromium/third_party/blink/renderer/core/paint/svg_foreign_object_painter.cc index 4d7405fcc7c..fa811d7863e 100644 --- a/chromium/third_party/blink/renderer/core/paint/svg_foreign_object_painter.cc +++ b/chromium/third_party/blink/renderer/core/paint/svg_foreign_object_painter.cc @@ -6,9 +6,7 @@ #include "base/optional.h" #include "third_party/blink/renderer/core/layout/svg/layout_svg_foreign_object.h" -#include "third_party/blink/renderer/core/layout/svg/svg_layout_support.h" #include "third_party/blink/renderer/core/paint/block_painter.h" -#include "third_party/blink/renderer/core/paint/object_painter.h" #include "third_party/blink/renderer/core/paint/paint_info.h" #include "third_party/blink/renderer/core/paint/paint_layer.h" #include "third_party/blink/renderer/core/paint/paint_layer_painter.h" @@ -19,7 +17,7 @@ namespace blink { void SVGForeignObjectPainter::PaintLayer(const PaintInfo& paint_info) { if (paint_info.phase != PaintPhase::kForeground && - paint_info.phase != PaintPhase::kSelection) + paint_info.phase != PaintPhase::kSelectionDragImage) return; // Early out in the case of trying to paint an image filter before @@ -51,14 +49,13 @@ void SVGForeignObjectPainter::PaintLayer(const PaintInfo& paint_info) { } void SVGForeignObjectPainter::Paint(const PaintInfo& paint_info) { - PaintInfo paint_info_before_filtering(paint_info); - ScopedSVGPaintState paint_state(layout_svg_foreign_object_, - paint_info_before_filtering); - - if (paint_state.GetPaintInfo().phase == PaintPhase::kForeground && - !paint_state.ApplyClipMaskAndFilterIfNecessary()) + ScopedSVGPaintState paint_state(layout_svg_foreign_object_, paint_info); + // ScopedSVGPaintState only applies masks (and clips-within-clips) + // here and thus does not mutate PaintInfo, so we can use the passed + // in PaintInfo below. + if (paint_info.phase == PaintPhase::kForeground && + !paint_state.ApplyEffects()) return; - BlockPainter(layout_svg_foreign_object_).Paint(paint_info); } |