Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h |
| diff --git a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h |
| index 8e2e09bf32faebfd888c9ff89f3bdefe9f7aa539..fa8c3160187842518c6ed556d30fba209405a6a3 100644 |
| --- a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h |
| +++ b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h |
| @@ -22,13 +22,26 @@ struct SVGTextFragment; |
| class TextRun; |
| class DocumentMarker; |
| +struct SVGTextFragmentWithRange { |
| + SVGTextFragmentWithRange(const SVGTextFragment& fragment, int startPosition, int endPosition) |
| + : fragment(fragment) |
| + , startPosition(startPosition) |
| + , endPosition(endPosition) |
| + { |
| + } |
| + const SVGTextFragment& fragment; |
| + int startPosition; |
| + int endPosition; |
| +}; |
| + |
| class SVGInlineTextBoxPainter { |
| STACK_ALLOCATED(); |
| public: |
| SVGInlineTextBoxPainter(const SVGInlineTextBox& svgInlineTextBox) : m_svgInlineTextBox(svgInlineTextBox) { } |
| void paint(const PaintInfo&, const LayoutPoint&); |
| void paintSelectionBackground(const PaintInfo&); |
| - virtual void paintTextMatchMarker(GraphicsContext&, const LayoutPoint&, DocumentMarker*, const ComputedStyle&, const Font&); |
| + void paintTextMatchMarkerForeground(const PaintInfo&, const LayoutPoint&, DocumentMarker*, const ComputedStyle&, const Font&); |
| + void paintTextMatchMarkerBackground(const PaintInfo&, const LayoutPoint&, DocumentMarker*, const ComputedStyle&, const Font&); |
| private: |
| bool shouldPaintSelection(const PaintInfo&) const; |
| @@ -37,6 +50,8 @@ private: |
| bool setupTextPaint(const PaintInfo&, const ComputedStyle&, LayoutSVGResourceMode, SkPaint&); |
| void paintText(const PaintInfo&, TextRun&, const SVGTextFragment&, int startPosition, int endPosition, const SkPaint&); |
| void paintText(const PaintInfo&, const ComputedStyle&, const ComputedStyle& selectionStyle, const SVGTextFragment&, LayoutSVGResourceMode, bool shouldPaintSelection); |
| + Vector<SVGTextFragmentWithRange> collectTextMatches(const PaintInfo&, DocumentMarker*); |
|
pdr.
2015/12/19 02:39:45
Nit: const
ramya.v
2015/12/21 08:13:50
Done.
fs
2015/12/21 12:00:01
I would've thought that pdr meant for the method t
ramya.v
2015/12/21 13:01:56
Done.
|
| + Vector<SVGTextFragmentWithRange> collectFragmentsInRange(int startPosition, int endPosition); |
|
pdr.
2015/12/19 02:39:45
Nit2: const
ramya.v
2015/12/21 08:13:50
Done.
|
| const SVGInlineTextBox& m_svgInlineTextBox; |
| }; |