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

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

Issue 1468913002: Find In Page hides the text when text color matches text search hightlight color. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added testcase Created 5 years 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 15 matching lines...) Expand all
26 class LayoutTextCombine; 26 class LayoutTextCombine;
27 27
28 class InlineTextBoxPainter { 28 class InlineTextBoxPainter {
29 STACK_ALLOCATED(); 29 STACK_ALLOCATED();
30 public: 30 public:
31 InlineTextBoxPainter(const InlineTextBox& inlineTextBox) : m_inlineTextBox(i nlineTextBox) { } 31 InlineTextBoxPainter(const InlineTextBox& inlineTextBox) : m_inlineTextBox(i nlineTextBox) { }
32 32
33 void paint(const PaintInfo&, const LayoutPoint&); 33 void paint(const PaintInfo&, const LayoutPoint&);
34 void paintDocumentMarkers(GraphicsContext*, const LayoutPoint& boxOrigin, co nst ComputedStyle&, const Font&, bool background); 34 void paintDocumentMarkers(GraphicsContext*, const LayoutPoint& boxOrigin, co nst ComputedStyle&, const Font&, bool background);
35 void paintDocumentMarker(GraphicsContext*, const LayoutPoint& boxOrigin, Doc umentMarker*, const ComputedStyle&, const Font&, bool grammar); 35 void paintDocumentMarker(GraphicsContext*, const LayoutPoint& boxOrigin, Doc umentMarker*, const ComputedStyle&, const Font&, bool grammar);
36 void paintTextMatchMarker(GraphicsContext*, const LayoutPoint& boxOrigin, Do cumentMarker*, const ComputedStyle&, const Font&); 36 void paintTextMatchMarker(GraphicsContext*, const LayoutPoint& boxOrigin, Do cumentMarker*, const ComputedStyle&, const Font&, bool = true);
rwlbuis 2015/11/30 15:39:52 You'll need a descriptive variable name here, or a
ramya.v 2015/12/01 03:52:41 Done.
37 37
38 static void removeFromTextBlobCache(const InlineTextBox&); 38 static void removeFromTextBlobCache(const InlineTextBox&);
39 39
40 private: 40 private:
41 enum class PaintOptions { Normal, CombinedText }; 41 enum class PaintOptions { Normal, CombinedText };
42 42
43 void paintCompositionBackgrounds(GraphicsContext*, const LayoutPoint& boxOri gin, const ComputedStyle&, const Font&, bool useCustomUnderlines); 43 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); 44 void paintSingleCompositionBackgroundRun(GraphicsContext*, const LayoutPoint & boxOrigin, const ComputedStyle&, const Font&, Color backgroundColor, int start Pos, int endPos);
45 template <PaintOptions> 45 template <PaintOptions>
46 void paintSelection(GraphicsContext*, const LayoutRect& boxRect, const Compu tedStyle&, const Font&, Color textColor, LayoutTextCombine* = nullptr); 46 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); 47 void paintDecoration(const PaintInfo&, const LayoutPoint& boxOrigin, TextDec oration);
48 void paintCompositionUnderline(GraphicsContext*, const LayoutPoint& boxOrigi n, const CompositionUnderline&); 48 void paintCompositionUnderline(GraphicsContext*, const LayoutPoint& boxOrigi n, const CompositionUnderline&);
49 unsigned underlinePaintStart(const CompositionUnderline&); 49 unsigned underlinePaintStart(const CompositionUnderline&);
50 unsigned underlinePaintEnd(const CompositionUnderline&); 50 unsigned underlinePaintEnd(const CompositionUnderline&);
51 bool shouldPaintTextBox(const PaintInfo&); 51 bool shouldPaintTextBox(const PaintInfo&);
52 void expandToIncludeNewlineForSelection(LayoutRect&); 52 void expandToIncludeNewlineForSelection(LayoutRect&);
53 53
54 const InlineTextBox& m_inlineTextBox; 54 const InlineTextBox& m_inlineTextBox;
55 }; 55 };
56 56
57 } // namespace blink 57 } // namespace blink
58 58
59 #endif // InlineTextBoxPainter_h 59 #endif // InlineTextBoxPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698