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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 hyphenString.length()); | 632 hyphenString.length()); |
633 charactersWithHyphen->append(string); | 633 charactersWithHyphen->append(string); |
634 charactersWithHyphen->append(hyphenString); | 634 charactersWithHyphen->append(hyphenString); |
635 string = charactersWithHyphen->toString(); | 635 string = charactersWithHyphen->toString(); |
636 maximumLength = string.length(); | 636 maximumLength = string.length(); |
637 } | 637 } |
638 | 638 |
639 ASSERT(maximumLength >= static_cast<int>(string.length())); | 639 ASSERT(maximumLength >= static_cast<int>(string.length())); |
640 | 640 |
641 TextRun run(string, textPos().toFloat(), expansion(), expansionBehavior(), | 641 TextRun run(string, textPos().toFloat(), expansion(), expansionBehavior(), |
642 direction(), dirOverride() || style.rtlOrdering() == VisualOrder); | 642 direction(), |
| 643 dirOverride() || style.rtlOrdering() == EOrder::Visual); |
643 run.setTabSize(!style.collapseWhiteSpace(), style.getTabSize()); | 644 run.setTabSize(!style.collapseWhiteSpace(), style.getTabSize()); |
644 run.setTextJustify(style.getTextJustify()); | 645 run.setTextJustify(style.getTextJustify()); |
645 | 646 |
646 // Propagate the maximum length of the characters buffer to the TextRun, even | 647 // Propagate the maximum length of the characters buffer to the TextRun, even |
647 // when we're only processing a substring. | 648 // when we're only processing a substring. |
648 run.setCharactersLength(maximumLength); | 649 run.setCharactersLength(maximumLength); |
649 ASSERT(run.charactersLength() >= run.length()); | 650 ASSERT(run.charactersLength() >= run.length()); |
650 return run; | 651 return run; |
651 } | 652 } |
652 | 653 |
(...skipping 29 matching lines...) Expand all Loading... |
682 const int layoutObjectCharacterOffset = 75; | 683 const int layoutObjectCharacterOffset = 75; |
683 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) | 684 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) |
684 fputc(' ', stderr); | 685 fputc(' ', stderr); |
685 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), | 686 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), |
686 value.utf8().data()); | 687 value.utf8().data()); |
687 } | 688 } |
688 | 689 |
689 #endif | 690 #endif |
690 | 691 |
691 } // namespace blink | 692 } // namespace blink |
OLD | NEW |