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

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

Issue 2780313002: [WIP] Refactor DocumentMarker (Closed)
Patch Set: Move accessor methods into derived classes Created 3 years, 8 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 * (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. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 void InlineTextBox::paintDocumentMarker(GraphicsContext& pt, 514 void InlineTextBox::paintDocumentMarker(GraphicsContext& pt,
515 const LayoutPoint& boxOrigin, 515 const LayoutPoint& boxOrigin,
516 const DocumentMarker& marker, 516 const DocumentMarker& marker,
517 const ComputedStyle& style, 517 const ComputedStyle& style,
518 const Font& font, 518 const Font& font,
519 bool grammar) const { 519 bool grammar) const {
520 InlineTextBoxPainter(*this).paintDocumentMarker(pt, boxOrigin, marker, style, 520 InlineTextBoxPainter(*this).paintDocumentMarker(pt, boxOrigin, marker, style,
521 font, grammar); 521 font, grammar);
522 } 522 }
523 523
524 void InlineTextBox::paintTextMatchMarkerForeground(const PaintInfo& paintInfo, 524 void InlineTextBox::paintTextMatchMarkerForeground(
525 const LayoutPoint& boxOrigin, 525 const PaintInfo& paintInfo,
526 const DocumentMarker& marker, 526 const LayoutPoint& boxOrigin,
527 const ComputedStyle& style, 527 const TextMatchMarker& marker,
528 const Font& font) const { 528 const ComputedStyle& style,
529 const Font& font) const {
529 InlineTextBoxPainter(*this).paintTextMatchMarkerForeground( 530 InlineTextBoxPainter(*this).paintTextMatchMarkerForeground(
530 paintInfo, boxOrigin, marker, style, font); 531 paintInfo, boxOrigin, marker, style, font);
531 } 532 }
532 533
533 void InlineTextBox::paintTextMatchMarkerBackground(const PaintInfo& paintInfo, 534 void InlineTextBox::paintTextMatchMarkerBackground(
534 const LayoutPoint& boxOrigin, 535 const PaintInfo& paintInfo,
535 const DocumentMarker& marker, 536 const LayoutPoint& boxOrigin,
536 const ComputedStyle& style, 537 const TextMatchMarker& marker,
537 const Font& font) const { 538 const ComputedStyle& style,
539 const Font& font) const {
538 InlineTextBoxPainter(*this).paintTextMatchMarkerBackground( 540 InlineTextBoxPainter(*this).paintTextMatchMarkerBackground(
539 paintInfo, boxOrigin, marker, style, font); 541 paintInfo, boxOrigin, marker, style, font);
540 } 542 }
541 543
542 int InlineTextBox::caretMinOffset() const { 544 int InlineTextBox::caretMinOffset() const {
543 return m_start; 545 return m_start;
544 } 546 }
545 547
546 int InlineTextBox::caretMaxOffset() const { 548 int InlineTextBox::caretMaxOffset() const {
547 return m_start + m_len; 549 return m_start + m_len;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 const int layoutObjectCharacterOffset = 75; 719 const int layoutObjectCharacterOffset = 75;
718 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) 720 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++)
719 fputc(' ', stderr); 721 fputc(' ', stderr);
720 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), 722 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(),
721 value.utf8().data()); 723 value.utf8().data());
722 } 724 }
723 725
724 #endif 726 #endif
725 727
726 } // namespace blink 728 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698