| 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 #ifndef SVGInlineTextBoxPainter_h | 5 #ifndef SVGInlineTextBoxPainter_h |
| 6 #define SVGInlineTextBoxPainter_h | 6 #define SVGInlineTextBoxPainter_h |
| 7 | 7 |
| 8 #include "core/layout/style/LayoutStyleConstants.h" | 8 #include "core/layout/style/ComputedStyleConstants.h" |
| 9 #include "core/layout/svg/LayoutSVGResourcePaintServer.h" | 9 #include "core/layout/svg/LayoutSVGResourcePaintServer.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class FloatPoint; | 13 class FloatPoint; |
| 14 class Font; | 14 class Font; |
| 15 class GraphicsContext; | 15 class GraphicsContext; |
| 16 struct PaintInfo; | 16 struct PaintInfo; |
| 17 class LayoutPoint; | 17 class LayoutPoint; |
| 18 class LayoutStyle; | 18 class ComputedStyle; |
| 19 class SVGInlineTextBox; | 19 class SVGInlineTextBox; |
| 20 struct SVGTextFragment; | 20 struct SVGTextFragment; |
| 21 class TextRun; | 21 class TextRun; |
| 22 class DocumentMarker; | 22 class DocumentMarker; |
| 23 | 23 |
| 24 class SVGInlineTextBoxPainter { | 24 class SVGInlineTextBoxPainter { |
| 25 public: | 25 public: |
| 26 SVGInlineTextBoxPainter(SVGInlineTextBox& svgInlineTextBox) : m_svgInlineTex
tBox(svgInlineTextBox) { } | 26 SVGInlineTextBoxPainter(SVGInlineTextBox& svgInlineTextBox) : m_svgInlineTex
tBox(svgInlineTextBox) { } |
| 27 void paint(const PaintInfo&, const LayoutPoint&); | 27 void paint(const PaintInfo&, const LayoutPoint&); |
| 28 void paintSelectionBackground(const PaintInfo&); | 28 void paintSelectionBackground(const PaintInfo&); |
| 29 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint&, Docum
entMarker*, const LayoutStyle&, const Font&); | 29 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint&, Docum
entMarker*, const ComputedStyle&, const Font&); |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 bool shouldPaintSelection() const; | 32 bool shouldPaintSelection() const; |
| 33 void paintTextFragments(const PaintInfo&, LayoutObject&); | 33 void paintTextFragments(const PaintInfo&, LayoutObject&); |
| 34 void paintDecoration(const PaintInfo&, TextDecoration, const SVGTextFragment
&); | 34 void paintDecoration(const PaintInfo&, TextDecoration, const SVGTextFragment
&); |
| 35 void paintTextWithShadows(const PaintInfo&, const LayoutStyle&, TextRun&, co
nst SVGTextFragment&, int startPosition, int endPosition, LayoutSVGResourceMode)
; | 35 void paintTextWithShadows(const PaintInfo&, const ComputedStyle&, TextRun&,
const SVGTextFragment&, int startPosition, int endPosition, LayoutSVGResourceMod
e); |
| 36 void paintText(const PaintInfo&, const LayoutStyle&, const LayoutStyle& sele
ctionStyle, const SVGTextFragment&, LayoutSVGResourceMode, bool shouldPaintSelec
tion); | 36 void paintText(const PaintInfo&, const ComputedStyle&, const ComputedStyle&
selectionStyle, const SVGTextFragment&, LayoutSVGResourceMode, bool shouldPaintS
election); |
| 37 | 37 |
| 38 SVGInlineTextBox& m_svgInlineTextBox; | 38 SVGInlineTextBox& m_svgInlineTextBox; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace blink | 41 } // namespace blink |
| 42 | 42 |
| 43 #endif // SVGInlineTextBoxPainter_h | 43 #endif // SVGInlineTextBoxPainter_h |
| OLD | NEW |