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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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 * 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 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights
5 * reserved. 5 * reserved.
6 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 6 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
7 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) 7 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 characters[length - 1] == ' ') 455 characters[length - 1] == ' ')
456 --length; 456 --length;
457 457
458 return String(characters, length); 458 return String(characters, length);
459 } 459 }
460 460
461 static EListStyleType effectiveListMarkerType(EListStyleType type, int count) { 461 static EListStyleType effectiveListMarkerType(EListStyleType type, int count) {
462 // Note, the following switch statement has been explicitly grouped 462 // Note, the following switch statement has been explicitly grouped
463 // by list-style-type ordinal range. 463 // by list-style-type ordinal range.
464 switch (type) { 464 switch (type) {
465 case EListStyleType::ArabicIndic: 465 case EListStyleType::kArabicIndic:
466 case EListStyleType::Bengali: 466 case EListStyleType::kBengali:
467 case EListStyleType::Cambodian: 467 case EListStyleType::kCambodian:
468 case EListStyleType::Circle: 468 case EListStyleType::kCircle:
469 case EListStyleType::DecimalLeadingZero: 469 case EListStyleType::kDecimalLeadingZero:
470 case EListStyleType::Decimal: 470 case EListStyleType::kDecimal:
471 case EListStyleType::Devanagari: 471 case EListStyleType::kDevanagari:
472 case EListStyleType::Disc: 472 case EListStyleType::kDisc:
473 case EListStyleType::Gujarati: 473 case EListStyleType::kGujarati:
474 case EListStyleType::Gurmukhi: 474 case EListStyleType::kGurmukhi:
475 case EListStyleType::Kannada: 475 case EListStyleType::kKannada:
476 case EListStyleType::Khmer: 476 case EListStyleType::kKhmer:
477 case EListStyleType::Lao: 477 case EListStyleType::kLao:
478 case EListStyleType::Malayalam: 478 case EListStyleType::kMalayalam:
479 case EListStyleType::Mongolian: 479 case EListStyleType::kMongolian:
480 case EListStyleType::Myanmar: 480 case EListStyleType::kMyanmar:
481 case EListStyleType::None: 481 case EListStyleType::kNone:
482 case EListStyleType::Oriya: 482 case EListStyleType::kOriya:
483 case EListStyleType::Persian: 483 case EListStyleType::kPersian:
484 case EListStyleType::Square: 484 case EListStyleType::kSquare:
485 case EListStyleType::Telugu: 485 case EListStyleType::kTelugu:
486 case EListStyleType::Thai: 486 case EListStyleType::kThai:
487 case EListStyleType::Tibetan: 487 case EListStyleType::kTibetan:
488 case EListStyleType::Urdu: 488 case EListStyleType::kUrdu:
489 case EListStyleType::KoreanHangulFormal: 489 case EListStyleType::kKoreanHangulFormal:
490 case EListStyleType::KoreanHanjaFormal: 490 case EListStyleType::kKoreanHanjaFormal:
491 case EListStyleType::KoreanHanjaInformal: 491 case EListStyleType::kKoreanHanjaInformal:
492 case EListStyleType::CjkIdeographic: 492 case EListStyleType::kCjkIdeographic:
493 case EListStyleType::SimpChineseFormal: 493 case EListStyleType::kSimpChineseFormal:
494 case EListStyleType::SimpChineseInformal: 494 case EListStyleType::kSimpChineseInformal:
495 case EListStyleType::TradChineseFormal: 495 case EListStyleType::kTradChineseFormal:
496 case EListStyleType::TradChineseInformal: 496 case EListStyleType::kTradChineseInformal:
497 return type; // Can represent all ordinals. 497 return type; // Can represent all ordinals.
498 case EListStyleType::Armenian: 498 case EListStyleType::kArmenian:
499 case EListStyleType::LowerArmenian: 499 case EListStyleType::kLowerArmenian:
500 case EListStyleType::UpperArmenian: 500 case EListStyleType::kUpperArmenian:
501 return (count < 1 || count > 99999999) ? EListStyleType::Decimal : type; 501 return (count < 1 || count > 99999999) ? EListStyleType::kDecimal : type;
502 case EListStyleType::Georgian: 502 case EListStyleType::kGeorgian:
503 return (count < 1 || count > 19999) ? EListStyleType::Decimal : type; 503 return (count < 1 || count > 19999) ? EListStyleType::kDecimal : type;
504 case EListStyleType::Hebrew: 504 case EListStyleType::kHebrew:
505 return (count < 0 || count > 999999) ? EListStyleType::Decimal : type; 505 return (count < 0 || count > 999999) ? EListStyleType::kDecimal : type;
506 case EListStyleType::LowerRoman: 506 case EListStyleType::kLowerRoman:
507 case EListStyleType::UpperRoman: 507 case EListStyleType::kUpperRoman:
508 return (count < 1 || count > 3999) ? EListStyleType::Decimal : type; 508 return (count < 1 || count > 3999) ? EListStyleType::kDecimal : type;
509 case EListStyleType::CjkEarthlyBranch: 509 case EListStyleType::kCjkEarthlyBranch:
510 case EListStyleType::CjkHeavenlyStem: 510 case EListStyleType::kCjkHeavenlyStem:
511 case EListStyleType::EthiopicHalehameAm: 511 case EListStyleType::kEthiopicHalehameAm:
512 case EListStyleType::EthiopicHalehame: 512 case EListStyleType::kEthiopicHalehame:
513 case EListStyleType::EthiopicHalehameTiEr: 513 case EListStyleType::kEthiopicHalehameTiEr:
514 case EListStyleType::EthiopicHalehameTiEt: 514 case EListStyleType::kEthiopicHalehameTiEt:
515 case EListStyleType::Hangul: 515 case EListStyleType::kHangul:
516 case EListStyleType::HangulConsonant: 516 case EListStyleType::kHangulConsonant:
517 case EListStyleType::Hiragana: 517 case EListStyleType::kHiragana:
518 case EListStyleType::HiraganaIroha: 518 case EListStyleType::kHiraganaIroha:
519 case EListStyleType::Katakana: 519 case EListStyleType::kKatakana:
520 case EListStyleType::KatakanaIroha: 520 case EListStyleType::kKatakanaIroha:
521 case EListStyleType::LowerAlpha: 521 case EListStyleType::kLowerAlpha:
522 case EListStyleType::LowerGreek: 522 case EListStyleType::kLowerGreek:
523 case EListStyleType::LowerLatin: 523 case EListStyleType::kLowerLatin:
524 case EListStyleType::UpperAlpha: 524 case EListStyleType::kUpperAlpha:
525 case EListStyleType::UpperLatin: 525 case EListStyleType::kUpperLatin:
526 return (count < 1) ? EListStyleType::Decimal : type; 526 return (count < 1) ? EListStyleType::kDecimal : type;
527 } 527 }
528 528
529 ASSERT_NOT_REACHED(); 529 ASSERT_NOT_REACHED();
530 return type; 530 return type;
531 } 531 }
532 532
533 UChar suffix(EListStyleType type, int count) { 533 UChar suffix(EListStyleType type, int count) {
534 // If the list-style-type cannot represent |count| because it's outside its 534 // If the list-style-type cannot represent |count| because it's outside its
535 // ordinal range then we fall back to some list style that can represent 535 // ordinal range then we fall back to some list style that can represent
536 // |count|. 536 // |count|.
537 EListStyleType effectiveType = effectiveListMarkerType(type, count); 537 EListStyleType effectiveType = effectiveListMarkerType(type, count);
538 538
539 // Note, the following switch statement has been explicitly 539 // Note, the following switch statement has been explicitly
540 // grouped by list-style-type suffix. 540 // grouped by list-style-type suffix.
541 switch (effectiveType) { 541 switch (effectiveType) {
542 case EListStyleType::Circle: 542 case EListStyleType::kCircle:
543 case EListStyleType::Disc: 543 case EListStyleType::kDisc:
544 case EListStyleType::None: 544 case EListStyleType::kNone:
545 case EListStyleType::Square: 545 case EListStyleType::kSquare:
546 return ' '; 546 return ' ';
547 case EListStyleType::EthiopicHalehame: 547 case EListStyleType::kEthiopicHalehame:
548 case EListStyleType::EthiopicHalehameAm: 548 case EListStyleType::kEthiopicHalehameAm:
549 case EListStyleType::EthiopicHalehameTiEr: 549 case EListStyleType::kEthiopicHalehameTiEr:
550 case EListStyleType::EthiopicHalehameTiEt: 550 case EListStyleType::kEthiopicHalehameTiEt:
551 return ethiopicPrefaceColonCharacter; 551 return ethiopicPrefaceColonCharacter;
552 case EListStyleType::Armenian: 552 case EListStyleType::kArmenian:
553 case EListStyleType::ArabicIndic: 553 case EListStyleType::kArabicIndic:
554 case EListStyleType::Bengali: 554 case EListStyleType::kBengali:
555 case EListStyleType::Cambodian: 555 case EListStyleType::kCambodian:
556 case EListStyleType::CjkIdeographic: 556 case EListStyleType::kCjkIdeographic:
557 case EListStyleType::CjkEarthlyBranch: 557 case EListStyleType::kCjkEarthlyBranch:
558 case EListStyleType::CjkHeavenlyStem: 558 case EListStyleType::kCjkHeavenlyStem:
559 case EListStyleType::DecimalLeadingZero: 559 case EListStyleType::kDecimalLeadingZero:
560 case EListStyleType::Decimal: 560 case EListStyleType::kDecimal:
561 case EListStyleType::Devanagari: 561 case EListStyleType::kDevanagari:
562 case EListStyleType::Georgian: 562 case EListStyleType::kGeorgian:
563 case EListStyleType::Gujarati: 563 case EListStyleType::kGujarati:
564 case EListStyleType::Gurmukhi: 564 case EListStyleType::kGurmukhi:
565 case EListStyleType::Hangul: 565 case EListStyleType::kHangul:
566 case EListStyleType::HangulConsonant: 566 case EListStyleType::kHangulConsonant:
567 case EListStyleType::Hebrew: 567 case EListStyleType::kHebrew:
568 case EListStyleType::Hiragana: 568 case EListStyleType::kHiragana:
569 case EListStyleType::HiraganaIroha: 569 case EListStyleType::kHiraganaIroha:
570 case EListStyleType::Kannada: 570 case EListStyleType::kKannada:
571 case EListStyleType::Katakana: 571 case EListStyleType::kKatakana:
572 case EListStyleType::KatakanaIroha: 572 case EListStyleType::kKatakanaIroha:
573 case EListStyleType::Khmer: 573 case EListStyleType::kKhmer:
574 case EListStyleType::Lao: 574 case EListStyleType::kLao:
575 case EListStyleType::LowerAlpha: 575 case EListStyleType::kLowerAlpha:
576 case EListStyleType::LowerArmenian: 576 case EListStyleType::kLowerArmenian:
577 case EListStyleType::LowerGreek: 577 case EListStyleType::kLowerGreek:
578 case EListStyleType::LowerLatin: 578 case EListStyleType::kLowerLatin:
579 case EListStyleType::LowerRoman: 579 case EListStyleType::kLowerRoman:
580 case EListStyleType::Malayalam: 580 case EListStyleType::kMalayalam:
581 case EListStyleType::Mongolian: 581 case EListStyleType::kMongolian:
582 case EListStyleType::Myanmar: 582 case EListStyleType::kMyanmar:
583 case EListStyleType::Oriya: 583 case EListStyleType::kOriya:
584 case EListStyleType::Persian: 584 case EListStyleType::kPersian:
585 case EListStyleType::Telugu: 585 case EListStyleType::kTelugu:
586 case EListStyleType::Thai: 586 case EListStyleType::kThai:
587 case EListStyleType::Tibetan: 587 case EListStyleType::kTibetan:
588 case EListStyleType::UpperAlpha: 588 case EListStyleType::kUpperAlpha:
589 case EListStyleType::UpperArmenian: 589 case EListStyleType::kUpperArmenian:
590 case EListStyleType::UpperLatin: 590 case EListStyleType::kUpperLatin:
591 case EListStyleType::UpperRoman: 591 case EListStyleType::kUpperRoman:
592 case EListStyleType::Urdu: 592 case EListStyleType::kUrdu:
593 return '.'; 593 return '.';
594 case EListStyleType::SimpChineseFormal: 594 case EListStyleType::kSimpChineseFormal:
595 case EListStyleType::SimpChineseInformal: 595 case EListStyleType::kSimpChineseInformal:
596 case EListStyleType::TradChineseFormal: 596 case EListStyleType::kTradChineseFormal:
597 case EListStyleType::TradChineseInformal: 597 case EListStyleType::kTradChineseInformal:
598 case EListStyleType::KoreanHangulFormal: 598 case EListStyleType::kKoreanHangulFormal:
599 case EListStyleType::KoreanHanjaFormal: 599 case EListStyleType::kKoreanHanjaFormal:
600 case EListStyleType::KoreanHanjaInformal: 600 case EListStyleType::kKoreanHanjaInformal:
601 return 0x3001; 601 return 0x3001;
602 } 602 }
603 603
604 ASSERT_NOT_REACHED(); 604 ASSERT_NOT_REACHED();
605 return '.'; 605 return '.';
606 } 606 }
607 607
608 String text(EListStyleType type, int count) { 608 String text(EListStyleType type, int count) {
609 // If the list-style-type, say hebrew, cannot represent |count| because it's 609 // If the list-style-type, say hebrew, cannot represent |count| because it's
610 // outside its ordinal range then we fallback to some list style that can 610 // outside its ordinal range then we fallback to some list style that can
611 // represent |count|. 611 // represent |count|.
612 switch (effectiveListMarkerType(type, count)) { 612 switch (effectiveListMarkerType(type, count)) {
613 case EListStyleType::None: 613 case EListStyleType::kNone:
614 return ""; 614 return "";
615 615
616 // We use the same characters for text security. 616 // We use the same characters for text security.
617 // See LayoutText::setInternalString. 617 // See LayoutText::setInternalString.
618 case EListStyleType::Circle: 618 case EListStyleType::kCircle:
619 return String(&whiteBulletCharacter, 1); 619 return String(&whiteBulletCharacter, 1);
620 case EListStyleType::Disc: 620 case EListStyleType::kDisc:
621 return String(&bulletCharacter, 1); 621 return String(&bulletCharacter, 1);
622 case EListStyleType::Square: 622 case EListStyleType::kSquare:
623 // The CSS 2.1 test suite uses U+25EE BLACK MEDIUM SMALL SQUARE 623 // The CSS 2.1 test suite uses U+25EE BLACK MEDIUM SMALL SQUARE
624 // instead, but I think this looks better. 624 // instead, but I think this looks better.
625 return String(&blackSquareCharacter, 1); 625 return String(&blackSquareCharacter, 1);
626 626
627 case EListStyleType::Decimal: 627 case EListStyleType::kDecimal:
628 return String::number(count); 628 return String::number(count);
629 case EListStyleType::DecimalLeadingZero: 629 case EListStyleType::kDecimalLeadingZero:
630 if (count < -9 || count > 9) 630 if (count < -9 || count > 9)
631 return String::number(count); 631 return String::number(count);
632 if (count < 0) 632 if (count < 0)
633 return "-0" + String::number(-count); // -01 to -09 633 return "-0" + String::number(-count); // -01 to -09
634 return "0" + String::number(count); // 00 to 09 634 return "0" + String::number(count); // 00 to 09
635 635
636 case EListStyleType::ArabicIndic: { 636 case EListStyleType::kArabicIndic: {
637 static const UChar arabicIndicNumerals[10] = { 637 static const UChar arabicIndicNumerals[10] = {
638 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 638 0x0660, 0x0661, 0x0662, 0x0663, 0x0664,
639 0x0665, 0x0666, 0x0667, 0x0668, 0x0669}; 639 0x0665, 0x0666, 0x0667, 0x0668, 0x0669};
640 return toNumeric(count, arabicIndicNumerals); 640 return toNumeric(count, arabicIndicNumerals);
641 } 641 }
642 case EListStyleType::Bengali: { 642 case EListStyleType::kBengali: {
643 static const UChar bengaliNumerals[10] = {0x09E6, 0x09E7, 0x09E8, 0x09E9, 643 static const UChar bengaliNumerals[10] = {0x09E6, 0x09E7, 0x09E8, 0x09E9,
644 0x09EA, 0x09EB, 0x09EC, 0x09ED, 644 0x09EA, 0x09EB, 0x09EC, 0x09ED,
645 0x09EE, 0x09EF}; 645 0x09EE, 0x09EF};
646 return toNumeric(count, bengaliNumerals); 646 return toNumeric(count, bengaliNumerals);
647 } 647 }
648 case EListStyleType::Cambodian: 648 case EListStyleType::kCambodian:
649 case EListStyleType::Khmer: { 649 case EListStyleType::kKhmer: {
650 static const UChar khmerNumerals[10] = {0x17E0, 0x17E1, 0x17E2, 0x17E3, 650 static const UChar khmerNumerals[10] = {0x17E0, 0x17E1, 0x17E2, 0x17E3,
651 0x17E4, 0x17E5, 0x17E6, 0x17E7, 651 0x17E4, 0x17E5, 0x17E6, 0x17E7,
652 0x17E8, 0x17E9}; 652 0x17E8, 0x17E9};
653 return toNumeric(count, khmerNumerals); 653 return toNumeric(count, khmerNumerals);
654 } 654 }
655 case EListStyleType::Devanagari: { 655 case EListStyleType::kDevanagari: {
656 static const UChar devanagariNumerals[10] = { 656 static const UChar devanagariNumerals[10] = {
657 0x0966, 0x0967, 0x0968, 0x0969, 0x096A, 657 0x0966, 0x0967, 0x0968, 0x0969, 0x096A,
658 0x096B, 0x096C, 0x096D, 0x096E, 0x096F}; 658 0x096B, 0x096C, 0x096D, 0x096E, 0x096F};
659 return toNumeric(count, devanagariNumerals); 659 return toNumeric(count, devanagariNumerals);
660 } 660 }
661 case EListStyleType::Gujarati: { 661 case EListStyleType::kGujarati: {
662 static const UChar gujaratiNumerals[10] = {0x0AE6, 0x0AE7, 0x0AE8, 0x0AE9, 662 static const UChar gujaratiNumerals[10] = {0x0AE6, 0x0AE7, 0x0AE8, 0x0AE9,
663 0x0AEA, 0x0AEB, 0x0AEC, 0x0AED, 663 0x0AEA, 0x0AEB, 0x0AEC, 0x0AED,
664 0x0AEE, 0x0AEF}; 664 0x0AEE, 0x0AEF};
665 return toNumeric(count, gujaratiNumerals); 665 return toNumeric(count, gujaratiNumerals);
666 } 666 }
667 case EListStyleType::Gurmukhi: { 667 case EListStyleType::kGurmukhi: {
668 static const UChar gurmukhiNumerals[10] = {0x0A66, 0x0A67, 0x0A68, 0x0A69, 668 static const UChar gurmukhiNumerals[10] = {0x0A66, 0x0A67, 0x0A68, 0x0A69,
669 0x0A6A, 0x0A6B, 0x0A6C, 0x0A6D, 669 0x0A6A, 0x0A6B, 0x0A6C, 0x0A6D,
670 0x0A6E, 0x0A6F}; 670 0x0A6E, 0x0A6F};
671 return toNumeric(count, gurmukhiNumerals); 671 return toNumeric(count, gurmukhiNumerals);
672 } 672 }
673 case EListStyleType::Kannada: { 673 case EListStyleType::kKannada: {
674 static const UChar kannadaNumerals[10] = {0x0CE6, 0x0CE7, 0x0CE8, 0x0CE9, 674 static const UChar kannadaNumerals[10] = {0x0CE6, 0x0CE7, 0x0CE8, 0x0CE9,
675 0x0CEA, 0x0CEB, 0x0CEC, 0x0CED, 675 0x0CEA, 0x0CEB, 0x0CEC, 0x0CED,
676 0x0CEE, 0x0CEF}; 676 0x0CEE, 0x0CEF};
677 return toNumeric(count, kannadaNumerals); 677 return toNumeric(count, kannadaNumerals);
678 } 678 }
679 case EListStyleType::Lao: { 679 case EListStyleType::kLao: {
680 static const UChar laoNumerals[10] = {0x0ED0, 0x0ED1, 0x0ED2, 0x0ED3, 680 static const UChar laoNumerals[10] = {0x0ED0, 0x0ED1, 0x0ED2, 0x0ED3,
681 0x0ED4, 0x0ED5, 0x0ED6, 0x0ED7, 681 0x0ED4, 0x0ED5, 0x0ED6, 0x0ED7,
682 0x0ED8, 0x0ED9}; 682 0x0ED8, 0x0ED9};
683 return toNumeric(count, laoNumerals); 683 return toNumeric(count, laoNumerals);
684 } 684 }
685 case EListStyleType::Malayalam: { 685 case EListStyleType::kMalayalam: {
686 static const UChar malayalamNumerals[10] = { 686 static const UChar malayalamNumerals[10] = {
687 0x0D66, 0x0D67, 0x0D68, 0x0D69, 0x0D6A, 687 0x0D66, 0x0D67, 0x0D68, 0x0D69, 0x0D6A,
688 0x0D6B, 0x0D6C, 0x0D6D, 0x0D6E, 0x0D6F}; 688 0x0D6B, 0x0D6C, 0x0D6D, 0x0D6E, 0x0D6F};
689 return toNumeric(count, malayalamNumerals); 689 return toNumeric(count, malayalamNumerals);
690 } 690 }
691 case EListStyleType::Mongolian: { 691 case EListStyleType::kMongolian: {
692 static const UChar mongolianNumerals[10] = { 692 static const UChar mongolianNumerals[10] = {
693 0x1810, 0x1811, 0x1812, 0x1813, 0x1814, 693 0x1810, 0x1811, 0x1812, 0x1813, 0x1814,
694 0x1815, 0x1816, 0x1817, 0x1818, 0x1819}; 694 0x1815, 0x1816, 0x1817, 0x1818, 0x1819};
695 return toNumeric(count, mongolianNumerals); 695 return toNumeric(count, mongolianNumerals);
696 } 696 }
697 case EListStyleType::Myanmar: { 697 case EListStyleType::kMyanmar: {
698 static const UChar myanmarNumerals[10] = {0x1040, 0x1041, 0x1042, 0x1043, 698 static const UChar myanmarNumerals[10] = {0x1040, 0x1041, 0x1042, 0x1043,
699 0x1044, 0x1045, 0x1046, 0x1047, 699 0x1044, 0x1045, 0x1046, 0x1047,
700 0x1048, 0x1049}; 700 0x1048, 0x1049};
701 return toNumeric(count, myanmarNumerals); 701 return toNumeric(count, myanmarNumerals);
702 } 702 }
703 case EListStyleType::Oriya: { 703 case EListStyleType::kOriya: {
704 static const UChar oriyaNumerals[10] = {0x0B66, 0x0B67, 0x0B68, 0x0B69, 704 static const UChar oriyaNumerals[10] = {0x0B66, 0x0B67, 0x0B68, 0x0B69,
705 0x0B6A, 0x0B6B, 0x0B6C, 0x0B6D, 705 0x0B6A, 0x0B6B, 0x0B6C, 0x0B6D,
706 0x0B6E, 0x0B6F}; 706 0x0B6E, 0x0B6F};
707 return toNumeric(count, oriyaNumerals); 707 return toNumeric(count, oriyaNumerals);
708 } 708 }
709 case EListStyleType::Persian: 709 case EListStyleType::kPersian:
710 case EListStyleType::Urdu: { 710 case EListStyleType::kUrdu: {
711 static const UChar urduNumerals[10] = {0x06F0, 0x06F1, 0x06F2, 0x06F3, 711 static const UChar urduNumerals[10] = {0x06F0, 0x06F1, 0x06F2, 0x06F3,
712 0x06F4, 0x06F5, 0x06F6, 0x06F7, 712 0x06F4, 0x06F5, 0x06F6, 0x06F7,
713 0x06F8, 0x06F9}; 713 0x06F8, 0x06F9};
714 return toNumeric(count, urduNumerals); 714 return toNumeric(count, urduNumerals);
715 } 715 }
716 case EListStyleType::Telugu: { 716 case EListStyleType::kTelugu: {
717 static const UChar teluguNumerals[10] = {0x0C66, 0x0C67, 0x0C68, 0x0C69, 717 static const UChar teluguNumerals[10] = {0x0C66, 0x0C67, 0x0C68, 0x0C69,
718 0x0C6A, 0x0C6B, 0x0C6C, 0x0C6D, 718 0x0C6A, 0x0C6B, 0x0C6C, 0x0C6D,
719 0x0C6E, 0x0C6F}; 719 0x0C6E, 0x0C6F};
720 return toNumeric(count, teluguNumerals); 720 return toNumeric(count, teluguNumerals);
721 } 721 }
722 case EListStyleType::Tibetan: { 722 case EListStyleType::kTibetan: {
723 static const UChar tibetanNumerals[10] = {0x0F20, 0x0F21, 0x0F22, 0x0F23, 723 static const UChar tibetanNumerals[10] = {0x0F20, 0x0F21, 0x0F22, 0x0F23,
724 0x0F24, 0x0F25, 0x0F26, 0x0F27, 724 0x0F24, 0x0F25, 0x0F26, 0x0F27,
725 0x0F28, 0x0F29}; 725 0x0F28, 0x0F29};
726 return toNumeric(count, tibetanNumerals); 726 return toNumeric(count, tibetanNumerals);
727 } 727 }
728 case EListStyleType::Thai: { 728 case EListStyleType::kThai: {
729 static const UChar thaiNumerals[10] = {0x0E50, 0x0E51, 0x0E52, 0x0E53, 729 static const UChar thaiNumerals[10] = {0x0E50, 0x0E51, 0x0E52, 0x0E53,
730 0x0E54, 0x0E55, 0x0E56, 0x0E57, 730 0x0E54, 0x0E55, 0x0E56, 0x0E57,
731 0x0E58, 0x0E59}; 731 0x0E58, 0x0E59};
732 return toNumeric(count, thaiNumerals); 732 return toNumeric(count, thaiNumerals);
733 } 733 }
734 734
735 case EListStyleType::LowerAlpha: 735 case EListStyleType::kLowerAlpha:
736 case EListStyleType::LowerLatin: { 736 case EListStyleType::kLowerLatin: {
737 static const LChar lowerLatinAlphabet[26] = { 737 static const LChar lowerLatinAlphabet[26] = {
738 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 738 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
739 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; 739 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
740 return toAlphabetic(count, lowerLatinAlphabet); 740 return toAlphabetic(count, lowerLatinAlphabet);
741 } 741 }
742 case EListStyleType::UpperAlpha: 742 case EListStyleType::kUpperAlpha:
743 case EListStyleType::UpperLatin: { 743 case EListStyleType::kUpperLatin: {
744 static const LChar upperLatinAlphabet[26] = { 744 static const LChar upperLatinAlphabet[26] = {
745 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 745 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
746 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}; 746 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
747 return toAlphabetic(count, upperLatinAlphabet); 747 return toAlphabetic(count, upperLatinAlphabet);
748 } 748 }
749 case EListStyleType::LowerGreek: { 749 case EListStyleType::kLowerGreek: {
750 static const UChar lowerGreekAlphabet[24] = { 750 static const UChar lowerGreekAlphabet[24] = {
751 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 751 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8,
752 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, 752 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0,
753 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9}; 753 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9};
754 return toAlphabetic(count, lowerGreekAlphabet); 754 return toAlphabetic(count, lowerGreekAlphabet);
755 } 755 }
756 756
757 case EListStyleType::Hiragana: { 757 case EListStyleType::kHiragana: {
758 // FIXME: This table comes from the CSS3 draft, and is probably 758 // FIXME: This table comes from the CSS3 draft, and is probably
759 // incorrect, given the comments in that draft. 759 // incorrect, given the comments in that draft.
760 static const UChar hiraganaAlphabet[48] = { 760 static const UChar hiraganaAlphabet[48] = {
761 0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x304B, 0x304D, 0x304F, 761 0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x304B, 0x304D, 0x304F,
762 0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305B, 0x305D, 0x305F, 762 0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305B, 0x305D, 0x305F,
763 0x3061, 0x3064, 0x3066, 0x3068, 0x306A, 0x306B, 0x306C, 0x306D, 763 0x3061, 0x3064, 0x3066, 0x3068, 0x306A, 0x306B, 0x306C, 0x306D,
764 0x306E, 0x306F, 0x3072, 0x3075, 0x3078, 0x307B, 0x307E, 0x307F, 764 0x306E, 0x306F, 0x3072, 0x3075, 0x3078, 0x307B, 0x307E, 0x307F,
765 0x3080, 0x3081, 0x3082, 0x3084, 0x3086, 0x3088, 0x3089, 0x308A, 765 0x3080, 0x3081, 0x3082, 0x3084, 0x3086, 0x3088, 0x3089, 0x308A,
766 0x308B, 0x308C, 0x308D, 0x308F, 0x3090, 0x3091, 0x3092, 0x3093}; 766 0x308B, 0x308C, 0x308D, 0x308F, 0x3090, 0x3091, 0x3092, 0x3093};
767 return toAlphabetic(count, hiraganaAlphabet); 767 return toAlphabetic(count, hiraganaAlphabet);
768 } 768 }
769 case EListStyleType::HiraganaIroha: { 769 case EListStyleType::kHiraganaIroha: {
770 // FIXME: This table comes from the CSS3 draft, and is probably 770 // FIXME: This table comes from the CSS3 draft, and is probably
771 // incorrect, given the comments in that draft. 771 // incorrect, given the comments in that draft.
772 static const UChar hiraganaIrohaAlphabet[47] = { 772 static const UChar hiraganaIrohaAlphabet[47] = {
773 0x3044, 0x308D, 0x306F, 0x306B, 0x307B, 0x3078, 0x3068, 0x3061, 773 0x3044, 0x308D, 0x306F, 0x306B, 0x307B, 0x3078, 0x3068, 0x3061,
774 0x308A, 0x306C, 0x308B, 0x3092, 0x308F, 0x304B, 0x3088, 0x305F, 774 0x308A, 0x306C, 0x308B, 0x3092, 0x308F, 0x304B, 0x3088, 0x305F,
775 0x308C, 0x305D, 0x3064, 0x306D, 0x306A, 0x3089, 0x3080, 0x3046, 775 0x308C, 0x305D, 0x3064, 0x306D, 0x306A, 0x3089, 0x3080, 0x3046,
776 0x3090, 0x306E, 0x304A, 0x304F, 0x3084, 0x307E, 0x3051, 0x3075, 776 0x3090, 0x306E, 0x304A, 0x304F, 0x3084, 0x307E, 0x3051, 0x3075,
777 0x3053, 0x3048, 0x3066, 0x3042, 0x3055, 0x304D, 0x3086, 0x3081, 777 0x3053, 0x3048, 0x3066, 0x3042, 0x3055, 0x304D, 0x3086, 0x3081,
778 0x307F, 0x3057, 0x3091, 0x3072, 0x3082, 0x305B, 0x3059}; 778 0x307F, 0x3057, 0x3091, 0x3072, 0x3082, 0x305B, 0x3059};
779 return toAlphabetic(count, hiraganaIrohaAlphabet); 779 return toAlphabetic(count, hiraganaIrohaAlphabet);
780 } 780 }
781 case EListStyleType::Katakana: { 781 case EListStyleType::kKatakana: {
782 // FIXME: This table comes from the CSS3 draft, and is probably 782 // FIXME: This table comes from the CSS3 draft, and is probably
783 // incorrect, given the comments in that draft. 783 // incorrect, given the comments in that draft.
784 static const UChar katakanaAlphabet[48] = { 784 static const UChar katakanaAlphabet[48] = {
785 0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30AB, 0x30AD, 0x30AF, 785 0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30AB, 0x30AD, 0x30AF,
786 0x30B1, 0x30B3, 0x30B5, 0x30B7, 0x30B9, 0x30BB, 0x30BD, 0x30BF, 786 0x30B1, 0x30B3, 0x30B5, 0x30B7, 0x30B9, 0x30BB, 0x30BD, 0x30BF,
787 0x30C1, 0x30C4, 0x30C6, 0x30C8, 0x30CA, 0x30CB, 0x30CC, 0x30CD, 787 0x30C1, 0x30C4, 0x30C6, 0x30C8, 0x30CA, 0x30CB, 0x30CC, 0x30CD,
788 0x30CE, 0x30CF, 0x30D2, 0x30D5, 0x30D8, 0x30DB, 0x30DE, 0x30DF, 788 0x30CE, 0x30CF, 0x30D2, 0x30D5, 0x30D8, 0x30DB, 0x30DE, 0x30DF,
789 0x30E0, 0x30E1, 0x30E2, 0x30E4, 0x30E6, 0x30E8, 0x30E9, 0x30EA, 789 0x30E0, 0x30E1, 0x30E2, 0x30E4, 0x30E6, 0x30E8, 0x30E9, 0x30EA,
790 0x30EB, 0x30EC, 0x30ED, 0x30EF, 0x30F0, 0x30F1, 0x30F2, 0x30F3}; 790 0x30EB, 0x30EC, 0x30ED, 0x30EF, 0x30F0, 0x30F1, 0x30F2, 0x30F3};
791 return toAlphabetic(count, katakanaAlphabet); 791 return toAlphabetic(count, katakanaAlphabet);
792 } 792 }
793 case EListStyleType::KatakanaIroha: { 793 case EListStyleType::kKatakanaIroha: {
794 // FIXME: This table comes from the CSS3 draft, and is probably 794 // FIXME: This table comes from the CSS3 draft, and is probably
795 // incorrect, given the comments in that draft. 795 // incorrect, given the comments in that draft.
796 static const UChar katakanaIrohaAlphabet[47] = { 796 static const UChar katakanaIrohaAlphabet[47] = {
797 0x30A4, 0x30ED, 0x30CF, 0x30CB, 0x30DB, 0x30D8, 0x30C8, 0x30C1, 797 0x30A4, 0x30ED, 0x30CF, 0x30CB, 0x30DB, 0x30D8, 0x30C8, 0x30C1,
798 0x30EA, 0x30CC, 0x30EB, 0x30F2, 0x30EF, 0x30AB, 0x30E8, 0x30BF, 798 0x30EA, 0x30CC, 0x30EB, 0x30F2, 0x30EF, 0x30AB, 0x30E8, 0x30BF,
799 0x30EC, 0x30BD, 0x30C4, 0x30CD, 0x30CA, 0x30E9, 0x30E0, 0x30A6, 799 0x30EC, 0x30BD, 0x30C4, 0x30CD, 0x30CA, 0x30E9, 0x30E0, 0x30A6,
800 0x30F0, 0x30CE, 0x30AA, 0x30AF, 0x30E4, 0x30DE, 0x30B1, 0x30D5, 800 0x30F0, 0x30CE, 0x30AA, 0x30AF, 0x30E4, 0x30DE, 0x30B1, 0x30D5,
801 0x30B3, 0x30A8, 0x30C6, 0x30A2, 0x30B5, 0x30AD, 0x30E6, 0x30E1, 801 0x30B3, 0x30A8, 0x30C6, 0x30A2, 0x30B5, 0x30AD, 0x30E6, 0x30E1,
802 0x30DF, 0x30B7, 0x30F1, 0x30D2, 0x30E2, 0x30BB, 0x30B9}; 802 0x30DF, 0x30B7, 0x30F1, 0x30D2, 0x30E2, 0x30BB, 0x30B9};
803 return toAlphabetic(count, katakanaIrohaAlphabet); 803 return toAlphabetic(count, katakanaIrohaAlphabet);
804 } 804 }
805 805
806 case EListStyleType::CjkEarthlyBranch: { 806 case EListStyleType::kCjkEarthlyBranch: {
807 static const UChar cjkEarthlyBranchAlphabet[12] = { 807 static const UChar cjkEarthlyBranchAlphabet[12] = {
808 0x5B50, 0x4E11, 0x5BC5, 0x536F, 0x8FB0, 0x5DF3, 808 0x5B50, 0x4E11, 0x5BC5, 0x536F, 0x8FB0, 0x5DF3,
809 0x5348, 0x672A, 0x7533, 0x9149, 0x620C, 0x4EA5}; 809 0x5348, 0x672A, 0x7533, 0x9149, 0x620C, 0x4EA5};
810 return toAlphabetic(count, cjkEarthlyBranchAlphabet); 810 return toAlphabetic(count, cjkEarthlyBranchAlphabet);
811 } 811 }
812 case EListStyleType::CjkHeavenlyStem: { 812 case EListStyleType::kCjkHeavenlyStem: {
813 static const UChar cjkHeavenlyStemAlphabet[10] = { 813 static const UChar cjkHeavenlyStemAlphabet[10] = {
814 0x7532, 0x4E59, 0x4E19, 0x4E01, 0x620A, 814 0x7532, 0x4E59, 0x4E19, 0x4E01, 0x620A,
815 0x5DF1, 0x5E9A, 0x8F9B, 0x58EC, 0x7678}; 815 0x5DF1, 0x5E9A, 0x8F9B, 0x58EC, 0x7678};
816 return toAlphabetic(count, cjkHeavenlyStemAlphabet); 816 return toAlphabetic(count, cjkHeavenlyStemAlphabet);
817 } 817 }
818 case EListStyleType::HangulConsonant: { 818 case EListStyleType::kHangulConsonant: {
819 static const UChar hangulConsonantAlphabet[14] = { 819 static const UChar hangulConsonantAlphabet[14] = {
820 0x3131, 0x3134, 0x3137, 0x3139, 0x3141, 0x3142, 0x3145, 820 0x3131, 0x3134, 0x3137, 0x3139, 0x3141, 0x3142, 0x3145,
821 0x3147, 0x3148, 0x314A, 0x314B, 0x314C, 0x314D, 0x314E}; 821 0x3147, 0x3148, 0x314A, 0x314B, 0x314C, 0x314D, 0x314E};
822 return toAlphabetic(count, hangulConsonantAlphabet); 822 return toAlphabetic(count, hangulConsonantAlphabet);
823 } 823 }
824 case EListStyleType::Hangul: { 824 case EListStyleType::kHangul: {
825 static const UChar hangulAlphabet[14] = { 825 static const UChar hangulAlphabet[14] = {
826 0xAC00, 0xB098, 0xB2E4, 0xB77C, 0xB9C8, 0xBC14, 0xC0AC, 826 0xAC00, 0xB098, 0xB2E4, 0xB77C, 0xB9C8, 0xBC14, 0xC0AC,
827 0xC544, 0xC790, 0xCC28, 0xCE74, 0xD0C0, 0xD30C, 0xD558}; 827 0xC544, 0xC790, 0xCC28, 0xCE74, 0xD0C0, 0xD30C, 0xD558};
828 return toAlphabetic(count, hangulAlphabet); 828 return toAlphabetic(count, hangulAlphabet);
829 } 829 }
830 case EListStyleType::EthiopicHalehame: { 830 case EListStyleType::kEthiopicHalehame: {
831 static const UChar ethiopicHalehameGezAlphabet[26] = { 831 static const UChar ethiopicHalehameGezAlphabet[26] = {
832 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 832 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230,
833 0x1240, 0x1260, 0x1270, 0x1280, 0x1290, 0x12A0, 0x12A8, 833 0x1240, 0x1260, 0x1270, 0x1280, 0x1290, 0x12A0, 0x12A8,
834 0x12C8, 0x12D0, 0x12D8, 0x12E8, 0x12F0, 0x1308, 0x1320, 834 0x12C8, 0x12D0, 0x12D8, 0x12E8, 0x12F0, 0x1308, 0x1320,
835 0x1330, 0x1338, 0x1340, 0x1348, 0x1350}; 835 0x1330, 0x1338, 0x1340, 0x1348, 0x1350};
836 return toAlphabetic(count, ethiopicHalehameGezAlphabet); 836 return toAlphabetic(count, ethiopicHalehameGezAlphabet);
837 } 837 }
838 case EListStyleType::EthiopicHalehameAm: { 838 case EListStyleType::kEthiopicHalehameAm: {
839 static const UChar ethiopicHalehameAmAlphabet[33] = { 839 static const UChar ethiopicHalehameAmAlphabet[33] = {
840 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 840 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230,
841 0x1238, 0x1240, 0x1260, 0x1270, 0x1278, 0x1280, 0x1290, 841 0x1238, 0x1240, 0x1260, 0x1270, 0x1278, 0x1280, 0x1290,
842 0x1298, 0x12A0, 0x12A8, 0x12B8, 0x12C8, 0x12D0, 0x12D8, 842 0x1298, 0x12A0, 0x12A8, 0x12B8, 0x12C8, 0x12D0, 0x12D8,
843 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320, 0x1328, 843 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320, 0x1328,
844 0x1330, 0x1338, 0x1340, 0x1348, 0x1350}; 844 0x1330, 0x1338, 0x1340, 0x1348, 0x1350};
845 return toAlphabetic(count, ethiopicHalehameAmAlphabet); 845 return toAlphabetic(count, ethiopicHalehameAmAlphabet);
846 } 846 }
847 case EListStyleType::EthiopicHalehameTiEr: { 847 case EListStyleType::kEthiopicHalehameTiEr: {
848 static const UChar ethiopicHalehameTiErAlphabet[31] = { 848 static const UChar ethiopicHalehameTiErAlphabet[31] = {
849 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 849 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240,
850 0x1250, 0x1260, 0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 850 0x1250, 0x1260, 0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8,
851 0x12B8, 0x12C8, 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 851 0x12B8, 0x12C8, 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300,
852 0x1308, 0x1320, 0x1328, 0x1330, 0x1338, 0x1348, 0x1350}; 852 0x1308, 0x1320, 0x1328, 0x1330, 0x1338, 0x1348, 0x1350};
853 return toAlphabetic(count, ethiopicHalehameTiErAlphabet); 853 return toAlphabetic(count, ethiopicHalehameTiErAlphabet);
854 } 854 }
855 case EListStyleType::EthiopicHalehameTiEt: { 855 case EListStyleType::kEthiopicHalehameTiEt: {
856 static const UChar ethiopicHalehameTiEtAlphabet[34] = { 856 static const UChar ethiopicHalehameTiEtAlphabet[34] = {
857 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 857 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230,
858 0x1238, 0x1240, 0x1250, 0x1260, 0x1270, 0x1278, 0x1280, 858 0x1238, 0x1240, 0x1250, 0x1260, 0x1270, 0x1278, 0x1280,
859 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12B8, 0x12C8, 0x12D0, 859 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12B8, 0x12C8, 0x12D0,
860 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320, 860 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320,
861 0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350}; 861 0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350};
862 return toAlphabetic(count, ethiopicHalehameTiEtAlphabet); 862 return toAlphabetic(count, ethiopicHalehameTiEtAlphabet);
863 } 863 }
864 case EListStyleType::KoreanHangulFormal: { 864 case EListStyleType::kKoreanHangulFormal: {
865 static const UChar koreanHangulFormalTable[26] = { 865 static const UChar koreanHangulFormalTable[26] = {
866 Korean, 0xB9CC, 0x0000, 0xC5B5, 0x0000, 0xC870, 0x0000, 866 Korean, 0xB9CC, 0x0000, 0xC5B5, 0x0000, 0xC870, 0x0000,
867 0xC2ED, 0xBC31, 0xCC9C, 0xC601, 0xC77C, 0xC774, 0xC0BC, 867 0xC2ED, 0xBC31, 0xCC9C, 0xC601, 0xC77C, 0xC774, 0xC0BC,
868 0xC0AC, 0xC624, 0xC721, 0xCE60, 0xD314, 0xAD6C, 0xB9C8, 868 0xC0AC, 0xC624, 0xC721, 0xCE60, 0xD314, 0xAD6C, 0xB9C8,
869 0xC774, 0xB108, 0xC2A4, 0x0020, 0x0000}; 869 0xC774, 0xB108, 0xC2A4, 0x0020, 0x0000};
870 return toCJKIdeographic(count, koreanHangulFormalTable, Formal); 870 return toCJKIdeographic(count, koreanHangulFormalTable, Formal);
871 } 871 }
872 case EListStyleType::KoreanHanjaFormal: { 872 case EListStyleType::kKoreanHanjaFormal: {
873 static const UChar koreanHanjaFormalTable[26] = { 873 static const UChar koreanHanjaFormalTable[26] = {
874 Korean, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000, 874 Korean, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000,
875 0x62FE, 0x767E, 0x4EDF, 0x96F6, 0x58F9, 0x8CB3, 0x53C3, 875 0x62FE, 0x767E, 0x4EDF, 0x96F6, 0x58F9, 0x8CB3, 0x53C3,
876 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D, 0xB9C8, 876 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D, 0xB9C8,
877 0xC774, 0xB108, 0xC2A4, 0x0020, 0x0000}; 877 0xC774, 0xB108, 0xC2A4, 0x0020, 0x0000};
878 return toCJKIdeographic(count, koreanHanjaFormalTable, Formal); 878 return toCJKIdeographic(count, koreanHanjaFormalTable, Formal);
879 } 879 }
880 case EListStyleType::KoreanHanjaInformal: { 880 case EListStyleType::kKoreanHanjaInformal: {
881 static const UChar koreanHanjaInformalTable[26] = { 881 static const UChar koreanHanjaInformalTable[26] = {
882 Korean, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000, 882 Korean, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000,
883 0x5341, 0x767E, 0x5343, 0x96F6, 0x4E00, 0x4E8C, 0x4E09, 883 0x5341, 0x767E, 0x5343, 0x96F6, 0x4E00, 0x4E8C, 0x4E09,
884 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D, 0xB9C8, 884 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D, 0xB9C8,
885 0xC774, 0xB108, 0xC2A4, 0x0020, 0x0000}; 885 0xC774, 0xB108, 0xC2A4, 0x0020, 0x0000};
886 return toCJKIdeographic(count, koreanHanjaInformalTable, Informal); 886 return toCJKIdeographic(count, koreanHanjaInformalTable, Informal);
887 } 887 }
888 case EListStyleType::CjkIdeographic: 888 case EListStyleType::kCjkIdeographic:
889 case EListStyleType::TradChineseInformal: { 889 case EListStyleType::kTradChineseInformal: {
890 static const UChar traditionalChineseInformalTable[22] = { 890 static const UChar traditionalChineseInformalTable[22] = {
891 Chinese, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000, 0x5341, 891 Chinese, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000, 0x5341,
892 0x767E, 0x5343, 0x96F6, 0x4E00, 0x4E8C, 0x4E09, 0x56DB, 0x4E94, 892 0x767E, 0x5343, 0x96F6, 0x4E00, 0x4E8C, 0x4E09, 0x56DB, 0x4E94,
893 0x516D, 0x4E03, 0x516B, 0x4E5D, 0x8CA0, 0x0000}; 893 0x516D, 0x4E03, 0x516B, 0x4E5D, 0x8CA0, 0x0000};
894 return toCJKIdeographic(count, traditionalChineseInformalTable, Informal); 894 return toCJKIdeographic(count, traditionalChineseInformalTable, Informal);
895 } 895 }
896 case EListStyleType::SimpChineseInformal: { 896 case EListStyleType::kSimpChineseInformal: {
897 static const UChar simpleChineseInformalTable[22] = { 897 static const UChar simpleChineseInformalTable[22] = {
898 Chinese, 0x4E07, 0x0000, 0x4EBF, 0x0000, 0x4E07, 0x4EBF, 0x5341, 898 Chinese, 0x4E07, 0x0000, 0x4EBF, 0x0000, 0x4E07, 0x4EBF, 0x5341,
899 0x767E, 0x5343, 0x96F6, 0x4E00, 0x4E8C, 0x4E09, 0x56DB, 0x4E94, 899 0x767E, 0x5343, 0x96F6, 0x4E00, 0x4E8C, 0x4E09, 0x56DB, 0x4E94,
900 0x516D, 0x4E03, 0x516B, 0x4E5D, 0x8D1F, 0x0000}; 900 0x516D, 0x4E03, 0x516B, 0x4E5D, 0x8D1F, 0x0000};
901 return toCJKIdeographic(count, simpleChineseInformalTable, Informal); 901 return toCJKIdeographic(count, simpleChineseInformalTable, Informal);
902 } 902 }
903 case EListStyleType::TradChineseFormal: { 903 case EListStyleType::kTradChineseFormal: {
904 static const UChar traditionalChineseFormalTable[22] = { 904 static const UChar traditionalChineseFormalTable[22] = {
905 Chinese, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000, 0x62FE, 905 Chinese, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000, 0x62FE,
906 0x4F70, 0x4EDF, 0x96F6, 0x58F9, 0x8CB3, 0x53C3, 0x8086, 0x4F0D, 906 0x4F70, 0x4EDF, 0x96F6, 0x58F9, 0x8CB3, 0x53C3, 0x8086, 0x4F0D,
907 0x9678, 0x67D2, 0x634C, 0x7396, 0x8CA0, 0x0000}; 907 0x9678, 0x67D2, 0x634C, 0x7396, 0x8CA0, 0x0000};
908 return toCJKIdeographic(count, traditionalChineseFormalTable, Formal); 908 return toCJKIdeographic(count, traditionalChineseFormalTable, Formal);
909 } 909 }
910 case EListStyleType::SimpChineseFormal: { 910 case EListStyleType::kSimpChineseFormal: {
911 static const UChar simpleChineseFormalTable[22] = { 911 static const UChar simpleChineseFormalTable[22] = {
912 Chinese, 0x4E07, 0x0000, 0x4EBF, 0x0000, 0x4E07, 0x4EBF, 0x62FE, 912 Chinese, 0x4E07, 0x0000, 0x4EBF, 0x0000, 0x4E07, 0x4EBF, 0x62FE,
913 0x4F70, 0x4EDF, 0x96F6, 0x58F9, 0x8D30, 0x53C1, 0x8086, 0x4F0D, 913 0x4F70, 0x4EDF, 0x96F6, 0x58F9, 0x8D30, 0x53C1, 0x8086, 0x4F0D,
914 0x9646, 0x67D2, 0x634C, 0x7396, 0x8D1F, 0x0000}; 914 0x9646, 0x67D2, 0x634C, 0x7396, 0x8D1F, 0x0000};
915 return toCJKIdeographic(count, simpleChineseFormalTable, Formal); 915 return toCJKIdeographic(count, simpleChineseFormalTable, Formal);
916 } 916 }
917 917
918 case EListStyleType::LowerRoman: 918 case EListStyleType::kLowerRoman:
919 return toRoman(count, false); 919 return toRoman(count, false);
920 case EListStyleType::UpperRoman: 920 case EListStyleType::kUpperRoman:
921 return toRoman(count, true); 921 return toRoman(count, true);
922 922
923 case EListStyleType::Armenian: 923 case EListStyleType::kArmenian:
924 case EListStyleType::UpperArmenian: 924 case EListStyleType::kUpperArmenian:
925 // CSS3 says "armenian" means "lower-armenian". 925 // CSS3 says "armenian" means "lower-armenian".
926 // But the CSS2.1 test suite contains uppercase test results for 926 // But the CSS2.1 test suite contains uppercase test results for
927 // "armenian", so we'll match the test suite. 927 // "armenian", so we'll match the test suite.
928 return toArmenian(count, true); 928 return toArmenian(count, true);
929 case EListStyleType::LowerArmenian: 929 case EListStyleType::kLowerArmenian:
930 return toArmenian(count, false); 930 return toArmenian(count, false);
931 case EListStyleType::Georgian: 931 case EListStyleType::kGeorgian:
932 return toGeorgian(count); 932 return toGeorgian(count);
933 case EListStyleType::Hebrew: 933 case EListStyleType::kHebrew:
934 return toHebrew(count); 934 return toHebrew(count);
935 } 935 }
936 936
937 ASSERT_NOT_REACHED(); 937 ASSERT_NOT_REACHED();
938 return ""; 938 return "";
939 } 939 }
940 940
941 } // namespace ListMarkerText 941 } // namespace ListMarkerText
942 942
943 } // namespace blink 943 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698