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/style/ComputedStyleConstants.h" | 8 #include "core/style/ComputedStyleConstants.h" |
9 #include "platform/geometry/LayoutRect.h" | 9 #include "platform/geometry/LayoutRect.h" |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 static void removeFromTextBlobCache(InlineTextBox&); | 36 static void removeFromTextBlobCache(InlineTextBox&); |
37 | 37 |
38 private: | 38 private: |
39 enum class PaintOptions { Normal, CombinedText }; | 39 enum class PaintOptions { Normal, CombinedText }; |
40 | 40 |
41 void paintCompositionBackgrounds(GraphicsContext*, const LayoutPoint& boxOri
gin, const ComputedStyle&, const Font&, bool useCustomUnderlines); | 41 void paintCompositionBackgrounds(GraphicsContext*, const LayoutPoint& boxOri
gin, const ComputedStyle&, const Font&, bool useCustomUnderlines); |
42 void paintSingleCompositionBackgroundRun(GraphicsContext*, const LayoutPoint
& boxOrigin, const ComputedStyle&, const Font&, Color backgroundColor, int start
Pos, int endPos); | 42 void paintSingleCompositionBackgroundRun(GraphicsContext*, const LayoutPoint
& boxOrigin, const ComputedStyle&, const Font&, Color backgroundColor, int start
Pos, int endPos); |
43 template <PaintOptions> | 43 template <PaintOptions> |
44 void paintSelection(GraphicsContext*, const LayoutRect& boxRect, const Compu
tedStyle&, const Font&, Color textColor, LayoutTextCombine* = nullptr); | 44 void paintSelection(GraphicsContext*, const LayoutRect& boxRect, const Compu
tedStyle&, const Font&, Color textColor, LayoutTextCombine* = nullptr); |
45 void paintDecoration(GraphicsContext*, const LayoutPoint& boxOrigin, TextDec
oration); | 45 void paintDecoration(const PaintInfo&, const LayoutPoint& boxOrigin, TextDec
oration); |
46 void paintCompositionUnderline(GraphicsContext*, const LayoutPoint& boxOrigi
n, const CompositionUnderline&); | 46 void paintCompositionUnderline(GraphicsContext*, const LayoutPoint& boxOrigi
n, const CompositionUnderline&); |
47 unsigned underlinePaintStart(const CompositionUnderline&); | 47 unsigned underlinePaintStart(const CompositionUnderline&); |
48 unsigned underlinePaintEnd(const CompositionUnderline&); | 48 unsigned underlinePaintEnd(const CompositionUnderline&); |
49 | 49 |
50 InlineTextBox& m_inlineTextBox; | 50 InlineTextBox& m_inlineTextBox; |
51 }; | 51 }; |
52 | 52 |
53 } // namespace blink | 53 } // namespace blink |
54 | 54 |
55 #endif // InlineTextBoxPainter_h | 55 #endif // InlineTextBoxPainter_h |
OLD | NEW |