OLD | NEW |
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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 else if (getLineLayoutItem().getSelectionState() == SelectionEnd) | 477 else if (getLineLayoutItem().getSelectionState() == SelectionEnd) |
478 startPos = 0; | 478 startPos = 0; |
479 } | 479 } |
480 | 480 |
481 sPos = std::max(startPos - m_start, 0); | 481 sPos = std::max(startPos - m_start, 0); |
482 ePos = std::min(endPos - m_start, (int)m_len); | 482 ePos = std::min(endPos - m_start, (int)m_len); |
483 } | 483 } |
484 | 484 |
485 void InlineTextBox::paintDocumentMarker(GraphicsContext& pt, | 485 void InlineTextBox::paintDocumentMarker(GraphicsContext& pt, |
486 const LayoutPoint& boxOrigin, | 486 const LayoutPoint& boxOrigin, |
487 DocumentMarker* marker, | 487 const DocumentMarker& marker, |
488 const ComputedStyle& style, | 488 const ComputedStyle& style, |
489 const Font& font, | 489 const Font& font, |
490 bool grammar) const { | 490 bool grammar) const { |
491 InlineTextBoxPainter(*this).paintDocumentMarker(pt, boxOrigin, marker, style, | 491 InlineTextBoxPainter(*this).paintDocumentMarker(pt, boxOrigin, marker, style, |
492 font, grammar); | 492 font, grammar); |
493 } | 493 } |
494 | 494 |
495 void InlineTextBox::paintTextMatchMarkerForeground(const PaintInfo& paintInfo, | 495 void InlineTextBox::paintTextMatchMarkerForeground(const PaintInfo& paintInfo, |
496 const LayoutPoint& boxOrigin, | 496 const LayoutPoint& boxOrigin, |
497 DocumentMarker* marker, | 497 const DocumentMarker& marker, |
498 const ComputedStyle& style, | 498 const ComputedStyle& style, |
499 const Font& font) const { | 499 const Font& font) const { |
500 InlineTextBoxPainter(*this).paintTextMatchMarkerForeground( | 500 InlineTextBoxPainter(*this).paintTextMatchMarkerForeground( |
501 paintInfo, boxOrigin, marker, style, font); | 501 paintInfo, boxOrigin, marker, style, font); |
502 } | 502 } |
503 | 503 |
504 void InlineTextBox::paintTextMatchMarkerBackground(const PaintInfo& paintInfo, | 504 void InlineTextBox::paintTextMatchMarkerBackground(const PaintInfo& paintInfo, |
505 const LayoutPoint& boxOrigin, | 505 const LayoutPoint& boxOrigin, |
506 DocumentMarker* marker, | 506 const DocumentMarker& marker, |
507 const ComputedStyle& style, | 507 const ComputedStyle& style, |
508 const Font& font) const { | 508 const Font& font) const { |
509 InlineTextBoxPainter(*this).paintTextMatchMarkerBackground( | 509 InlineTextBoxPainter(*this).paintTextMatchMarkerBackground( |
510 paintInfo, boxOrigin, marker, style, font); | 510 paintInfo, boxOrigin, marker, style, font); |
511 } | 511 } |
512 | 512 |
513 int InlineTextBox::caretMinOffset() const { | 513 int InlineTextBox::caretMinOffset() const { |
514 return m_start; | 514 return m_start; |
515 } | 515 } |
516 | 516 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 const int layoutObjectCharacterOffset = 75; | 688 const int layoutObjectCharacterOffset = 75; |
689 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) | 689 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) |
690 fputc(' ', stderr); | 690 fputc(' ', stderr); |
691 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), | 691 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), |
692 value.utf8().data()); | 692 value.utf8().data()); |
693 } | 693 } |
694 | 694 |
695 #endif | 695 #endif |
696 | 696 |
697 } // namespace blink | 697 } // namespace blink |
OLD | NEW |