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

Unified Diff: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.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: Update paintSelectionBackground to use new helper function 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 side-by-side diff with in-line comments
Download patch
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 cc82684429860350af6e2cbe426305e6195ef218..d92dca89bc6ad37e5c6e4ccb61d4df6d4be289ff 100644
--- a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h
+++ b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h
@@ -22,13 +22,20 @@ struct SVGTextFragment;
class TextRun;
class DocumentMarker;
+struct SVGTextFragmentWithRange {
+ const SVGTextFragment* fragment;
fs 2015/12/17 10:10:55 Maybe add a constructor and make this a reference
ramya.v 2015/12/18 03:43:33 Done.
+ int fragmentStartPosition;
fs 2015/12/17 10:10:55 I don't think we need to be quite this verbose. Dr
ramya.v 2015/12/18 03:43:33 Done.
+ int fragmentEndPosition;
+};
+
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&);
+ virtual void paintTextMatchMarkerForeground(const PaintInfo&, const LayoutPoint&, DocumentMarker*, const ComputedStyle&, const Font&);
+ virtual void paintTextMatchMarkerBackground(const PaintInfo&, const LayoutPoint&, DocumentMarker*, const ComputedStyle&, const Font&);
fs 2015/12/17 10:10:55 Why are these virtual?
ramya.v 2015/12/18 03:43:33 Done.
ramya.v 2015/12/18 03:43:33 Since I've split paintTextMatchMarker took these i
private:
bool shouldPaintSelection(const PaintInfo&) const;
@@ -36,6 +43,8 @@ private:
void paintDecoration(const PaintInfo&, TextDecoration, const SVGTextFragment&);
void paintTextWithShadows(const PaintInfo&, const ComputedStyle&, TextRun&, const SVGTextFragment&, int startPosition, int endPosition, LayoutSVGResourceMode);
void paintText(const PaintInfo&, const ComputedStyle&, const ComputedStyle& selectionStyle, const SVGTextFragment&, LayoutSVGResourceMode, bool shouldPaintSelection);
+ Vector<SVGTextFragmentWithRange> collectTextMatches(const PaintInfo&, DocumentMarker*);
+ Vector<SVGTextFragmentWithRange> collectFragments(int startPosition, int endPosition);
const SVGInlineTextBox& m_svgInlineTextBox;
};

Powered by Google App Engine
This is Rietveld 408576698