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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/InlineTextBox.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 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
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 444
445 sPos = std::max(startPos - m_start, 0); 445 sPos = std::max(startPos - m_start, 0);
446 ePos = std::min(endPos - m_start, (int)m_len); 446 ePos = std::min(endPos - m_start, (int)m_len);
447 } 447 }
448 448
449 void InlineTextBox::paintDocumentMarker(GraphicsContext& pt, const LayoutPoint& boxOrigin, DocumentMarker* marker, const ComputedStyle& style, const Font& font, bool grammar) const 449 void InlineTextBox::paintDocumentMarker(GraphicsContext& pt, const LayoutPoint& boxOrigin, DocumentMarker* marker, const ComputedStyle& style, const Font& font, bool grammar) const
450 { 450 {
451 InlineTextBoxPainter(*this).paintDocumentMarker(pt, boxOrigin, marker, style , font, grammar); 451 InlineTextBoxPainter(*this).paintDocumentMarker(pt, boxOrigin, marker, style , font, grammar);
452 } 452 }
453 453
454 void InlineTextBox::paintTextMatchMarker(GraphicsContext& pt, const LayoutPoint& boxOrigin, DocumentMarker* marker, const ComputedStyle& style, const Font& font ) const 454 void InlineTextBox::paintTextMatchMarkerForeground(const PaintInfo& paintInfo, c onst LayoutPoint& boxOrigin, DocumentMarker* marker, const ComputedStyle& style, const Font& font) const
455 { 455 {
456 InlineTextBoxPainter(*this).paintTextMatchMarker(pt, boxOrigin, marker, styl e, font); 456 InlineTextBoxPainter(*this).paintTextMatchMarkerForeground(paintInfo, boxOri gin, marker, style, font);
457 }
458
459 void InlineTextBox::paintTextMatchMarkerBackground(const PaintInfo& paintInfo, c onst LayoutPoint& boxOrigin, DocumentMarker* marker, const ComputedStyle& style, const Font& font) const
460 {
461 InlineTextBoxPainter(*this).paintTextMatchMarkerBackground(paintInfo, boxOri gin, marker, style, font);
457 } 462 }
458 463
459 int InlineTextBox::caretMinOffset() const 464 int InlineTextBox::caretMinOffset() const
460 { 465 {
461 return m_start; 466 return m_start;
462 } 467 }
463 468
464 int InlineTextBox::caretMaxOffset() const 469 int InlineTextBox::caretMaxOffset() const
465 { 470 {
466 return m_start + m_len; 471 return m_start + m_len;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer( )); 631 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer( ));
627 const int layoutObjectCharacterOffset = 75; 632 const int layoutObjectCharacterOffset = 75;
628 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) 633 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++)
629 fputc(' ', stderr); 634 fputc(' ', stderr);
630 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 635 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
631 } 636 }
632 637
633 #endif 638 #endif
634 639
635 } // namespace blink 640 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698