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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp

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: Addressed comments Created 4 years, 12 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
1 /** 1 /**
2 * Copyright (C) 2007 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 endPosition = std::min(endPosition, static_cast<int>(fragment.length)); 213 endPosition = std::min(endPosition, static_cast<int>(fragment.length));
214 214
215 return startPosition < endPosition; 215 return startPosition < endPosition;
216 } 216 }
217 217
218 void SVGInlineTextBox::paintDocumentMarker(GraphicsContext&, const LayoutPoint&, DocumentMarker*, const ComputedStyle&, const Font&, bool) const 218 void SVGInlineTextBox::paintDocumentMarker(GraphicsContext&, const LayoutPoint&, DocumentMarker*, const ComputedStyle&, const Font&, bool) const
219 { 219 {
220 // SVG does not have support for generic document markers (e.g., spellchecki ng, etc). 220 // SVG does not have support for generic document markers (e.g., spellchecki ng, etc).
221 } 221 }
222 222
223 void SVGInlineTextBox::paintTextMatchMarker(GraphicsContext& context, const Layo utPoint& point, DocumentMarker* marker, const ComputedStyle& style, const Font& font) const 223 void SVGInlineTextBox::paintTextMatchMarkerForeground(const PaintInfo& paintInfo , const LayoutPoint& point, DocumentMarker* marker, const ComputedStyle& style, const Font& font) const
224 { 224 {
225 SVGInlineTextBoxPainter(*this).paintTextMatchMarker(context, point, marker, style, font); 225 SVGInlineTextBoxPainter(*this).paintTextMatchMarkerForeground(paintInfo, poi nt, marker, style, font);
226 }
227
228 void SVGInlineTextBox::paintTextMatchMarkerBackground(const PaintInfo& paintInfo , const LayoutPoint& point, DocumentMarker* marker, const ComputedStyle& style, const Font& font) const
229 {
230 SVGInlineTextBoxPainter(*this).paintTextMatchMarkerBackground(paintInfo, poi nt, marker, style, font);
226 } 231 }
227 232
228 LayoutRect SVGInlineTextBox::calculateBoundaries() const 233 LayoutRect SVGInlineTextBox::calculateBoundaries() const
229 { 234 {
230 LayoutRect textRect; 235 LayoutRect textRect;
231 236
232 LineLayoutSVGInlineText lineLayoutItem = LineLayoutSVGInlineText(this->lineL ayoutItem()); 237 LineLayoutSVGInlineText lineLayoutItem = LineLayoutSVGInlineText(this->lineL ayoutItem());
233 238
234 float scalingFactor = lineLayoutItem.scalingFactor(); 239 float scalingFactor = lineLayoutItem.scalingFactor();
235 ASSERT(scalingFactor); 240 ASSERT(scalingFactor);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 return true; 292 return true;
288 } 293 }
289 } 294 }
290 } 295 }
291 } 296 }
292 } 297 }
293 return false; 298 return false;
294 } 299 }
295 300
296 } // namespace blink 301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698