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/SVGInlineFlowBoxPainter.h" | 5 #include "core/paint/SVGInlineFlowBoxPainter.h" |
6 | 6 |
7 #include "core/layout/LayoutInline.h" | 7 #include "core/layout/LayoutInline.h" |
8 #include "core/layout/api/LineLayoutAPIShim.h" | 8 #include "core/layout/api/LineLayoutAPIShim.h" |
9 #include "core/layout/svg/line/SVGInlineFlowBox.h" | 9 #include "core/layout/svg/line/SVGInlineFlowBox.h" |
10 #include "core/layout/svg/line/SVGInlineTextBox.h" | 10 #include "core/layout/svg/line/SVGInlineTextBox.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 SVGInlineTextBoxPainter(*toSVGInlineTextBox(child)).paintSelectionBa
ckground(childPaintInfo); | 25 SVGInlineTextBoxPainter(*toSVGInlineTextBox(child)).paintSelectionBa
ckground(childPaintInfo); |
26 else if (child->isSVGInlineFlowBox()) | 26 else if (child->isSVGInlineFlowBox()) |
27 SVGInlineFlowBoxPainter(*toSVGInlineFlowBox(child)).paintSelectionBa
ckground(childPaintInfo); | 27 SVGInlineFlowBoxPainter(*toSVGInlineFlowBox(child)).paintSelectionBa
ckground(childPaintInfo); |
28 } | 28 } |
29 } | 29 } |
30 | 30 |
31 void SVGInlineFlowBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoin
t& paintOffset) | 31 void SVGInlineFlowBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoin
t& paintOffset) |
32 { | 32 { |
33 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh
aseSelection); | 33 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh
aseSelection); |
34 | 34 |
35 SVGPaintContext paintContext(*LineLayoutAPIShim::constLayoutObjectFrom(m_svg
InlineFlowBox.lineLayoutItem()), paintInfo); | 35 SVGPaintContext paintContext(*LineLayoutAPIShim::constLayoutObjectFrom(m_svg
InlineFlowBox.getLineLayoutItem()), paintInfo); |
36 if (paintContext.applyClipMaskAndFilterIfNecessary()) { | 36 if (paintContext.applyClipMaskAndFilterIfNecessary()) { |
37 for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; child =
child->nextOnLine()) | 37 for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; child =
child->nextOnLine()) |
38 child->paint(paintContext.paintInfo(), paintOffset, LayoutUnit(), La
youtUnit()); | 38 child->paint(paintContext.paintInfo(), paintOffset, LayoutUnit(), La
youtUnit()); |
39 } | 39 } |
40 } | 40 } |
41 | 41 |
42 } // namespace blink | 42 } // namespace blink |
OLD | NEW |