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

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

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

Powered by Google App Engine
This is Rietveld 408576698