| 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 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 struct CompositionUnderline; | 14 struct CompositionUnderline; |
| 15 struct PaintInfo; | 15 struct PaintInfo; |
| 16 | 16 |
| 17 class AppliedTextDecoration; |
| 17 class Color; | 18 class Color; |
| 18 class ComputedStyle; | 19 class ComputedStyle; |
| 19 class DocumentMarker; | 20 class DocumentMarker; |
| 20 class FloatPoint; | 21 class FloatPoint; |
| 21 class FloatRect; | 22 class FloatRect; |
| 22 class Font; | 23 class Font; |
| 23 class GraphicsContext; | 24 class GraphicsContext; |
| 24 class InlineTextBox; | 25 class InlineTextBox; |
| 25 class LayoutPoint; | 26 class LayoutPoint; |
| 26 class LayoutTextCombine; | 27 class LayoutTextCombine; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 37 | 38 |
| 38 static void removeFromTextBlobCache(InlineTextBox&); | 39 static void removeFromTextBlobCache(InlineTextBox&); |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 enum class PaintOptions { Normal, CombinedText }; | 42 enum class PaintOptions { Normal, CombinedText }; |
| 42 | 43 |
| 43 void paintCompositionBackgrounds(GraphicsContext*, const LayoutPoint& boxOri
gin, const ComputedStyle&, const Font&, bool useCustomUnderlines); | 44 void paintCompositionBackgrounds(GraphicsContext*, const LayoutPoint& boxOri
gin, const ComputedStyle&, const Font&, bool useCustomUnderlines); |
| 44 void paintSingleCompositionBackgroundRun(GraphicsContext*, const LayoutPoint
& boxOrigin, const ComputedStyle&, const Font&, Color backgroundColor, int start
Pos, int endPos); | 45 void paintSingleCompositionBackgroundRun(GraphicsContext*, const LayoutPoint
& boxOrigin, const ComputedStyle&, const Font&, Color backgroundColor, int start
Pos, int endPos); |
| 45 template <PaintOptions> | 46 template <PaintOptions> |
| 46 void paintSelection(GraphicsContext*, const LayoutRect& boxRect, const Compu
tedStyle&, const Font&, Color textColor, LayoutTextCombine* = nullptr); | 47 void paintSelection(GraphicsContext*, const LayoutRect& boxRect, const Compu
tedStyle&, const Font&, Color textColor, LayoutTextCombine* = nullptr); |
| 47 void paintDecoration(const PaintInfo&, const LayoutPoint& boxOrigin, TextDec
oration); | 48 void paintDecorations(const PaintInfo&, const LayoutPoint& boxOrigin, const
Vector<AppliedTextDecoration>& decorations); |
| 48 void paintCompositionUnderline(GraphicsContext*, const LayoutPoint& boxOrigi
n, const CompositionUnderline&); | 49 void paintCompositionUnderline(GraphicsContext*, const LayoutPoint& boxOrigi
n, const CompositionUnderline&); |
| 49 unsigned underlinePaintStart(const CompositionUnderline&); | 50 unsigned underlinePaintStart(const CompositionUnderline&); |
| 50 unsigned underlinePaintEnd(const CompositionUnderline&); | 51 unsigned underlinePaintEnd(const CompositionUnderline&); |
| 51 bool shouldPaintTextBox(const PaintInfo&); | 52 bool shouldPaintTextBox(const PaintInfo&); |
| 52 void expandToIncludeNewlineForSelection(LayoutRect&); | 53 void expandToIncludeNewlineForSelection(LayoutRect&); |
| 53 | 54 |
| 54 InlineTextBox& m_inlineTextBox; | 55 InlineTextBox& m_inlineTextBox; |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 } // namespace blink | 58 } // namespace blink |
| 58 | 59 |
| 59 #endif // InlineTextBoxPainter_h | 60 #endif // InlineTextBoxPainter_h |
| OLD | NEW |