OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) | 6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 if (type == AlphabeticSequence) { | 104 if (type == AlphabeticSequence) { |
105 while ((numberShadow /= sequenceSize) > 0) { | 105 while ((numberShadow /= sequenceSize) > 0) { |
106 --numberShadow; | 106 --numberShadow; |
107 letters[lettersSize - ++length] = sequence[numberShadow % sequenceSi
ze]; | 107 letters[lettersSize - ++length] = sequence[numberShadow % sequenceSi
ze]; |
108 } | 108 } |
109 } else { | 109 } else { |
110 while ((numberShadow /= sequenceSize) > 0) | 110 while ((numberShadow /= sequenceSize) > 0) |
111 letters[lettersSize - ++length] = sequence[numberShadow % sequenceSi
ze]; | 111 letters[lettersSize - ++length] = sequence[numberShadow % sequenceSi
ze]; |
112 } | 112 } |
113 if (isNegativeNumber) | 113 if (isNegativeNumber) |
114 letters[lettersSize - ++length] = hyphenMinus; | 114 letters[lettersSize - ++length] = hyphenMinusCharacter; |
115 | 115 |
116 ASSERT(length <= lettersSize); | 116 ASSERT(length <= lettersSize); |
117 return String(&letters[lettersSize - length], length); | 117 return String(&letters[lettersSize - length], length); |
118 } | 118 } |
119 | 119 |
120 template <typename CharacterType> | 120 template <typename CharacterType> |
121 static String toSymbolic(int number, const CharacterType* symbols, unsigned symb
olsSize) | 121 static String toSymbolic(int number, const CharacterType* symbols, unsigned symb
olsSize) |
122 { | 122 { |
123 ASSERT(number > 0); | 123 ASSERT(number > 0); |
124 ASSERT(symbolsSize >= 1); | 124 ASSERT(symbolsSize >= 1); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 case EthiopicHalehameTiEt: | 534 case EthiopicHalehameTiEt: |
535 case EthiopicHalehameTig: | 535 case EthiopicHalehameTig: |
536 case Oromo: | 536 case Oromo: |
537 case Sidama: | 537 case Sidama: |
538 case Somali: | 538 case Somali: |
539 case Tigre: | 539 case Tigre: |
540 case TigrinyaEr: | 540 case TigrinyaEr: |
541 case TigrinyaErAbegede: | 541 case TigrinyaErAbegede: |
542 case TigrinyaEt: | 542 case TigrinyaEt: |
543 case TigrinyaEtAbegede: | 543 case TigrinyaEtAbegede: |
544 return ethiopicPrefaceColon; | 544 return ethiopicPrefaceColonCharacter; |
545 case Armenian: | 545 case Armenian: |
546 case ArabicIndic: | 546 case ArabicIndic: |
547 case Bengali: | 547 case Bengali: |
548 case BinaryListStyle: | 548 case BinaryListStyle: |
549 case Cambodian: | 549 case Cambodian: |
550 case CJKIdeographic: | 550 case CJKIdeographic: |
551 case CjkEarthlyBranch: | 551 case CjkEarthlyBranch: |
552 case CjkHeavenlyStem: | 552 case CjkHeavenlyStem: |
553 case DecimalLeadingZero: | 553 case DecimalLeadingZero: |
554 case DecimalListStyle: | 554 case DecimalListStyle: |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 | 607 |
608 case Asterisks: { | 608 case Asterisks: { |
609 static const LChar asterisksSymbols[1] = { | 609 static const LChar asterisksSymbols[1] = { |
610 0x2A | 610 0x2A |
611 }; | 611 }; |
612 return toSymbolic(value, asterisksSymbols); | 612 return toSymbolic(value, asterisksSymbols); |
613 } | 613 } |
614 // We use the same characters for text security. | 614 // We use the same characters for text security. |
615 // See LayoutText::setInternalString. | 615 // See LayoutText::setInternalString. |
616 case Circle: | 616 case Circle: |
617 return String(&whiteBullet, 1); | 617 return String(&whiteBulletCharacter, 1); |
618 case Disc: | 618 case Disc: |
619 return String(&bullet, 1); | 619 return String(&bulletCharacter, 1); |
620 case Footnotes: { | 620 case Footnotes: { |
621 static const UChar footnotesSymbols[4] = { | 621 static const UChar footnotesSymbols[4] = { |
622 0x002A, 0x2051, 0x2020, 0x2021 | 622 0x002A, 0x2051, 0x2020, 0x2021 |
623 }; | 623 }; |
624 return toSymbolic(value, footnotesSymbols); | 624 return toSymbolic(value, footnotesSymbols); |
625 } | 625 } |
626 case Square: | 626 case Square: |
627 // The CSS 2.1 test suite uses U+25EE BLACK MEDIUM SMALL SQUARE | 627 // The CSS 2.1 test suite uses U+25EE BLACK MEDIUM SMALL SQUARE |
628 // instead, but I think this looks better. | 628 // instead, but I think this looks better. |
629 return String(&blackSquare, 1); | 629 return String(&blackSquareCharacter, 1); |
630 | 630 |
631 case DecimalListStyle: | 631 case DecimalListStyle: |
632 return String::number(value); | 632 return String::number(value); |
633 case DecimalLeadingZero: | 633 case DecimalLeadingZero: |
634 if (value < -9 || value > 9) | 634 if (value < -9 || value > 9) |
635 return String::number(value); | 635 return String::number(value); |
636 if (value < 0) | 636 if (value < 0) |
637 return "-0" + String::number(-value); // -01 to -09 | 637 return "-0" + String::number(-value); // -01 to -09 |
638 return "0" + String::number(value); // 00 to 09 | 638 return "0" + String::number(value); // 00 to 09 |
639 | 639 |
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1643 if (style()) { | 1643 if (style()) { |
1644 // Reuse the current margins. Otherwise resetting the margins to initial
values | 1644 // Reuse the current margins. Otherwise resetting the margins to initial
values |
1645 // would trigger unnecessary layout. | 1645 // would trigger unnecessary layout. |
1646 newStyle->setMarginStart(style()->marginStart()); | 1646 newStyle->setMarginStart(style()->marginStart()); |
1647 newStyle->setMarginEnd(style()->marginRight()); | 1647 newStyle->setMarginEnd(style()->marginRight()); |
1648 } | 1648 } |
1649 setStyle(newStyle.release()); | 1649 setStyle(newStyle.release()); |
1650 } | 1650 } |
1651 | 1651 |
1652 } // namespace blink | 1652 } // namespace blink |
OLD | NEW |