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

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

Issue 1530853002: Split up text painting code into separate functions to setup paint and then paint text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per review comments 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SVGInlineTextBoxPainter_h 5 #ifndef SVGInlineTextBoxPainter_h
6 #define SVGInlineTextBoxPainter_h 6 #define SVGInlineTextBoxPainter_h
7 7
8 #include "core/style/ComputedStyleConstants.h" 8 #include "core/style/ComputedStyleConstants.h"
9 #include "core/layout/svg/LayoutSVGResourcePaintServer.h" 9 #include "core/layout/svg/LayoutSVGResourcePaintServer.h"
10 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.h"
(...skipping 16 matching lines...) Expand all
27 public: 27 public:
28 SVGInlineTextBoxPainter(const SVGInlineTextBox& svgInlineTextBox) : m_svgInl ineTextBox(svgInlineTextBox) { } 28 SVGInlineTextBoxPainter(const SVGInlineTextBox& svgInlineTextBox) : m_svgInl ineTextBox(svgInlineTextBox) { }
29 void paint(const PaintInfo&, const LayoutPoint&); 29 void paint(const PaintInfo&, const LayoutPoint&);
30 void paintSelectionBackground(const PaintInfo&); 30 void paintSelectionBackground(const PaintInfo&);
31 virtual void paintTextMatchMarker(GraphicsContext&, const LayoutPoint&, Docu mentMarker*, const ComputedStyle&, const Font&); 31 virtual void paintTextMatchMarker(GraphicsContext&, const LayoutPoint&, Docu mentMarker*, const ComputedStyle&, const Font&);
32 32
33 private: 33 private:
34 bool shouldPaintSelection(const PaintInfo&) const; 34 bool shouldPaintSelection(const PaintInfo&) const;
35 void paintTextFragments(const PaintInfo&, LayoutObject&); 35 void paintTextFragments(const PaintInfo&, LayoutObject&);
36 void paintDecoration(const PaintInfo&, TextDecoration, const SVGTextFragment &); 36 void paintDecoration(const PaintInfo&, TextDecoration, const SVGTextFragment &);
37 void paintTextWithShadows(const PaintInfo&, const ComputedStyle&, TextRun&, const SVGTextFragment&, int startPosition, int endPosition, LayoutSVGResourceMod e); 37 bool setupTextPaint(const PaintInfo&, const ComputedStyle&, LayoutSVGResourc eMode, SkPaint&);
38 void paintText(const PaintInfo&, TextRun&, const SVGTextFragment&, int start Position, int endPosition, const SkPaint&);
38 void paintText(const PaintInfo&, const ComputedStyle&, const ComputedStyle& selectionStyle, const SVGTextFragment&, LayoutSVGResourceMode, bool shouldPaintS election); 39 void paintText(const PaintInfo&, const ComputedStyle&, const ComputedStyle& selectionStyle, const SVGTextFragment&, LayoutSVGResourceMode, bool shouldPaintS election);
39 40
40 const SVGInlineTextBox& m_svgInlineTextBox; 41 const SVGInlineTextBox& m_svgInlineTextBox;
41 }; 42 };
42 43
43 } // namespace blink 44 } // namespace blink
44 45
45 #endif // SVGInlineTextBoxPainter_h 46 #endif // SVGInlineTextBoxPainter_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698