Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: third_party/WebKit/Source/core/paint/InlineTextBoxPainter.h

Issue 2130683002: [Experiment] purge-and-suspend Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 24 matching lines...) Expand all
35 35
36 void paint(const PaintInfo&, const LayoutPoint&); 36 void paint(const PaintInfo&, const LayoutPoint&);
37 void paintDocumentMarkers(const PaintInfo&, const LayoutPoint& boxOrigin, co nst ComputedStyle&, const Font&, DocumentMarkerPaintPhase); 37 void paintDocumentMarkers(const PaintInfo&, const LayoutPoint& boxOrigin, co nst ComputedStyle&, const Font&, DocumentMarkerPaintPhase);
38 void paintDocumentMarker(GraphicsContext&, const LayoutPoint& boxOrigin, Doc umentMarker*, const ComputedStyle&, const Font&, bool grammar); 38 void paintDocumentMarker(GraphicsContext&, const LayoutPoint& boxOrigin, Doc umentMarker*, const ComputedStyle&, const Font&, bool grammar);
39 void paintTextMatchMarkerForeground(const PaintInfo&, const LayoutPoint& box Origin, DocumentMarker*, const ComputedStyle&, const Font&); 39 void paintTextMatchMarkerForeground(const PaintInfo&, const LayoutPoint& box Origin, DocumentMarker*, const ComputedStyle&, const Font&);
40 void paintTextMatchMarkerBackground(const PaintInfo&, const LayoutPoint& box Origin, DocumentMarker*, const ComputedStyle&, const Font&); 40 void paintTextMatchMarkerBackground(const PaintInfo&, const LayoutPoint& box Origin, DocumentMarker*, const ComputedStyle&, const Font&);
41 41
42 static void removeFromTextBlobCache(const InlineTextBox&); 42 static void removeFromTextBlobCache(const InlineTextBox&);
43 static bool paintsMarkerHighlights(const LayoutObject&); 43 static bool paintsMarkerHighlights(const LayoutObject&);
44 44
45
46 static void invalidateTextBlobCache();
47
45 private: 48 private:
46 enum class PaintOptions { Normal, CombinedText }; 49 enum class PaintOptions { Normal, CombinedText };
47 50
48 void paintCompositionBackgrounds(GraphicsContext&, const LayoutPoint& boxOri gin, const ComputedStyle&, const Font&, bool useCustomUnderlines); 51 void paintCompositionBackgrounds(GraphicsContext&, const LayoutPoint& boxOri gin, const ComputedStyle&, const Font&, bool useCustomUnderlines);
49 void paintSingleCompositionBackgroundRun(GraphicsContext&, const LayoutPoint & boxOrigin, const ComputedStyle&, const Font&, Color backgroundColor, int start Pos, int endPos); 52 void paintSingleCompositionBackgroundRun(GraphicsContext&, const LayoutPoint & boxOrigin, const ComputedStyle&, const Font&, Color backgroundColor, int start Pos, int endPos);
50 template <PaintOptions> 53 template <PaintOptions>
51 void paintSelection(GraphicsContext&, const LayoutRect& boxRect, const Compu tedStyle&, const Font&, Color textColor, LayoutTextCombine* = nullptr); 54 void paintSelection(GraphicsContext&, const LayoutRect& boxRect, const Compu tedStyle&, const Font&, Color textColor, LayoutTextCombine* = nullptr);
52 void paintDecoration(const PaintInfo&, const LayoutPoint& boxOrigin, TextDec oration); 55 void paintDecoration(const PaintInfo&, const LayoutPoint& boxOrigin, TextDec oration);
53 void paintCompositionUnderline(GraphicsContext&, const LayoutPoint& boxOrigi n, const CompositionUnderline&); 56 void paintCompositionUnderline(GraphicsContext&, const LayoutPoint& boxOrigi n, const CompositionUnderline&);
54 unsigned underlinePaintStart(const CompositionUnderline&); 57 unsigned underlinePaintStart(const CompositionUnderline&);
55 unsigned underlinePaintEnd(const CompositionUnderline&); 58 unsigned underlinePaintEnd(const CompositionUnderline&);
56 bool shouldPaintTextBox(const PaintInfo&); 59 bool shouldPaintTextBox(const PaintInfo&);
57 void expandToIncludeNewlineForSelection(LayoutRect&); 60 void expandToIncludeNewlineForSelection(LayoutRect&);
58 61
59 const InlineTextBox& m_inlineTextBox; 62 const InlineTextBox& m_inlineTextBox;
60 }; 63 };
61 64
62 } // namespace blink 65 } // namespace blink
63 66
64 #endif // InlineTextBoxPainter_h 67 #endif // InlineTextBoxPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698