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