| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/SVGInlineFlowBoxPainter.h" | 6 #include "core/paint/SVGInlineFlowBoxPainter.h" |
| 7 | 7 |
| 8 #include "core/layout/LayoutInline.h" | 8 #include "core/layout/LayoutInline.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" |
| 11 #include "core/paint/InlinePainter.h" | 11 #include "core/paint/ObjectPainter.h" |
| 12 #include "core/paint/PaintInfo.h" | 12 #include "core/paint/PaintInfo.h" |
| 13 #include "core/paint/SVGInlineTextBoxPainter.h" | 13 #include "core/paint/SVGInlineTextBoxPainter.h" |
| 14 #include "core/paint/SVGPaintContext.h" | 14 #include "core/paint/SVGPaintContext.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 void SVGInlineFlowBoxPainter::paintSelectionBackground(const PaintInfo& paintInf
o) | 18 void SVGInlineFlowBoxPainter::paintSelectionBackground(const PaintInfo& paintInf
o) |
| 19 { | 19 { |
| 20 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh
aseSelection); | 20 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh
aseSelection); |
| 21 | 21 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh
aseSelection); | 33 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh
aseSelection); |
| 34 | 34 |
| 35 { | 35 { |
| 36 SVGPaintContext paintContext(m_svgInlineFlowBox.layoutObject(), paintInf
o); | 36 SVGPaintContext paintContext(m_svgInlineFlowBox.layoutObject(), paintInf
o); |
| 37 if (paintContext.applyClipMaskAndFilterIfNecessary()) { | 37 if (paintContext.applyClipMaskAndFilterIfNecessary()) { |
| 38 for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; chil
d = child->nextOnLine()) | 38 for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; chil
d = child->nextOnLine()) |
| 39 child->paint(paintContext.paintInfo(), paintOffset, 0, 0); | 39 child->paint(paintContext.paintInfo(), paintOffset, 0, 0); |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 | 42 |
| 43 if (m_svgInlineFlowBox.layoutObject().isLayoutInline()) | 43 if (m_svgInlineFlowBox.layoutObject().styleRef().hasOutline()) { |
| 44 InlinePainter(toLayoutInline(m_svgInlineFlowBox.layoutObject())).paintOu
tline(paintInfo, paintOffset); | 44 PaintInfo outlinePaintInfo(paintInfo); |
| 45 outlinePaintInfo.phase = PaintPhaseSelfOutline; |
| 46 ObjectPainter(m_svgInlineFlowBox.layoutObject()).paintOutline(outlinePai
ntInfo, paintOffset); |
| 47 } |
| 45 } | 48 } |
| 46 | 49 |
| 47 } // namespace blink | 50 } // namespace blink |
| OLD | NEW |