| 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 InlineTextBoxPainter_h | 5 #ifndef InlineTextBoxPainter_h |
| 6 #define InlineTextBoxPainter_h | 6 #define InlineTextBoxPainter_h |
| 7 | 7 |
| 8 #include "core/rendering/style/RenderStyleConstants.h" | 8 #include "core/rendering/style/RenderStyleConstants.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 struct CompositionUnderline; | 12 struct CompositionUnderline; |
| 13 struct PaintInfo; | 13 struct PaintInfo; |
| 14 | 14 |
| 15 class Color; | 15 class Color; |
| 16 class DocumentMarker; | 16 class DocumentMarker; |
| 17 class FloatPoint; | 17 class FloatPoint; |
| 18 class Font; | 18 class Font; |
| 19 class GraphicsContext; | 19 class GraphicsContext; |
| 20 class InlineTextBox; | 20 class InlineTextBox; |
| 21 class LayoutPoint; | 21 class LayoutPoint; |
| 22 class RenderStyle; | 22 class RenderStyle; |
| 23 | 23 |
| 24 class InlineTextBoxPainter { | 24 class InlineTextBoxPainter { |
| 25 public: | 25 public: |
| 26 InlineTextBoxPainter(InlineTextBox& inlineTextBox) : m_inlineTextBox(inlineT
extBox) { } | 26 InlineTextBoxPainter(InlineTextBox& inlineTextBox) : m_inlineTextBox(inlineT
extBox) { } |
| 27 | 27 |
| 28 void paint(const PaintInfo&, const LayoutPoint&); | 28 void paint(const PaintInfo&, const LayoutPoint&); |
| 29 void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, Ren
derStyle*, const Font&, bool background); | 29 void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, con
st RenderStyle*, const Font&, bool background); |
| 30 void paintDocumentMarker(GraphicsContext*, const FloatPoint& boxOrigin, Docu
mentMarker*, RenderStyle*, const Font&, bool grammar); | 30 void paintDocumentMarker(GraphicsContext*, const FloatPoint& boxOrigin, Docu
mentMarker*, const RenderStyle*, const Font&, bool grammar); |
| 31 void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOrigin, Doc
umentMarker*, RenderStyle*, const Font&); | 31 void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOrigin, Doc
umentMarker*, const RenderStyle*, const Font&); |
| 32 | 32 |
| 33 static void removeFromTextBlobCache(InlineTextBox&); | 33 static void removeFromTextBlobCache(InlineTextBox&); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 void paintCompositionBackgrounds(GraphicsContext*, const FloatPoint& boxOrig
in, RenderStyle*, const Font&, bool useCustomUnderlines); | 36 void paintCompositionBackgrounds(GraphicsContext*, const FloatPoint& boxOrig
in, const RenderStyle*, const Font&, bool useCustomUnderlines); |
| 37 void paintSingleCompositionBackgroundRun(GraphicsContext*, const FloatPoint&
boxOrigin, RenderStyle*, const Font&, Color backgroundColor, int startPos, int
endPos); | 37 void paintSingleCompositionBackgroundRun(GraphicsContext*, const FloatPoint&
boxOrigin, const RenderStyle*, const Font&, Color backgroundColor, int startPos
, int endPos); |
| 38 void paintSelection(GraphicsContext*, const FloatPoint& boxOrigin, RenderSty
le*, const Font&, Color textColor); | 38 void paintSelection(GraphicsContext*, const FloatPoint& boxOrigin, const Ren
derStyle*, const Font&, Color textColor); |
| 39 void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, TextDeco
ration); | 39 void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, TextDeco
ration); |
| 40 void paintCompositionUnderline(GraphicsContext*, const FloatPoint& boxOrigin
, const CompositionUnderline&); | 40 void paintCompositionUnderline(GraphicsContext*, const FloatPoint& boxOrigin
, const CompositionUnderline&); |
| 41 unsigned underlinePaintStart(const CompositionUnderline&); | 41 unsigned underlinePaintStart(const CompositionUnderline&); |
| 42 unsigned underlinePaintEnd(const CompositionUnderline&); | 42 unsigned underlinePaintEnd(const CompositionUnderline&); |
| 43 | 43 |
| 44 InlineTextBox& m_inlineTextBox; | 44 InlineTextBox& m_inlineTextBox; |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 } // namespace blink | 47 } // namespace blink |
| 48 | 48 |
| 49 #endif // InlineTextBoxPainter_h | 49 #endif // InlineTextBoxPainter_h |
| OLD | NEW |