| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/SVGForeignObjectPainter.h" | 5 #include "core/paint/SVGForeignObjectPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/svg/LayoutSVGForeignObject.h" | 7 #include "core/layout/svg/LayoutSVGForeignObject.h" |
| 8 #include "core/layout/svg/SVGLayoutSupport.h" | 8 #include "core/layout/svg/SVGLayoutSupport.h" |
| 9 #include "core/paint/BlockPainter.h" | 9 #include "core/paint/BlockPainter.h" |
| 10 #include "core/paint/FloatClipRecorder.h" | 10 #include "core/paint/FloatClipRecorder.h" |
| 11 #include "core/paint/ObjectPainter.h" | 11 #include "core/paint/ObjectPainter.h" |
| 12 #include "core/paint/PaintInfo.h" | 12 #include "core/paint/PaintInfo.h" |
| 13 #include "core/paint/SVGPaintContext.h" | 13 #include "core/paint/SVGPaintContext.h" |
| 14 #include "wtf/Optional.h" | 14 #include "platform/wtf/Optional.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 class BlockPainterDelegate : public LayoutBlock { | 20 class BlockPainterDelegate : public LayoutBlock { |
| 21 public: | 21 public: |
| 22 BlockPainterDelegate(const LayoutSVGForeignObject& layout_svg_foreign_object) | 22 BlockPainterDelegate(const LayoutSVGForeignObject& layout_svg_foreign_object) |
| 23 : LayoutBlock(nullptr), | 23 : LayoutBlock(nullptr), |
| 24 layout_svg_foreign_object_(layout_svg_foreign_object) {} | 24 layout_svg_foreign_object_(layout_svg_foreign_object) {} |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // paint() in LayoutObject::paintAllPhasesAtomically() to | 68 // paint() in LayoutObject::paintAllPhasesAtomically() to |
| 69 // BlockPainter::paint(), instead of m_layoutSVGForeignObject.paint() (which | 69 // BlockPainter::paint(), instead of m_layoutSVGForeignObject.paint() (which |
| 70 // would call this method again). | 70 // would call this method again). |
| 71 BlockPainterDelegate delegate(layout_svg_foreign_object_); | 71 BlockPainterDelegate delegate(layout_svg_foreign_object_); |
| 72 ObjectPainter(delegate).PaintAllPhasesAtomically( | 72 ObjectPainter(delegate).PaintAllPhasesAtomically( |
| 73 paint_context.GetPaintInfo(), LayoutPoint()); | 73 paint_context.GetPaintInfo(), LayoutPoint()); |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| OLD | NEW |