Changeset 54472 in webkit


Ignore:
Timestamp:
Feb 7, 2010 1:08:10 PM (14 years ago)
Author:
dbates@webkit.org
Message:

2010-02-07 Daniel Bates <dbates@webkit.org>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=34402

Implements all of the numeric CSS3 list-style-types as per
section 4.3 of the CSS3 Lists module <http://www.w3.org/TR/css3-lists/#numeric>.

Test: fast/lists/w3-css3-list-styles-numeric.html

  • css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
  • css/CSSValueKeywords.in:
  • inspector/front-end/SourceCSSTokenizer.re2js:
  • platform/text/CharacterNames.h: Added constant hyphenMinus.
  • rendering/RenderListMarker.cpp: (WebCore::): Defined enum SequenceType. (WebCore::toAlphabeticOrNumeric): Added. (WebCore::toAlphabetic): Modified to call WebCore::toAlphabeticOrNumeric. (WebCore::toNumeric): Added. (WebCore::listMarkerSuffix): (WebCore::listMarkerText): (WebCore::RenderListMarker::paint): (WebCore::RenderListMarker::calcPrefWidths): (WebCore::RenderListMarker::getRelativeMarkerRect):
  • rendering/style/RenderStyle.h: (WebCore::):
  • rendering/style/RenderStyleConstants.h: Added numeric list style types and fixed indent level for the enum values. (WebCore::):

2010-02-07 Daniel Bates <dbates@webkit.org>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=34402

Tests that all of the numeric CSS3 list-style-types are supported.

  • fast/lists/w3-css3-list-styles-numeric.html: Added.
  • platform/mac/fast/lists/w3-css3-list-styles-numeric-expected.txt: Added.
