| 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. 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 String InlineTextBox::debugName() const | 600 String InlineTextBox::debugName() const |
| 601 { | 601 { |
| 602 return String(boxName()) + " '" + text() + "'"; | 602 return String(boxName()) + " '" + text() + "'"; |
| 603 } | 603 } |
| 604 | 604 |
| 605 String InlineTextBox::text() const | 605 String InlineTextBox::text() const |
| 606 { | 606 { |
| 607 return getLineLayoutItem().text().substring(start(), len()); | 607 return getLineLayoutItem().text().substring(start(), len()); |
| 608 } | 608 } |
| 609 | 609 |
| 610 void InlineTextBox::transformText() |
| 611 { |
| 612 getLineLayoutItem().applyTextTransformFromTo(start(), len(), getLineLayoutIt
em().style(isFirstLineStyle())); |
| 613 } |
| 614 |
| 610 #ifndef NDEBUG | 615 #ifndef NDEBUG |
| 611 | 616 |
| 612 void InlineTextBox::showBox(int printedCharacters) const | 617 void InlineTextBox::showBox(int printedCharacters) const |
| 613 { | 618 { |
| 614 String value = text(); | 619 String value = text(); |
| 615 value.replace('\\', "\\\\"); | 620 value.replace('\\', "\\\\"); |
| 616 value.replace('\n', "\\n"); | 621 value.replace('\n', "\\n"); |
| 617 printedCharacters += fprintf(stderr, "%s %p", boxName(), this); | 622 printedCharacters += fprintf(stderr, "%s %p", boxName(), this); |
| 618 for (; printedCharacters < showTreeCharacterOffset; printedCharacters++) | 623 for (; printedCharacters < showTreeCharacterOffset; printedCharacters++) |
| 619 fputc(' ', stderr); | 624 fputc(' ', stderr); |
| 620 const LineLayoutText obj = getLineLayoutItem(); | 625 const LineLayoutText obj = getLineLayoutItem(); |
| 621 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer(
)); | 626 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer(
)); |
| 622 const int layoutObjectCharacterOffset = 75; | 627 const int layoutObjectCharacterOffset = 75; |
| 623 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) | 628 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) |
| 624 fputc(' ', stderr); | 629 fputc(' ', stderr); |
| 625 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 630 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
| 626 } | 631 } |
| 627 | 632 |
| 628 #endif | 633 #endif |
| 629 | 634 |
| 630 } // namespace blink | 635 } // namespace blink |
| OLD | NEW |