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

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

Issue 620243002: Move painting code from InlineTextBox to InlineTextBoxPainter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Finished. Created 6 years, 2 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
(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 class Color;
13 struct CompositionUnderline;
14 class DocumentMarker;
15 class FloatPoint;
16 class Font;
17 class GraphicsContext;
18 struct PaintInfo;
jbroman 2014/10/03 17:46:17 forward declaration sort order
chrishtr 2014/10/03 18:10:37 Done.
jbroman 2014/10/03 18:18:26 Hmm, I'd either expect this to be sorted with the
chrishtr 2014/10/03 18:37:46 Fixed.
19 class LayoutPoint;
20 class InlineTextBox;
21 class RenderStyle;
22
23 class InlineTextBoxPainter {
24 public:
25 InlineTextBoxPainter(InlineTextBox& inlineTextBox) : m_inlineTextBox(inlineT extBox) { }
jbroman 2014/10/03 17:46:17 nit: Any reason this is a non-const ref? There are
chrishtr 2014/10/03 18:10:37 const-ness is not preserved on some RenderObject m
26
27 void paint(PaintInfo&, const LayoutPoint&);
28 void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, Ren derStyle*, const Font&, bool background);
29 void paintDocumentMarker(GraphicsContext*, const FloatPoint& boxOrigin, Docu mentMarker*, RenderStyle*, const Font&, bool grammar);
30 void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOrigin, Doc umentMarker*, RenderStyle*, const Font&);
31
32 private:
33 void paintCompositionBackgrounds(GraphicsContext*, const FloatPoint& boxOrig in, RenderStyle*, const Font&, bool useCustomUnderlines);
34 void paintSingleCompositionBackgroundRun(GraphicsContext*, const FloatPoint& boxOrigin, RenderStyle*, const Font&, Color backgroundColor, int startPos, int endPos);
35 void paintSelection(GraphicsContext*, const FloatPoint& boxOrigin, RenderSty le*, const Font&, Color textColor);
36 void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, TextDeco ration);
37 void paintCompositionUnderline(GraphicsContext*, const FloatPoint& boxOrigin , const CompositionUnderline&);
38 unsigned underlinePaintStart(const CompositionUnderline&);
39 unsigned underlinePaintEnd(const CompositionUnderline&);
40
41 InlineTextBox& m_inlineTextBox;
42 };
43
44 } // namespace blink
45
46 #endif // InlineTextBoxPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698