Location:
trunk
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r54470 r54472  
     12010-02-07  Daniel Bates  <dbates@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=34402
     6
     7        Tests that all of the numeric CSS3 list-style-types are supported.
     8
     9        * fast/lists/w3-css3-list-styles-numeric.html: Added.
     10        * platform/mac/fast/lists/w3-css3-list-styles-numeric-expected.txt: Added.
     11
    1122010-02-07  Pavel Feldman  <pfeldman@chromium.org>
    213
  • trunk/WebCore/ChangeLog

    r54471 r54472  
     12010-02-07  Daniel Bates  <dbates@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=34402
     6
     7        Implements all of the numeric CSS3 list-style-types as per
     8        section 4.3 of the CSS3 Lists module <http://www.w3.org/TR/css3-lists/#numeric>.
     9
     10        Test: fast/lists/w3-css3-list-styles-numeric.html
     11
     12        * css/CSSPrimitiveValueMappings.h:
     13        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
     14        * css/CSSValueKeywords.in:
     15        * inspector/front-end/SourceCSSTokenizer.re2js:
     16        * platform/text/CharacterNames.h: Added constant hyphenMinus.
     17        * rendering/RenderListMarker.cpp:
     18        (WebCore::): Defined enum SequenceType.
     19        (WebCore::toAlphabeticOrNumeric): Added.
     20        (WebCore::toAlphabetic): Modified to call WebCore::toAlphabeticOrNumeric.
     21        (WebCore::toNumeric): Added.
     22        (WebCore::listMarkerSuffix):
     23        (WebCore::listMarkerText):
     24        (WebCore::RenderListMarker::paint):
     25        (WebCore::RenderListMarker::calcPrefWidths):
     26        (WebCore::RenderListMarker::getRelativeMarkerRect):
     27        * rendering/style/RenderStyle.h:
     28        (WebCore::):
     29        * rendering/style/RenderStyleConstants.h: Added numeric list style types
     30        and fixed indent level for the enum values.
     31        (WebCore::):
     32
    1332010-02-07  Ismail Donmez  <ismail@namtrac.org>
    234
  • trunk/WebCore/css/CSSPrimitiveValueMappings.h

    r53452 r54472  
    946946        m_value.ident = CSSValueAmharicAbegede;
    947947        break;
     948    case ArabicIndic:
     949        m_value.ident = CSSValueArabicIndic;
     950        break;
    948951    case Armenian:
    949952        m_value.ident = CSSValueArmenian;
    950953        break;
     954    case BinaryListStyle:
     955        m_value.ident = CSSValueBinary;
     956        break;
     957    case Bengali:
     958        m_value.ident = CSSValueBengali;
     959        break;
     960    case Cambodian:
     961        m_value.ident = CSSValueCambodian;
     962        break;
    951963    case Circle:
    952964        m_value.ident = CSSValueCircle;
     
    967979        m_value.ident = CSSValueDecimal;
    968980        break;
     981    case Devanagari:
     982        m_value.ident = CSSValueDevanagari;
     983        break;
    969984    case Disc:
    970985        m_value.ident = CSSValueDisc;
     
    10211036        m_value.ident = CSSValueGeorgian;
    10221037        break;
     1038    case Gujarati:
     1039        m_value.ident = CSSValueGujarati;
     1040        break;
     1041    case Gurmukhi:
     1042        m_value.ident = CSSValueGurmukhi;
     1043        break;
    10231044    case Hangul:
    10241045        m_value.ident = CSSValueHangul;
     
    10361057        m_value.ident = CSSValueHiraganaIroha;
    10371058        break;
     1059    case Kannada:
     1060        m_value.ident = CSSValueKannada;
     1061        break;
    10381062    case Katakana:
    10391063        m_value.ident = CSSValueKatakana;
     
    10421066        m_value.ident = CSSValueKatakanaIroha;
    10431067        break;
     1068    case Khmer:
     1069        m_value.ident = CSSValueKhmer;
     1070        break;
     1071    case Lao:
     1072        m_value.ident = CSSValueLao;
     1073        break;
    10441074    case LowerAlpha:
    10451075        m_value.ident = CSSValueLowerAlpha;
     
    10481078        m_value.ident = CSSValueLowerGreek;
    10491079        break;
     1080    case LowerHexadecimal:
     1081        m_value.ident = CSSValueLowerHexadecimal;
     1082        break;
    10501083    case LowerLatin:
    10511084        m_value.ident = CSSValueLowerLatin;
     
    10571090        m_value.ident = CSSValueLowerRoman;
    10581091        break;
     1092    case Malayalam:
     1093        m_value.ident = CSSValueMalayalam;
     1094        break;
     1095    case Mongolian:
     1096        m_value.ident = CSSValueMongolian;
     1097        break;
     1098    case Myanmar:
     1099        m_value.ident = CSSValueMyanmar;
     1100        break;
    10591101    case NoneListStyle:
    10601102        m_value.ident = CSSValueNone;
    10611103        break;
     1104    case Octal:
     1105        m_value.ident = CSSValueOctal;
     1106        break;
     1107    case Oriya:
     1108        m_value.ident = CSSValueOriya;
     1109        break;
    10621110    case Oromo:
    10631111        m_value.ident = CSSValueOromo;
    10641112        break;
     1113    case Persian:
     1114        m_value.ident = CSSValuePersian;
     1115        break;
    10651116    case Sidama:
    10661117        m_value.ident = CSSValueSidama;
     
    10721123        m_value.ident = CSSValueSquare;
    10731124        break;
     1125    case Telugu:
     1126        m_value.ident = CSSValueTelugu;
     1127        break;
     1128    case Thai:
     1129        m_value.ident = CSSValueThai;
     1130        break;
     1131    case Tibetan:
     1132        m_value.ident = CSSValueTibetan;
     1133        break;
    10741134    case Tigre:
    10751135        m_value.ident = CSSValueTigre;
     
    10931153        m_value.ident = CSSValueUpperGreek;
    10941154        break;
     1155    case UpperHexadecimal:
     1156        m_value.ident = CSSValueUpperHexadecimal;
     1157        break;
    10951158    case UpperLatin:
    10961159        m_value.ident = CSSValueUpperLatin;
     
    11011164    case UpperRoman:
    11021165        m_value.ident = CSSValueUpperRoman;
     1166        break;
     1167    case Urdu:
     1168        m_value.ident = CSSValueUrdu;
    11031169        break;
    11041170    }
  • trunk/WebCore/css/CSSValueKeywords.in

    r53452 r54472  
    226226decimal
    227227decimal-leading-zero
     228arabic-indic
     229binary
     230bengali
     231cambodian
     232khmer
     233devanagari
     234gujarati
     235gurmukhi
     236kannada
     237lower-hexadecimal
     238lao
     239malayalam
     240mongolian
     241myanmar
     242octal
     243oriya
     244persian
     245urdu
     246telugu
     247tibetan
     248thai
     249upper-hexadecimal
    228250lower-roman
    229251upper-roman
  • trunk/WebCore/inspector/front-end/SourceCSSTokenizer.re2js

    r54053 r54472  
    9999    this._valueKeywords = [
    100100        "above", "absolute", "activeborder", "activecaption", "afar", "after-white-space", "ahead", "alias", "all", "all-scroll",
    101         "alternate", "always","amharic", "amharic-abegede", "antialiased", "appworkspace", "aqua", "armenian", "auto", "avoid",
    102         "background", "backwards", "baseline", "below", "bidi-override", "black", "blink", "block", "block-axis", "blue", "bold",
    103         "bolder", "border", "border-box", "both", "bottom", "break-all", "break-word", "button", "button-bevel", "buttonface",
    104         "buttonhighlight", "buttonshadow", "buttontext", "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", "cell",
    105         "center", "checkbox", "circle", "cjk-earthly-branch", "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
    106         "col-resize", "collapse", "compact", "condensed", "contain", "content", "content-box", "context-menu", "continuous", "copy",
    107         "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal", "decimal-leading-zero", "default",
    108         "default-button", "destination-atop", "destination-in", "destination-out", "destination-over", "disc", "discard", "document",
     101        "alternate", "always","amharic", "amharic-abegede", "antialiased", "appworkspace", "aqua", "arabic-indic", "armenian",
     102        "auto", "avoid", "background", "backwards", "baseline", "below", "bidi-override", "binary", "bengali", "black", "blink",
     103        "block", "block-axis", "blue", "bold", "bolder", "border", "border-box", "both", "bottom", "break-all", "break-word", "button",
     104        "button-bevel", "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "cambodian", "capitalize", "caps-lock-indicator",
     105        "caption", "captiontext", "caret", "cell", "center", "checkbox", "circle", "cjk-earthly-branch", "cjk-heavenly-stem", "cjk-ideographic",
     106        "clear", "clip", "close-quote", "col-resize", "collapse", "compact", "condensed", "contain", "content", "content-box", "context-menu",
     107        "continuous", "copy", "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal", "decimal-leading-zero", "default",
     108        "default-button", "destination-atop", "destination-in", "destination-out", "destination-over", "devanagari", "disc", "discard", "document",
    109109        "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", "element",
    110110        "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez",
     
    113113        "ethiopic-halehame-so-et", "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", "ew-resize", "expanded",
    114114        "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "forwards", "from", "fuchsia", "geometricPrecision",
    115         "georgian", "gray", "graytext", "green", "grey", "groove", "hand", "hangul", "hangul-consonant", "hebrew", "help", "hidden", "hide",
    116         "higher", "highlight", "highlighttext", "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore",
     115        "georgian", "gray", "graytext", "green", "grey", "groove", "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew", "help",
     116        "hidden", "hide", "higher", "highlight", "highlighttext", "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore",
    117117        "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext", "inherit", "initial", "inline",
    118         "inline-axis", "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "katakana",
    119         "katakana-iroha", "landscape", "large", "larger", "left", "level", "lighter", "lime", "line-through", "linear", "lines",
    120         "list-button", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-alpha", "lower-greek", "lower-latin",
    121         "lower-norwegian", "lower-roman", "lowercase", "ltr", "maroon", "match", "media-controls-background", "media-current-time-display",
     118        "inline-axis", "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "kannada", "katakana",
     119        "katakana-iroha", "khmer", "landscape", "lao", "large", "larger", "left", "level", "lighter", "lime", "line-through", "linear", "lines",
     120        "list-button", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-alpha", "lower-greek", "lower-hexadecimal", "lower-latin",
     121        "lower-norwegian", "lower-roman", "lowercase", "ltr", "malayalam", "maroon", "match", "media-controls-background", "media-current-time-display",
    122122        "media-fullscreen-button", "media-mute-button", "media-play-button", "media-return-to-realtime-button", "media-rewind-button",
    123123        "media-seek-back-button", "media-seek-forward-button", "media-slider", "media-sliderthumb", "media-time-remaining-display",
    124124        "media-volume-slider", "media-volume-slider-container", "media-volume-sliderthumb", "medium", "menu", "menulist", "menulist-button",
    125         "menulist-text", "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", "mix", "monospace", "move", "multiple",
    126         "n-resize", "narrower", "navy", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none",
    127         "normal", "not-allowed", "nowrap", "ns-resize", "nw-resize", "nwse-resize", "oblique", "olive", "open-quote", "optimizeLegibility",
    128         "optimizeSpeed", "orange", "oromo", "outset", "outside", "overlay", "overline", "padding", "padding-box", "painted", "paused",
    129         "plus-darker", "plus-lighter", "pointer", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "purple",
     125        "menulist-text", "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", "mix", "mongolian", "monospace", "move", "multiple",
     126        "myanmar", "n-resize", "narrower", "navy", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none",
     127        "normal", "not-allowed", "nowrap", "ns-resize", "nw-resize", "nwse-resize", "oblique", "octal", "olive", "open-quote", "optimizeLegibility",
     128        "optimizeSpeed", "orange", "oriya", "oromo", "outset", "outside", "overlay", "overline", "padding", "padding-box", "painted", "paused",
     129        "persian", "plus-darker", "plus-lighter", "pointer", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "purple",
    130130        "push-button", "radio", "read-only", "read-write", "read-write-plaintext-only", "red", "relative", "repeat", "repeat-x",
    131131        "repeat-y", "reset", "reverse", "rgb", "rgba", "ridge", "right", "round", "row-resize", "rtl", "run-in", "running", "s-resize", "sans-serif",
     
    136136        "space", "square", "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub", "subpixel-antialiased", "super",
    137137        "sw-resize", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group",
    138         "table-row", "table-row-group", "teal", "text", "text-bottom", "text-top", "textarea", "textfield", "thick", "thin", "threeddarkshadow",
    139         "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "tigre", "tigrinya-er", "tigrinya-er-abegede", "tigrinya-et",
    140         "tigrinya-et-abegede", "to", "top", "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", "upper-alpha", "upper-greek",
    141         "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "url", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
    142         "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext", "x-large", "x-small",
    143         "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle", "-webkit-body",
    144         "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing", "-webkit-gradient", "-webkit-inline-box",
    145         "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-right", "-webkit-small-control",
    146         "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
     138        "table-row", "table-row-group", "teal", "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai", "thick", "thin",
     139        "threeddarkshadow", "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er", "tigrinya-er-abegede",
     140        "tigrinya-et", "tigrinya-et-abegede", "to", "top", "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", "upper-alpha", "upper-greek",
     141        "upper-hexadecimal", "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url", "vertical", "vertical-text", "visible",
     142        "visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext",
     143        "x-large", "x-small", "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle",
     144        "-webkit-body", "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing",
     145        "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-right",
     146        "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
    147147    ].keySet();
    148148
  • trunk/WebCore/platform/text/CharacterNames.h

    r53452 r54472  
    4242    const UChar hebrewPunctuationGershayim = 0x05F4;
    4343    const UChar horizontalEllipsis = 0x2026;
     44    const UChar hyphenMinus = 0x002D;
    4445    const UChar ideographicComma = 0x3001;
    4546    const UChar ideographicFullStop = 0x3002;
  • trunk/WebCore/rendering/RenderListMarker.cpp

    r53603 r54472  
    4242const int cMarkerPadding = 7;
    4343
     44enum SequenceType { NumericSequence, AlphabeticSequence };
     45
    4446static String toRoman(int number, bool upper)
    4547{
     
    7981}
    8082
     83static inline String toAlphabeticOrNumeric(int number, const UChar* sequence, int sequenceSize, SequenceType type)
     84{
     85    ASSERT(sequenceSize >= 2);
     86
     87    const int lettersSize = sizeof(number) * 8 + 1; // Binary is the worst case; requires one character per bit plus a minus sign.
     88
     89    UChar letters[lettersSize];
     90
     91    bool isNegativeNumber = false;
     92    unsigned numberShadow = number;
     93    if (type == AlphabeticSequence) {
     94        ASSERT(number > 0);
     95        --numberShadow;
     96    } else if (number < 0) {
     97        numberShadow = -number;
     98        isNegativeNumber = true;
     99    }
     100    letters[lettersSize - 1] = sequence[numberShadow % sequenceSize];
     101    int length = 1;
     102
     103    if (type == AlphabeticSequence) {
     104        while ((numberShadow /= sequenceSize) > 0)
     105            letters[lettersSize - ++length] = sequence[numberShadow % sequenceSize - 1];
     106    } else {
     107        while ((numberShadow /= sequenceSize) > 0)
     108            letters[lettersSize - ++length] = sequence[numberShadow % sequenceSize];
     109    }
     110    if (isNegativeNumber)
     111        letters[lettersSize - ++length] = hyphenMinus;
     112
     113    ASSERT(length <= lettersSize);
     114    return String(&letters[lettersSize - length], length);
     115}
     116
    81117static String toAlphabetic(int number, const UChar* alphabet, int alphabetSize)
    82118{
    83     ASSERT(alphabetSize >= 10);
    84 
    85119    if (number < 1)
    86120        return String::number(number);
    87121
    88     const int lettersSize = 10; // big enough for a 32-bit int, with a 10-letter alphabet
    89     UChar letters[lettersSize];
    90 
    91     --number;
    92     letters[lettersSize - 1] = alphabet[number % alphabetSize];
    93     int length = 1;
    94     while ((number /= alphabetSize) > 0)
    95         letters[lettersSize - ++length] = alphabet[number % alphabetSize - 1];
    96 
    97     ASSERT(length <= lettersSize);
    98     return String(&letters[lettersSize - length], length);
     122    return toAlphabeticOrNumeric(number, alphabet, alphabetSize, AlphabeticSequence);
     123}
     124
     125static String toNumeric(int number, const UChar* numerals, int numeralsSize)
     126{
     127    return toAlphabeticOrNumeric(number, numerals, numeralsSize, NumericSequence);
    99128}
    100129
     
    102131{
    103132    return toAlphabetic(number, alphabet, size);
     133}
     134
     135template <size_t size> static inline String toNumeric(int number, const UChar(&alphabet)[size])
     136{
     137    return toNumeric(number, alphabet, size);
    104138}
    105139
     
    384418        return ethiopicPrefaceColon;
    385419    case Armenian:
     420    case ArabicIndic:
     421    case Bengali:
     422    case BinaryListStyle:
     423    case Cambodian:
    386424    case CJKIdeographic:
    387425    case CjkEarthlyBranch:
     
    389427    case DecimalLeadingZero:
    390428    case DecimalListStyle:
     429    case Devanagari:
    391430    case Georgian:
     431    case Gujarati:
     432    case Gurmukhi:
    392433    case Hangul:
    393434    case HangulConsonant:
     
    395436    case Hiragana:
    396437    case HiraganaIroha:
     438    case Kannada:
    397439    case Katakana:
    398440    case KatakanaIroha:
     441    case Khmer:
     442    case Lao:
    399443    case LowerAlpha:
    400444    case LowerGreek:
     445    case LowerHexadecimal:
    401446    case LowerLatin:
    402447    case LowerNorwegian:
    403448    case LowerRoman:
     449    case Malayalam:
     450    case Mongolian:
     451    case Myanmar:
     452    case Octal:
     453    case Oriya:
     454    case Persian:
     455    case Telugu:
     456    case Thai:
     457    case Tibetan:
    404458    case UpperAlpha:
    405459    case UpperGreek:
     460    case UpperHexadecimal:
    406461    case UpperLatin:
    407462    case UpperNorwegian:
    408463    case UpperRoman:
     464    case Urdu:
    409465        return '.';
    410466    }
     
    439495                return "-0" + String::number(-value); // -01 to -09
    440496            return "0" + String::number(value); // 00 to 09
     497
     498        case ArabicIndic: {
     499            static const UChar arabicIndicNumerals[10] = {
     500                0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669
     501            };
     502            return toNumeric(value, arabicIndicNumerals);
     503        }
     504        case BinaryListStyle: {
     505            static const UChar binaryNumerals[2] = {
     506                '0', '1'
     507            };
     508            return toNumeric(value, binaryNumerals);
     509        }
     510        case Bengali: {
     511            static const UChar bengaliNumerals[10] = {
     512                0x09E6, 0x09E7, 0x09E8, 0x09E9, 0x09EA, 0x09EB, 0x09EC, 0x09ED, 0x09EE, 0x09EF
     513            };
     514            return toNumeric(value, bengaliNumerals);
     515        }
     516        case Cambodian:
     517        case Khmer: {
     518            static const UChar khmerNumerals[10] = {
     519                0x17E0, 0x17E1, 0x17E2, 0x17E3, 0x17E4, 0x17E5, 0x17E6, 0x17E7, 0x17E8, 0x17E9
     520            };
     521            return toNumeric(value, khmerNumerals);
     522        }
     523        case Devanagari: {
     524            static const UChar devanagariNumerals[10] = {
     525                0x0966, 0x0967, 0x0968, 0x0969, 0x096A, 0x096B, 0x096C, 0x096D, 0x096E, 0x096F
     526            };
     527            return toNumeric(value, devanagariNumerals);
     528        }
     529        case Gujarati: {
     530            static const UChar gujaratiNumerals[10] = {
     531                0x0AE6, 0x0AE7, 0x0AE8, 0x0AE9, 0x0AEA, 0x0AEB, 0x0AEC, 0x0AED, 0x0AEE, 0x0AEF
     532            };
     533            return toNumeric(value, gujaratiNumerals);
     534        }
     535        case Gurmukhi: {
     536            static const UChar gurmukhiNumerals[10] = {
     537                0x0A66, 0x0A67, 0x0A68, 0x0A69, 0x0A6A, 0x0A6B, 0x0A6C, 0x0A6D, 0x0A6E, 0x0A6F
     538            };
     539            return toNumeric(value, gurmukhiNumerals);
     540        }
     541        case Kannada: {
     542            static const UChar kannadaNumerals[10] = {
     543                0x0CE6, 0x0CE7, 0x0CE8, 0x0CE9, 0x0CEA, 0x0CEB, 0x0CEC, 0x0CED, 0x0CEE, 0x0CEF
     544            };
     545            return toNumeric(value, kannadaNumerals);
     546        }
     547        case LowerHexadecimal: {
     548            static const UChar lowerHexadecimalNumerals[16] = {
     549                '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
     550            };
     551            return toNumeric(value, lowerHexadecimalNumerals);
     552        }
     553        case Lao: {
     554            static const UChar laoNumerals[10] = {
     555                0x0ED0, 0x0ED1, 0x0ED2, 0x0ED3, 0x0ED4, 0x0ED5, 0x0ED6, 0x0ED7, 0x0ED8, 0x0ED9
     556            };
     557            return toNumeric(value, laoNumerals);
     558        }
     559        case Malayalam: {
     560            static const UChar malayalamNumerals[10] = {
     561                0x0D66, 0x0D67, 0x0D68, 0x0D69, 0x0D6A, 0x0D6B, 0x0D6C, 0x0D6D, 0x0D6E, 0x0D6F
     562            };
     563            return toNumeric(value, malayalamNumerals);
     564        }
     565        case Mongolian: {
     566            static const UChar mongolianNumerals[10] = {
     567                0x1810, 0x1811, 0x1812, 0x1813, 0x1814, 0x1815, 0x1816, 0x1817, 0x1818, 0x1819
     568            };
     569            return toNumeric(value, mongolianNumerals);
     570        }
     571        case Myanmar: {
     572            static const UChar myanmarNumerals[10] = {
     573                0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047, 0x1048, 0x1049
     574            };
     575            return toNumeric(value, myanmarNumerals);
     576        }
     577        case Octal: {
     578            static const UChar octalNumerals[8] = {
     579                '0', '1', '2', '3', '4', '5', '6', '7'
     580            };
     581            return toNumeric(value, octalNumerals);
     582        }
     583        case Oriya: {
     584            static const UChar oriyaNumerals[10] = {
     585                0x0B66, 0x0B67, 0x0B68, 0x0B69, 0x0B6A, 0x0B6B, 0x0B6C, 0x0B6D, 0x0B6E, 0x0B6F
     586            };
     587            return toNumeric(value, oriyaNumerals);
     588        }
     589        case Persian:
     590        case Urdu: {
     591            static const UChar urduNumerals[10] = {
     592                0x06F0, 0x06F1, 0x06F2, 0x06F3, 0x06F4, 0x06F5, 0x06F6, 0x06F7, 0x06F8, 0x06F9
     593            };
     594            return toNumeric(value, urduNumerals);
     595        }
     596        case Telugu: {
     597            static const UChar teluguNumerals[10] = {
     598                0x0C66, 0x0C67, 0x0C68, 0x0C69, 0x0C6A, 0x0C6B, 0x0C6C, 0x0C6D, 0x0C6E, 0x0C6F
     599            };
     600            return toNumeric(value, teluguNumerals);
     601        }
     602        case Tibetan: {
     603            static const UChar tibetanNumerals[10] = {
     604                0x0F20, 0x0F21, 0x0F22, 0x0F23, 0x0F24, 0x0F25, 0x0F26, 0x0F27, 0x0F28, 0x0F29
     605            };
     606            return toNumeric(value, tibetanNumerals);
     607        }
     608        case Thai: {
     609            static const UChar thaiNumerals[10] = {
     610                0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, 0x0E58, 0x0E59
     611            };
     612            return toNumeric(value, thaiNumerals);
     613        }
     614        case UpperHexadecimal: {
     615            static const UChar upperHexadecimalNumerals[16] = {
     616                '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
     617            };
     618            return toNumeric(value, upperHexadecimalNumerals);
     619        }
    441620
    442621        case LowerAlpha:
     
    8521031        case Amharic:
    8531032        case AmharicAbegede:
     1033        case ArabicIndic:
    8541034        case Armenian:
     1035        case BinaryListStyle:
     1036        case Bengali:
     1037        case Cambodian:
    8551038        case CJKIdeographic:
    8561039        case CjkEarthlyBranch:
     
    8581041        case DecimalLeadingZero:
    8591042        case DecimalListStyle:
     1043        case Devanagari:
    8601044        case Ethiopic:
    8611045        case EthiopicAbegede:
     
    8751059        case EthiopicHalehameTig:
    8761060        case Georgian:
     1061        case Gujarati:
     1062        case Gurmukhi:
    8771063        case Hangul:
    8781064        case HangulConsonant:
     
    8801066        case Hiragana:
    8811067        case HiraganaIroha:
     1068        case Kannada:
    8821069        case Katakana:
    8831070        case KatakanaIroha:
     1071        case Khmer:
     1072        case Lao:
    8841073        case LowerAlpha:
    8851074        case LowerGreek:
     1075        case LowerHexadecimal:
    8861076        case LowerLatin:
    8871077        case LowerNorwegian:
    8881078        case LowerRoman:
     1079        case Malayalam:
     1080        case Mongolian:
     1081        case Myanmar:
     1082        case Octal:
     1083        case Oriya:
    8891084        case Oromo:
     1085        case Persian:
    8901086        case Sidama:
    8911087        case Somali:
     1088        case Telugu:
     1089        case Thai:
     1090        case Tibetan:
    8921091        case Tigre:
    8931092        case TigrinyaEr:
     
    8971096        case UpperAlpha:
    8981097        case UpperGreek:
     1098        case UpperHexadecimal:
    8991099        case UpperLatin:
    9001100        case UpperNorwegian:
    9011101        case UpperRoman:
     1102        case Urdu:
    9021103            break;
    9031104    }
     
    10051206        case Amharic:
    10061207        case AmharicAbegede:
     1208        case ArabicIndic:
    10071209        case Armenian:
     1210        case BinaryListStyle:
     1211        case Bengali:
     1212        case Cambodian:
    10081213        case CJKIdeographic:
    10091214        case CjkEarthlyBranch:
     
    10111216        case DecimalLeadingZero:
    10121217        case DecimalListStyle:
     1218        case Devanagari:
    10131219        case Ethiopic:
    10141220        case EthiopicAbegede:
     
    10281234        case EthiopicHalehameTig:
    10291235        case Georgian:
     1236        case Gujarati:
     1237        case Gurmukhi:
    10301238        case Hangul:
    10311239        case HangulConsonant:
     
    10331241        case Hiragana:
    10341242        case HiraganaIroha:
     1243        case Kannada:
    10351244        case Katakana:
    10361245        case KatakanaIroha:
     1246        case Khmer:
     1247        case Lao:
    10371248        case LowerAlpha:
    10381249        case LowerGreek:
     1250        case LowerHexadecimal:
    10391251        case LowerLatin:
    10401252        case LowerNorwegian:
    10411253        case LowerRoman:
     1254        case Malayalam:
     1255        case Mongolian:
     1256        case Myanmar:
     1257        case Octal:
     1258        case Oriya:
    10421259        case Oromo:
     1260        case Persian:
    10431261        case Sidama:
    10441262        case Somali:
     1263        case Telugu:
     1264        case Thai:
     1265        case Tibetan:
    10451266        case Tigre:
    10461267        case TigrinyaEr:
     
    10501271        case UpperAlpha:
    10511272        case UpperGreek:
     1273        case UpperHexadecimal:
    10521274        case UpperLatin:
    10531275        case UpperNorwegian:
    10541276        case UpperRoman:
     1277        case Urdu:
    10551278            m_text = listMarkerText(type, m_listItem->value());
    10561279            if (m_text.isEmpty())
     
    11861409        case Amharic:
    11871410        case AmharicAbegede:
     1411        case ArabicIndic:
    11881412        case Armenian:
     1413        case BinaryListStyle:
     1414        case Bengali:
     1415        case Cambodian:
    11891416        case CJKIdeographic:
    11901417        case CjkEarthlyBranch:
     
    11921419        case DecimalLeadingZero:
    11931420        case DecimalListStyle:
     1421        case Devanagari:
    11941422        case Ethiopic:
    11951423        case EthiopicAbegede:
     
    12091437        case EthiopicHalehameTig:
    12101438        case Georgian:
     1439        case Gujarati:
     1440        case Gurmukhi:
    12111441        case Hangul:
    12121442        case HangulConsonant:
     
    12141444        case Hiragana:
    12151445        case HiraganaIroha:
     1446        case Kannada:
    12161447        case Katakana:
    12171448        case KatakanaIroha:
     1449        case Khmer:
     1450        case Lao:
    12181451        case LowerAlpha:
    12191452        case LowerGreek:
     1453        case LowerHexadecimal:
    12201454        case LowerLatin:
    12211455        case LowerNorwegian:
    12221456        case LowerRoman:
     1457        case Malayalam:
     1458        case Mongolian:
     1459        case Myanmar:
     1460        case Octal:
     1461        case Oriya:
    12231462        case Oromo:
     1463        case Persian:
    12241464        case Sidama:
    12251465        case Somali:
     1466        case Telugu:
     1467        case Thai:
     1468        case Tibetan:
    12261469        case Tigre:
    12271470        case TigrinyaEr:
     
    12311474        case UpperAlpha:
    12321475        case UpperGreek:
     1476        case UpperHexadecimal:
    12331477        case UpperLatin:
    12341478        case UpperNorwegian:
    12351479        case UpperRoman:
     1480        case Urdu:
    12361481            if (m_text.isEmpty())
    12371482                return IntRect();
  • trunk/WebCore/rendering/style/RenderStyle.h

    r54045 r54472  
    184184        unsigned _empty_cells : 1; // EEmptyCell
    185185        unsigned _caption_side : 2; // ECaptionSide
    186         unsigned _list_style_type : 6; // EListStyleType
     186        unsigned _list_style_type : 7; // EListStyleType
    187187        unsigned _list_style_position : 1; // EListStylePosition
    188188        unsigned _visibility : 2; // EVisibility
     
    195195        unsigned _white_space : 3; // EWhiteSpace
    196196        unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction property, flexible box layout module)
    197         // 33 bits
     197        // 34 bits
    198198       
    199199        // non CSS2 inherited
     
    202202        bool _force_backgrounds_to_white : 1;
    203203        unsigned _pointerEvents : 4; // EPointerEvents
    204         // 40 bits
     204        // 41 bits
    205205    } inherited_flags;
    206206
  • trunk/WebCore/rendering/style/RenderStyleConstants.h

    r53452 r54472  
    206206// The order of this enum must match the order of the list style types in CSSValueKeywords.in.
    207207enum EListStyleType {
    208      Disc,
    209      Circle,
    210      Square,
    211      DecimalListStyle,
    212      DecimalLeadingZero,
    213      LowerRoman,
    214      UpperRoman,
    215      LowerGreek,
    216      LowerAlpha,
    217      LowerLatin,
    218      UpperAlpha,
    219      UpperLatin,
    220      Afar,
    221      EthiopicHalehameAaEt,
    222      EthiopicHalehameAaEr,
    223      Amharic,
    224      EthiopicHalehameAmEt,
    225      AmharicAbegede,
    226      EthiopicAbegedeAmEt,
    227      CjkEarthlyBranch,
    228      CjkHeavenlyStem,
    229      Ethiopic,
    230      EthiopicHalehameGez,
    231      EthiopicAbegede,
    232      EthiopicAbegedeGez,
    233      HangulConsonant,
    234      Hangul,
    235      LowerNorwegian,
    236      Oromo,
    237      EthiopicHalehameOmEt,
    238      Sidama,
    239      EthiopicHalehameSidEt,
    240      Somali,
    241      EthiopicHalehameSoEt,
    242      Tigre,
    243      EthiopicHalehameTig,
    244      TigrinyaEr,
    245      EthiopicHalehameTiEr,
    246      TigrinyaErAbegede,
    247      EthiopicAbegedeTiEr,
    248      TigrinyaEt,
    249      EthiopicHalehameTiEt,
    250      TigrinyaEtAbegede,
    251      EthiopicAbegedeTiEt,
    252      UpperGreek,
    253      UpperNorwegian,
    254      Hebrew,
    255      Armenian,
    256      Georgian,
    257      CJKIdeographic,
    258      Hiragana,
    259      Katakana,
    260      HiraganaIroha,
    261      KatakanaIroha,
    262      NoneListStyle
     208    Disc,
     209    Circle,
     210    Square,
     211    DecimalListStyle,
     212    DecimalLeadingZero,
     213    ArabicIndic,
     214    BinaryListStyle,
     215    Bengali,
     216    Cambodian,
     217    Khmer,
     218    Devanagari,
     219    Gujarati,
     220    Gurmukhi,
     221    Kannada,
     222    LowerHexadecimal,
     223    Lao,
     224    Malayalam,
     225    Mongolian,
     226    Myanmar,
     227    Octal,
     228    Oriya,
     229    Persian,
     230    Urdu,
     231    Telugu,
     232    Tibetan,
     233    Thai,
     234    UpperHexadecimal,
     235    LowerRoman,
     236    UpperRoman,
     237    LowerGreek,
     238    LowerAlpha,
     239    LowerLatin,
     240    UpperAlpha,
     241    UpperLatin,
     242    Afar,
     243    EthiopicHalehameAaEt,
     244    EthiopicHalehameAaEr,
     245    Amharic,
     246    EthiopicHalehameAmEt,
     247    AmharicAbegede,
     248    EthiopicAbegedeAmEt,
     249    CjkEarthlyBranch,
     250    CjkHeavenlyStem,
     251    Ethiopic,
     252    EthiopicHalehameGez,
     253    EthiopicAbegede,
     254    EthiopicAbegedeGez,
     255    HangulConsonant,
     256    Hangul,
     257    LowerNorwegian,
     258    Oromo,
     259    EthiopicHalehameOmEt,
     260    Sidama,
     261    EthiopicHalehameSidEt,
     262    Somali,
     263    EthiopicHalehameSoEt,
     264    Tigre,
     265    EthiopicHalehameTig,
     266    TigrinyaEr,
     267    EthiopicHalehameTiEr,
     268    TigrinyaErAbegede,
     269    EthiopicAbegedeTiEr,
     270    TigrinyaEt,
     271    EthiopicHalehameTiEt,
     272    TigrinyaEtAbegede,
     273    EthiopicAbegedeTiEt,
     274    UpperGreek,
     275    UpperNorwegian,
     276    Hebrew,
     277    Armenian,
     278    Georgian,
     279    CJKIdeographic,
     280    Hiragana,
     281    Katakana,
     282    HiraganaIroha,
     283    KatakanaIroha,
     284    NoneListStyle
    263285};
    264286
Note: See TracChangeset for help on using the changeset viewer.