Changeset 53452 in webkit


Ignore:
Timestamp:
Jan 18, 2010 7:10:41 PM (14 years ago)
Author:
dbates@webkit.org
Message:

2010-01-18 Daniel Bates <dbates@webkit.org>

Reviewed by Darin Adler.

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

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

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

  • css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Updated comment to include added list-style-types.
  • css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added new list style types, alphabetized enums, and removed indent to conform to the WebKit Code Style Guidelines.
  • css/CSSValueKeywords.in:
  • inspector/front-end/CSSSourceSyntaxHighlighter.js: (WebInspector.CSSSourceSyntaxHighlighter): Added new list style types and alphabetized array valueKeywords.
  • platform/text/CharacterNames.h: Added constant ethiopicPrefaceColon.
  • rendering/RenderListMarker.cpp: (WebCore::toAlphabetic): (WebCore::listMarkerSuffix): Added. (WebCore::listMarkerText): (WebCore::RenderListMarker::paint): Modified to call WebCore::listMarkerSuffix. (WebCore::RenderListMarker::calcPrefWidths): Ditto. (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
  • rendering/style/RenderStyle.h: (WebCore::):
  • rendering/style/RenderStyleConstants.h: (WebCore::):

2010-01-18 Daniel Bates <dbates@webkit.org>

Reviewed by Darin Adler.

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

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

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

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53450 r53452  
     12010-01-18  Daniel Bates  <dbates@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=33089
     6
     7        Tests that all of the alphabetic CSS3 list-style-types are supported.
     8
     9        * fast/lists/w3-css3-list-styles-alphabetic.html: Added.
     10        * platform/mac/fast/lists/w3-css3-list-styles-alphabetic-expected.txt: Added.
     11
    1122010-01-18  Dan Bernstein  <mitz@apple.com>
    213
  • trunk/WebCore/ChangeLog

    r53451 r53452  
     12010-01-18  Daniel Bates  <dbates@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=33089
     6
     7        Implements all of the alphabetic CSS3 list-style-types as per
     8        section 4.4 of the CSS3 Lists module <http://www.w3.org/TR/css3-lists/#alphabetic>.
     9
     10        Test: fast/lists/w3-css3-list-styles-alphabetic.html
     11
     12        * css/CSSParser.cpp:
     13        (WebCore::CSSParser::parseValue): Updated comment to include
     14        added list-style-types.
     15        * css/CSSPrimitiveValueMappings.h:
     16        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added new list style types,
     17        alphabetized enums, and removed indent to conform to the WebKit Code Style Guidelines.
     18        * css/CSSValueKeywords.in:
     19        * inspector/front-end/CSSSourceSyntaxHighlighter.js:
     20        (WebInspector.CSSSourceSyntaxHighlighter): Added new list style types
     21        and alphabetized array valueKeywords.
     22        * platform/text/CharacterNames.h: Added constant ethiopicPrefaceColon.
     23        * rendering/RenderListMarker.cpp:
     24        (WebCore::toAlphabetic):
     25        (WebCore::listMarkerSuffix): Added.
     26        (WebCore::listMarkerText):
     27        (WebCore::RenderListMarker::paint): Modified to call WebCore::listMarkerSuffix.
     28        (WebCore::RenderListMarker::calcPrefWidths): Ditto.
     29        (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
     30        * rendering/style/RenderStyle.h:
     31        (WebCore::):
     32        * rendering/style/RenderStyleConstants.h:
     33        (WebCore::):
     34
    1352010-01-18  Daniel Bates  <dbates@webkit.org>
    236
  • trunk/WebCore/css/CSSParser.cpp

    r53157 r53452  
    689689
    690690    case CSSPropertyListStyleType:
    691         // disc | circle | square | decimal | decimal-leading-zero | lower-roman |
    692         // upper-roman | lower-greek | lower-alpha | lower-latin | upper-alpha |
    693         // upper-latin | hebrew | armenian | georgian | cjk-ideographic | hiragana |
    694         // katakana | hiragana-iroha | katakana-iroha | none | inherit
     691        // See section CSS_PROP_LIST_STYLE_TYPE of file CSSValueKeywords.in
     692        // for the list of supported list-style-types.
    695693        if ((id >= CSSValueDisc && id <= CSSValueKatakanaIroha) || id == CSSValueNone)
    696694            valid_primitive = true;
  • trunk/WebCore/css/CSSPrimitiveValueMappings.h

    r52521 r53452  
    937937{
    938938    switch (e) {
    939         case NoneListStyle:
    940             m_value.ident = CSSValueNone;
    941             break;
    942         case Disc:
    943             m_value.ident = CSSValueDisc;
    944             break;
    945         case Circle:
    946             m_value.ident = CSSValueCircle;
    947             break;
    948         case Square:
    949             m_value.ident = CSSValueSquare;
    950             break;
    951         case DecimalListStyle:
    952             m_value.ident = CSSValueDecimal;
    953             break;
    954         case DecimalLeadingZero:
    955             m_value.ident = CSSValueDecimalLeadingZero;
    956             break;
    957         case LowerRoman:
    958             m_value.ident = CSSValueLowerRoman;
    959             break;
    960         case UpperRoman:
    961             m_value.ident = CSSValueUpperRoman;
    962             break;
    963         case LowerGreek:
    964             m_value.ident = CSSValueLowerGreek;
    965             break;
    966         case LowerAlpha:
    967             m_value.ident = CSSValueLowerAlpha;
    968             break;
    969         case LowerLatin:
    970             m_value.ident = CSSValueLowerLatin;
    971             break;
    972         case UpperAlpha:
    973             m_value.ident = CSSValueUpperAlpha;
    974             break;
    975         case UpperLatin:
    976             m_value.ident = CSSValueUpperLatin;
    977             break;
    978         case Hebrew:
    979             m_value.ident = CSSValueHebrew;
    980             break;
    981         case Armenian:
    982             m_value.ident = CSSValueArmenian;
    983             break;
    984         case Georgian:
    985             m_value.ident = CSSValueGeorgian;
    986             break;
    987         case CJKIdeographic:
    988             m_value.ident = CSSValueCjkIdeographic;
    989             break;
    990         case Hiragana:
    991             m_value.ident = CSSValueHiragana;
    992             break;
    993         case Katakana:
    994             m_value.ident = CSSValueKatakana;
    995             break;
    996         case HiraganaIroha:
    997             m_value.ident = CSSValueHiraganaIroha;
    998             break;
    999         case KatakanaIroha:
    1000             m_value.ident = CSSValueKatakanaIroha;
    1001             break;
     939    case Afar:
     940        m_value.ident = CSSValueAfar;
     941        break;
     942    case Amharic:
     943        m_value.ident = CSSValueAmharic;
     944        break;
     945    case AmharicAbegede:
     946        m_value.ident = CSSValueAmharicAbegede;
     947        break;
     948    case Armenian:
     949        m_value.ident = CSSValueArmenian;
     950        break;
     951    case Circle:
     952        m_value.ident = CSSValueCircle;
     953        break;
     954    case CjkEarthlyBranch:
     955        m_value.ident = CSSValueCjkEarthlyBranch;
     956        break;
     957    case CjkHeavenlyStem:
     958        m_value.ident = CSSValueCjkHeavenlyStem;
     959        break;
     960    case CJKIdeographic:
     961        m_value.ident = CSSValueCjkIdeographic;
     962        break;
     963    case DecimalLeadingZero:
     964        m_value.ident = CSSValueDecimalLeadingZero;
     965        break;
     966    case DecimalListStyle:
     967        m_value.ident = CSSValueDecimal;
     968        break;
     969    case Disc:
     970        m_value.ident = CSSValueDisc;
     971        break;
     972    case Ethiopic:
     973        m_value.ident = CSSValueEthiopic;
     974        break;
     975    case EthiopicAbegede:
     976        m_value.ident = CSSValueEthiopicAbegede;
     977        break;
     978    case EthiopicAbegedeAmEt:
     979        m_value.ident = CSSValueEthiopicAbegedeAmEt;
     980        break;
     981    case EthiopicAbegedeGez:
     982        m_value.ident = CSSValueEthiopicAbegedeGez;
     983        break;
     984    case EthiopicAbegedeTiEr:
     985        m_value.ident = CSSValueEthiopicAbegedeTiEr;
     986        break;
     987    case EthiopicAbegedeTiEt:
     988        m_value.ident = CSSValueEthiopicAbegedeTiEt;
     989        break;
     990    case EthiopicHalehameAaEr:
     991        m_value.ident = CSSValueEthiopicHalehameAaEr;
     992        break;
     993    case EthiopicHalehameAaEt:
     994        m_value.ident = CSSValueEthiopicHalehameAaEt;
     995        break;
     996    case EthiopicHalehameAmEt:
     997        m_value.ident = CSSValueEthiopicHalehameAmEt;
     998        break;
     999    case EthiopicHalehameGez:
     1000        m_value.ident = CSSValueEthiopicHalehameGez;
     1001        break;
     1002    case EthiopicHalehameOmEt:
     1003        m_value.ident = CSSValueEthiopicHalehameOmEt;
     1004        break;
     1005    case EthiopicHalehameSidEt:
     1006        m_value.ident = CSSValueEthiopicHalehameSidEt;
     1007        break;
     1008    case EthiopicHalehameSoEt:
     1009        m_value.ident = CSSValueEthiopicHalehameSoEt;
     1010        break;
     1011    case EthiopicHalehameTiEr:
     1012        m_value.ident = CSSValueEthiopicHalehameTiEr;
     1013        break;
     1014    case EthiopicHalehameTiEt:
     1015        m_value.ident = CSSValueEthiopicHalehameTiEt;
     1016        break;
     1017    case EthiopicHalehameTig:
     1018        m_value.ident = CSSValueEthiopicHalehameTig;
     1019        break;
     1020    case Georgian:
     1021        m_value.ident = CSSValueGeorgian;
     1022        break;
     1023    case Hangul:
     1024        m_value.ident = CSSValueHangul;
     1025        break;
     1026    case HangulConsonant:
     1027        m_value.ident = CSSValueHangulConsonant;
     1028        break;
     1029    case Hebrew:
     1030        m_value.ident = CSSValueHebrew;
     1031        break;
     1032    case Hiragana:
     1033        m_value.ident = CSSValueHiragana;
     1034        break;
     1035    case HiraganaIroha:
     1036        m_value.ident = CSSValueHiraganaIroha;
     1037        break;
     1038    case Katakana:
     1039        m_value.ident = CSSValueKatakana;
     1040        break;
     1041    case KatakanaIroha:
     1042        m_value.ident = CSSValueKatakanaIroha;
     1043        break;
     1044    case LowerAlpha:
     1045        m_value.ident = CSSValueLowerAlpha;
     1046        break;
     1047    case LowerGreek:
     1048        m_value.ident = CSSValueLowerGreek;
     1049        break;
     1050    case LowerLatin:
     1051        m_value.ident = CSSValueLowerLatin;
     1052        break;
     1053    case LowerNorwegian:
     1054        m_value.ident = CSSValueLowerNorwegian;
     1055        break;
     1056    case LowerRoman:
     1057        m_value.ident = CSSValueLowerRoman;
     1058        break;
     1059    case NoneListStyle:
     1060        m_value.ident = CSSValueNone;
     1061        break;
     1062    case Oromo:
     1063        m_value.ident = CSSValueOromo;
     1064        break;
     1065    case Sidama:
     1066        m_value.ident = CSSValueSidama;
     1067        break;
     1068    case Somali:
     1069        m_value.ident = CSSValueSomali;
     1070        break;
     1071    case Square:
     1072        m_value.ident = CSSValueSquare;
     1073        break;
     1074    case Tigre:
     1075        m_value.ident = CSSValueTigre;
     1076        break;
     1077    case TigrinyaEr:
     1078        m_value.ident = CSSValueTigrinyaEr;
     1079        break;
     1080    case TigrinyaErAbegede:
     1081        m_value.ident = CSSValueTigrinyaErAbegede;
     1082        break;
     1083    case TigrinyaEt:
     1084        m_value.ident = CSSValueTigrinyaEt;
     1085        break;
     1086    case TigrinyaEtAbegede:
     1087        m_value.ident = CSSValueTigrinyaEtAbegede;
     1088        break;
     1089    case UpperAlpha:
     1090        m_value.ident = CSSValueUpperAlpha;
     1091        break;
     1092    case UpperGreek:
     1093        m_value.ident = CSSValueUpperGreek;
     1094        break;
     1095    case UpperLatin:
     1096        m_value.ident = CSSValueUpperLatin;
     1097        break;
     1098    case UpperNorwegian:
     1099        m_value.ident = CSSValueUpperNorwegian;
     1100        break;
     1101    case UpperRoman:
     1102        m_value.ident = CSSValueUpperRoman;
     1103        break;
    10021104    }
    10031105}
  • trunk/WebCore/css/CSSValueKeywords.in

    r52432 r53452  
    233233upper-alpha
    234234upper-latin
     235afar
     236ethiopic-halehame-aa-et
     237ethiopic-halehame-aa-er
     238amharic
     239ethiopic-halehame-am-et
     240amharic-abegede
     241ethiopic-abegede-am-et
     242cjk-earthly-branch
     243cjk-heavenly-stem
     244ethiopic
     245ethiopic-halehame-gez
     246ethiopic-abegede
     247ethiopic-abegede-gez
     248hangul-consonant
     249hangul
     250lower-norwegian
     251oromo
     252ethiopic-halehame-om-et
     253sidama
     254ethiopic-halehame-sid-et
     255somali
     256ethiopic-halehame-so-et
     257tigre
     258ethiopic-halehame-tig
     259tigrinya-er
     260ethiopic-halehame-ti-er
     261tigrinya-er-abegede
     262ethiopic-abegede-ti-er
     263tigrinya-et
     264ethiopic-halehame-ti-et
     265tigrinya-et-abegede
     266ethiopic-abegede-ti-et
     267upper-greek
     268upper-norwegian
    235269hebrew
    236270armenian
  • trunk/WebCore/inspector/front-end/CSSSourceSyntaxHighlighter.js

    r52495 r53452  
    108108   
    109109    const valueKeywords = [
    110         "inherit", "initial", "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed",
    111         "solid", "double", "caption", "icon", "menu", "message-box", "small-caption", "-webkit-mini-control",
    112         "-webkit-small-control", "-webkit-control", "status-bar", "italic", "oblique", "all", "small-caps",
    113         "normal", "bold", "bolder", "lighter", "xx-small", "x-small", "small", "medium", "large", "x-large",
    114         "xx-large", "-webkit-xxx-large", "smaller", "larger", "wider", "narrower", "ultra-condensed",
    115         "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded",
    116         "ultra-expanded", "serif", "sans-serif", "cursive", "fantasy", "monospace", "-webkit-body", "aqua",
    117         "black", "blue", "fuchsia", "gray", "green", "lime", "maroon", "navy", "olive", "orange", "purple",
    118         "red", "silver", "teal", "white", "yellow", "transparent", "-webkit-link", "-webkit-activelink",
    119         "activeborder", "activecaption", "appworkspace", "background", "buttonface", "buttonhighlight",
    120         "buttonshadow", "buttontext", "captiontext", "graytext", "highlight", "highlighttext", "inactiveborder",
    121         "inactivecaption", "inactivecaptiontext", "infobackground", "infotext", "match", "menutext", "scrollbar",
    122         "threeddarkshadow", "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "window",
    123         "windowframe", "windowtext", "-webkit-focus-ring-color", "currentcolor", "grey", "-webkit-text", "repeat",
    124         "repeat-x", "repeat-y", "no-repeat", "clear", "copy", "source-over", "source-in", "source-out",
    125         "source-atop", "destination-over", "destination-in", "destination-out", "destination-atop", "xor",
    126         "plus-darker", "plus-lighter", "baseline", "middle", "sub", "super", "text-top", "text-bottom", "top",
    127         "bottom", "-webkit-baseline-middle", "-webkit-auto", "left", "right", "center", "justify", "-webkit-left",
    128         "-webkit-right", "-webkit-center", "outside", "inside", "disc", "circle", "square", "decimal",
    129         "decimal-leading-zero", "lower-roman", "upper-roman", "lower-greek", "lower-alpha", "lower-latin",
    130         "upper-alpha", "upper-latin", "hebrew", "armenian", "georgian", "cjk-ideographic", "hiragana", "katakana",
    131         "hiragana-iroha", "katakana-iroha", "inline", "block", "list-item", "run-in", "compact", "inline-block",
    132         "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row",
    133         "table-column-group", "table-column", "table-cell", "table-caption", "-webkit-box", "-webkit-inline-box",
    134         "-wap-marquee", "auto", "crosshair", "default", "pointer", "move", "vertical-text", "cell", "context-menu",
    135         "alias", "progress", "no-drop", "not-allowed", "-webkit-zoom-in", "-webkit-zoom-out", "e-resize", "ne-resize",
    136         "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "ew-resize", "ns-resize", "nesw-resize",
    137         "nwse-resize", "col-resize", "row-resize", "text", "wait", "help", "all-scroll", "-webkit-grab", "-webkit-grabbing",
    138         "ltr", "rtl", "capitalize", "uppercase", "lowercase", "visible", "collapse", "above", "absolute", "always",
    139         "avoid", "below", "bidi-override", "blink", "both", "close-quote", "crop", "cross", "embed", "fixed", "hand",
    140         "hide", "higher", "invert", "landscape", "level", "line-through", "local", "loud", "lower", "-webkit-marquee",
    141         "mix", "no-close-quote", "no-open-quote", "nowrap", "open-quote", "overlay", "overline", "portrait", "pre",
    142         "pre-line", "pre-wrap", "relative", "scroll", "separate", "show", "static", "thick", "thin", "underline",
    143         "-webkit-nowrap", "stretch", "start", "end", "reverse", "horizontal", "vertical", "inline-axis", "block-axis",
    144         "single", "multiple", "forwards", "backwards", "ahead", "up", "down", "slow", "fast", "infinite", "slide",
    145         "alternate", "read-only", "read-write", "read-write-plaintext-only", "element", "ignore", "intrinsic",
    146         "min-intrinsic", "clip", "ellipsis", "discard", "dot-dash", "dot-dot-dash", "wave", "continuous",
    147         "skip-white-space", "break-all", "break-word", "space", "after-white-space", "checkbox", "radio", "push-button",
    148         "square-button", "button", "button-bevel", "default-button", "list-button", "listbox", "listitem",
    149         "media-fullscreen-button", "media-mute-button", "media-play-button", "media-seek-back-button",
    150         "media-seek-forward-button", "media-rewind-button", "media-return-to-realtime-button", "media-slider",
    151         "media-sliderthumb", "media-volume-slider-container", "media-volume-slider", "media-volume-sliderthumb",
    152         "media-controls-background", "media-current-time-display", "media-time-remaining-display", "menulist",
    153         "menulist-button", "menulist-text", "menulist-textfield", "slider-horizontal", "slider-vertical",
    154         "sliderthumb-horizontal", "sliderthumb-vertical", "caret", "searchfield", "searchfield-decoration",
    155         "searchfield-results-decoration", "searchfield-results-button", "searchfield-cancel-button", "textfield",
    156         "textarea", "caps-lock-indicator", "round", "border", "border-box", "content", "content-box", "padding",
    157         "padding-box", "contain", "cover", "logical", "visual", "lines", "running", "paused", "flat", "preserve-3d",
    158         "ease", "linear", "ease-in", "ease-out", "ease-in-out", "document", "reset", "visiblePainted", "visibleFill",
    159         "visibleStroke", "painted", "fill", "stroke", "antialiased", "subpixel-antialiased", "optimizeSpeed",
    160         "optimizeLegibility", "geometricPrecision"
     110        "above", "absolute", "activeborder", "activecaption", "afar", "after-white-space", "ahead", "alias", "all", "all-scroll",
     111        "alternate", "always","amharic", "amharic-abegede", "antialiased", "appworkspace", "aqua", "armenian", "auto", "avoid",
     112        "background", "backwards", "baseline", "below", "bidi-override", "black", "blink", "block", "block-axis", "blue", "bold",
     113        "bolder", "border", "border-box", "both", "bottom", "break-all", "break-word", "button", "button-bevel", "buttonface",
     114        "buttonhighlight", "buttonshadow", "buttontext", "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", "cell",
     115        "center", "checkbox", "circle", "cjk-earthly-branch", "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
     116        "col-resize", "collapse", "compact", "condensed", "contain", "content", "content-box", "context-menu", "continuous", "copy",
     117        "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal", "decimal-leading-zero", "default",
     118        "default-button", "destination-atop", "destination-in", "destination-out", "destination-over", "disc", "discard", "document",
     119        "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", "element",
     120        "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez",
     121        "ethiopic-abegede-ti-er", "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", "ethiopic-halehame-aa-et",
     122        "ethiopic-halehame-am-et", "ethiopic-halehame-gez", "ethiopic-halehame-om-et", "ethiopic-halehame-sid-et",
     123        "ethiopic-halehame-so-et", "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", "ew-resize", "expanded",
     124        "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "forwards", "fuchsia", "geometricPrecision",
     125        "georgian", "gray", "graytext", "green", "grey", "groove", "hand", "hangul", "hangul-consonant", "hebrew", "help", "hidden", "hide",
     126        "higher", "highlight", "highlighttext", "hiragana", "hiragana-iroha", "horizontal", "icon", "ignore",
     127        "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext", "inherit", "initial", "inline",
     128        "inline-axis", "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "katakana",
     129        "katakana-iroha", "landscape", "large", "larger", "left", "level", "lighter", "lime", "line-through", "linear", "lines",
     130        "list-button", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-alpha", "lower-greek", "lower-latin",
     131        "lower-norwegian", "lower-roman", "lowercase", "ltr", "maroon", "match", "media-controls-background", "media-current-time-display",
     132        "media-fullscreen-button", "media-mute-button", "media-play-button", "media-return-to-realtime-button", "media-rewind-button",
     133        "media-seek-back-button", "media-seek-forward-button", "media-slider", "media-sliderthumb", "media-time-remaining-display",
     134        "media-volume-slider", "media-volume-slider-container", "media-volume-sliderthumb", "medium", "menu", "menulist", "menulist-button",
     135        "menulist-text", "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", "mix", "monospace", "move", "multiple",
     136        "n-resize", "narrower", "navy", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none",
     137        "normal", "not-allowed", "nowrap", "ns-resize", "nw-resize", "nwse-resize", "oblique", "olive", "open-quote", "optimizeLegibility",
     138        "optimizeSpeed", "orange", "oromo", "outset", "outside", "overlay", "overline", "padding", "padding-box", "painted", "paused",
     139        "plus-darker", "plus-lighter", "pointer", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "purple",
     140        "push-button", "radio", "read-only", "read-write", "read-write-plaintext-only", "red", "relative", "repeat", "repeat-x",
     141        "repeat-y", "reset", "reverse", "ridge", "right", "round", "row-resize", "rtl", "run-in", "running", "s-resize", "sans-serif",
     142        "scroll", "scrollbar", "se-resize", "searchfield", "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",
     143        "searchfield-results-decoration", "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", "silver", "single",
     144        "skip-white-space", "slide", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
     145        "small", "small-caps", "small-caption", "smaller", "solid", "somali", "source-atop", "source-in", "source-out", "source-over",
     146        "space", "square", "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub", "subpixel-antialiased", "super",
     147        "sw-resize", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group",
     148        "table-row", "table-row-group", "teal", "text", "text-bottom", "text-top", "textarea", "textfield", "thick", "thin", "threeddarkshadow",
     149        "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "tigre", "tigrinya-er", "tigrinya-er-abegede", "tigrinya-et",
     150        "tigrinya-et-abegede", "top", "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", "upper-alpha", "upper-greek",
     151        "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
     152        "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext", "x-large", "x-small",
     153        "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle", "-webkit-body",
     154        "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing", "-webkit-inline-box",
     155        "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-right", "-webkit-small-control",
     156        "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
    161157    ].keySet();
    162158
  • trunk/WebCore/platform/text/CharacterNames.h

    r52525 r53452  
    3838    const UChar blackSquare = 0x25A0;
    3939    const UChar bullet = 0x2022;
     40    const UChar ethiopicPrefaceColon = 0x1366;
    4041    const UChar hebrewPunctuationGeresh = 0x05F3;
    4142    const UChar hebrewPunctuationGershayim = 0x05F4;
  • trunk/WebCore/rendering/RenderListMarker.cpp

    r52521 r53452  
    44 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
    55 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
     6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com)
    67 *
    78 * This library is free software; you can redistribute it and/or
     
    9899}
    99100
     101template <size_t size> static inline String toAlphabetic(int number, const UChar(&alphabet)[size])
     102{
     103    return toAlphabetic(number, alphabet, size);
     104}
     105
    100106static int toHebrewUnder1000(int number, UChar letters[5])
    101107{
     
    338344}
    339345
     346static UChar listMarkerSuffix(EListStyleType type)
     347{
     348    // Note, the following switch statement has been explicitly
     349    // grouped by list-style-type suffix.
     350    switch (type) {
     351    case NoneListStyle:
     352    case Disc:
     353    case Circle:
     354    case Square:
     355        ASSERT_NOT_REACHED();
     356        return ' ';
     357    case Afar:
     358    case Amharic:
     359    case AmharicAbegede:
     360    case Ethiopic:
     361    case EthiopicAbegede:
     362    case EthiopicAbegedeAmEt:
     363    case EthiopicAbegedeGez:
     364    case EthiopicAbegedeTiEr:
     365    case EthiopicAbegedeTiEt:
     366    case EthiopicHalehameAaEr:
     367    case EthiopicHalehameAaEt:
     368    case EthiopicHalehameAmEt:
     369    case EthiopicHalehameGez:
     370    case EthiopicHalehameOmEt:
     371    case EthiopicHalehameSidEt:
     372    case EthiopicHalehameSoEt:
     373    case EthiopicHalehameTiEr:
     374    case EthiopicHalehameTiEt:
     375    case EthiopicHalehameTig:
     376    case Oromo:
     377    case Sidama:
     378    case Somali:
     379    case Tigre:
     380    case TigrinyaEr:
     381    case TigrinyaErAbegede:
     382    case TigrinyaEt:
     383    case TigrinyaEtAbegede:
     384        return ethiopicPrefaceColon;
     385    case Armenian:
     386    case CJKIdeographic:
     387    case CjkEarthlyBranch:
     388    case CjkHeavenlyStem:
     389    case DecimalLeadingZero:
     390    case DecimalListStyle:
     391    case Georgian:
     392    case Hangul:
     393    case HangulConsonant:
     394    case Hebrew:
     395    case Hiragana:
     396    case HiraganaIroha:
     397    case Katakana:
     398    case KatakanaIroha:
     399    case LowerAlpha:
     400    case LowerGreek:
     401    case LowerLatin:
     402    case LowerNorwegian:
     403    case LowerRoman:
     404    case UpperAlpha:
     405    case UpperGreek:
     406    case UpperLatin:
     407    case UpperNorwegian:
     408    case UpperRoman:
     409        return '.';
     410    }
     411
     412    ASSERT_NOT_REACHED();
     413    return '.';
     414}
     415
    340416String listMarkerText(EListStyleType type, int value)
    341417{
     
    370446                'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
    371447            };
    372             return toAlphabetic(value, lowerLatinAlphabet, 26);
     448            return toAlphabetic(value, lowerLatinAlphabet);
    373449        }
    374450        case UpperAlpha:
     
    378454                'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
    379455            };
    380             return toAlphabetic(value, upperLatinAlphabet, 26);
     456            return toAlphabetic(value, upperLatinAlphabet);
    381457        }
    382458        case LowerGreek: {
     
    386462                0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9
    387463            };
    388             return toAlphabetic(value, lowerGreekAlphabet, 24);
     464            return toAlphabetic(value, lowerGreekAlphabet);
    389465        }
    390466
     
    400476                0x308B, 0x308C, 0x308D, 0x308F, 0x3090, 0x3091, 0x3092, 0x3093
    401477            };
    402             return toAlphabetic(value, hiraganaAlphabet, 48);
     478            return toAlphabetic(value, hiraganaAlphabet);
    403479        }
    404480        case HiraganaIroha: {
     
    413489                0x307F, 0x3057, 0x3091, 0x3072, 0x3082, 0x305B, 0x3059
    414490            };
    415             return toAlphabetic(value, hiraganaIrohaAlphabet, 47);
     491            return toAlphabetic(value, hiraganaIrohaAlphabet);
    416492        }
    417493        case Katakana: {
     
    426502                0x30EB, 0x30EC, 0x30ED, 0x30EF, 0x30F0, 0x30F1, 0x30F2, 0x30F3
    427503            };
    428             return toAlphabetic(value, katakanaAlphabet, 48);
     504            return toAlphabetic(value, katakanaAlphabet);
    429505        }
    430506        case KatakanaIroha: {
     
    439515                0x30DF, 0x30B7, 0x30F1, 0x30D2, 0x30E2, 0x30BB, 0x30B9
    440516            };
    441             return toAlphabetic(value, katakanaIrohaAlphabet, 47);
    442         }
    443 
     517            return toAlphabetic(value, katakanaIrohaAlphabet);
     518        }
     519
     520        case Afar:
     521        case EthiopicHalehameAaEt:
     522        case EthiopicHalehameAaEr: {
     523            static const UChar ethiopicHalehameAaErAlphabet[18] = {
     524                0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1260, 0x1270, 0x1290,
     525                0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12E8, 0x12F0, 0x1308, 0x1338, 0x1348
     526            };
     527            return toAlphabetic(value, ethiopicHalehameAaErAlphabet);
     528        }
     529        case Amharic:
     530        case EthiopicHalehameAmEt: {
     531            static const UChar ethiopicHalehameAmEtAlphabet[33] = {
     532                0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1238, 0x1240,
     533                0x1260, 0x1270, 0x1278, 0x1280, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12B8,
     534                0x12C8, 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320,
     535                0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350
     536            };
     537            return toAlphabetic(value, ethiopicHalehameAmEtAlphabet);
     538        }
     539        case AmharicAbegede:
     540        case EthiopicAbegedeAmEt: {
     541            static const UChar ethiopicAbegedeAmEtAlphabet[33] = {
     542                0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0,
     543                0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290,
     544                0x1298, 0x1220, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1228, 0x1230, 0x1238,
     545                0x1270, 0x1278, 0x1280, 0x1340, 0x1330, 0x1350
     546            };
     547            return toAlphabetic(value, ethiopicAbegedeAmEtAlphabet);
     548        }
     549        case CjkEarthlyBranch: {
     550            static const UChar cjkEarthlyBranchAlphabet[12] = {
     551                0x5B50, 0x4E11, 0x5BC5, 0x536F, 0x8FB0, 0x5DF3, 0x5348, 0x672A, 0x7533,
     552                0x9149, 0x620C, 0x4EA5
     553            };
     554            return toAlphabetic(value, cjkEarthlyBranchAlphabet);
     555        }
     556        case CjkHeavenlyStem: {
     557            static const UChar cjkHeavenlyStemAlphabet[10] = {
     558                0x7532, 0x4E59, 0x4E19, 0x4E01, 0x620A, 0x5DF1, 0x5E9A, 0x8F9B, 0x58EC,
     559                0x7678
     560            };
     561            return toAlphabetic(value, cjkHeavenlyStemAlphabet);
     562        }
     563        case Ethiopic:
     564        case EthiopicHalehameGez: {
     565            static const UChar ethiopicHalehameGezAlphabet[26] = {
     566                0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1240, 0x1260,
     567                0x1270, 0x1280, 0x1290, 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12D8, 0x12E8,
     568                0x12F0, 0x1308, 0x1320, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350
     569            };
     570            return toAlphabetic(value, ethiopicHalehameGezAlphabet);
     571        }
     572        case EthiopicAbegede:
     573        case EthiopicAbegedeGez: {
     574            static const UChar ethiopicAbegedeGezAlphabet[26] = {
     575                0x12A0, 0x1260, 0x1308, 0x12F0, 0x1200, 0x12C8, 0x12D8, 0x1210, 0x1320,
     576                0x12E8, 0x12A8, 0x1208, 0x1218, 0x1290, 0x1220, 0x12D0, 0x1348, 0x1338,
     577                0x1240, 0x1228, 0x1230, 0x1270, 0x1280, 0x1340, 0x1330, 0x1350
     578            };
     579            return toAlphabetic(value, ethiopicAbegedeGezAlphabet);
     580        }
     581        case HangulConsonant: {
     582            static const UChar hangulConsonantAlphabet[14] = {
     583                0x3131, 0x3134, 0x3137, 0x3139, 0x3141, 0x3142, 0x3145, 0x3147, 0x3148,
     584                0x314A, 0x314B, 0x314C, 0x314D, 0x314E
     585            };
     586            return toAlphabetic(value, hangulConsonantAlphabet);
     587        }
     588        case Hangul: {
     589            static const UChar hangulAlphabet[14] = {
     590                0xAC00, 0xB098, 0xB2E4, 0xB77C, 0xB9C8, 0xBC14, 0xC0AC, 0xC544, 0xC790,
     591                0xCC28, 0xCE74, 0xD0C0, 0xD30C, 0xD558
     592            };
     593            return toAlphabetic(value, hangulAlphabet);
     594        }
     595        case Oromo:
     596        case EthiopicHalehameOmEt: {
     597            static const UChar ethiopicHalehameOmEtAlphabet[25] = {
     598                0x1200, 0x1208, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, 0x1270,
     599                0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12C8, 0x12E8, 0x12F0, 0x12F8,
     600                0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348
     601            };
     602            return toAlphabetic(value, ethiopicHalehameOmEtAlphabet);
     603        }
     604        case Sidama:
     605        case EthiopicHalehameSidEt: {
     606            static const UChar ethiopicHalehameSidEtAlphabet[26] = {
     607                0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260,
     608                0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12C8, 0x12E8, 0x12F0,
     609                0x12F8, 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348
     610            };
     611            return toAlphabetic(value, ethiopicHalehameSidEtAlphabet);
     612        }
     613        case Somali:
     614        case EthiopicHalehameSoEt: {
     615            static const UChar ethiopicHalehameSoEtAlphabet[22] = {
     616                0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260,
     617                0x1270, 0x1290, 0x12A0, 0x12A8, 0x12B8, 0x12C8, 0x12D0, 0x12E8, 0x12F0,
     618                0x1300, 0x1308, 0x1338, 0x1348
     619            };
     620            return toAlphabetic(value, ethiopicHalehameSoEtAlphabet);
     621        }
     622        case Tigre:
     623        case EthiopicHalehameTig: {
     624            static const UChar ethiopicHalehameTigAlphabet[27] = {
     625                0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260,
     626                0x1270, 0x1278, 0x1290, 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12D8, 0x12E8,
     627                0x12F0, 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348, 0x1350
     628            };
     629            return toAlphabetic(value, ethiopicHalehameTigAlphabet);
     630        }
     631        case TigrinyaEr:
     632        case EthiopicHalehameTiEr: {
     633            static const UChar ethiopicHalehameTiErAlphabet[31] = {
     634                0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1250,
     635                0x1260, 0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12B8, 0x12C8,
     636                0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320, 0x1328,
     637                0x1330, 0x1338, 0x1348, 0x1350
     638            };
     639            return toAlphabetic(value, ethiopicHalehameTiErAlphabet);
     640        }
     641        case TigrinyaErAbegede:
     642        case EthiopicAbegedeTiEr: {
     643            static const UChar ethiopicAbegedeTiErAlphabet[31] = {
     644                0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0,
     645                0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290,
     646                0x1298, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1250, 0x1228, 0x1230, 0x1238,
     647                0x1270, 0x1278, 0x1330, 0x1350
     648            };
     649            return toAlphabetic(value, ethiopicAbegedeTiErAlphabet);
     650        }
     651        case TigrinyaEt:
     652        case EthiopicHalehameTiEt: {
     653            static const UChar ethiopicHalehameTiEtAlphabet[34] = {
     654                0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1238, 0x1240,
     655                0x1250, 0x1260, 0x1270, 0x1278, 0x1280, 0x1290, 0x1298, 0x12A0, 0x12A8,
     656                0x12B8, 0x12C8, 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308,
     657                0x1320, 0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350
     658            };
     659            return toAlphabetic(value, ethiopicHalehameTiEtAlphabet);
     660        }
     661        case TigrinyaEtAbegede:
     662        case EthiopicAbegedeTiEt: {
     663            static const UChar ethiopicAbegedeTiEtAlphabet[34] = {
     664                0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0,
     665                0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290,
     666                0x1298, 0x1220, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1250, 0x1228, 0x1230,
     667                0x1238, 0x1270, 0x1278, 0x1280, 0x1340, 0x1330, 0x1350
     668            };
     669            return toAlphabetic(value, ethiopicAbegedeTiEtAlphabet);
     670        }
     671        case UpperGreek: {
     672            static const UChar upperGreekAlphabet[24] = {
     673                0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399,
     674                0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0, 0x03A1, 0x03A3,
     675                0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9
     676            };
     677            return toAlphabetic(value, upperGreekAlphabet);
     678        }
     679        case LowerNorwegian: {
     680            static const UChar lowerNorwegianAlphabet[29] = {
     681                0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069,
     682                0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070, 0x0071, 0x0072,
     683                0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x00E6,
     684                0x00F8, 0x00E5
     685            };
     686            return toAlphabetic(value, lowerNorwegianAlphabet);
     687        }
     688        case UpperNorwegian: {
     689            static const UChar upperNorwegianAlphabet[29] = {
     690                0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049,
     691                0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052,
     692                0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x00C6,
     693                0x00D8, 0x00C5
     694            };
     695            return toAlphabetic(value, upperNorwegianAlphabet);
     696        }
    444697        case CJKIdeographic: {
    445698            static const UChar traditionalChineseInformalTable[16] = {
     
    571824    context->setFillColor(color, style()->colorSpace());
    572825
    573     switch (style()->listStyleType()) {
     826    EListStyleType type = style()->listStyleType();
     827    switch (type) {
    574828        case Disc:
    575829            context->drawEllipse(marker);
     
    584838        case NoneListStyle:
    585839            return;
     840        case Afar:
     841        case Amharic:
     842        case AmharicAbegede:
    586843        case Armenian:
    587844        case CJKIdeographic:
     845        case CjkEarthlyBranch:
     846        case CjkHeavenlyStem:
    588847        case DecimalLeadingZero:
     848        case DecimalListStyle:
     849        case Ethiopic:
     850        case EthiopicAbegede:
     851        case EthiopicAbegedeAmEt:
     852        case EthiopicAbegedeGez:
     853        case EthiopicAbegedeTiEr:
     854        case EthiopicAbegedeTiEt:
     855        case EthiopicHalehameAaEr:
     856        case EthiopicHalehameAaEt:
     857        case EthiopicHalehameAmEt:
     858        case EthiopicHalehameGez:
     859        case EthiopicHalehameOmEt:
     860        case EthiopicHalehameSidEt:
     861        case EthiopicHalehameSoEt:
     862        case EthiopicHalehameTiEr:
     863        case EthiopicHalehameTiEt:
     864        case EthiopicHalehameTig:
    589865        case Georgian:
     866        case Hangul:
     867        case HangulConsonant:
    590868        case Hebrew:
    591869        case Hiragana:
     
    593871        case Katakana:
    594872        case KatakanaIroha:
    595         case DecimalListStyle:
    596873        case LowerAlpha:
    597874        case LowerGreek:
    598875        case LowerLatin:
     876        case LowerNorwegian:
    599877        case LowerRoman:
     878        case Oromo:
     879        case Sidama:
     880        case Somali:
     881        case Tigre:
     882        case TigrinyaEr:
     883        case TigrinyaErAbegede:
     884        case TigrinyaEt:
     885        case TigrinyaEtAbegede:
    600886        case UpperAlpha:
     887        case UpperGreek:
    601888        case UpperLatin:
     889        case UpperNorwegian:
    602890        case UpperRoman:
    603891            break;
     
    621909
    622910    const Font& font = style()->font();
     911    const UChar suffix = listMarkerSuffix(type);
    623912    if (style()->direction() == LTR) {
    624913        int width = font.width(textRun);
    625914        context->drawText(style()->font(), textRun, marker.location());
    626         const UChar periodSpace[2] = { '.', ' ' };
    627         context->drawText(style()->font(), TextRun(periodSpace, 2), marker.location() + IntSize(width, 0));
     915        UChar suffixSpace[2] = { suffix, ' ' };
     916        context->drawText(style()->font(), TextRun(suffixSpace, 2), marker.location() + IntSize(width, 0));
    628917    } else {
    629         const UChar spacePeriod[2] = { ' ', '.' };
    630         TextRun spacePeriodRun(spacePeriod, 2);
    631         int width = font.width(spacePeriodRun);
    632         context->drawText(style()->font(), spacePeriodRun, marker.location());
     918        UChar spaceSuffix[2] = { ' ', suffix };
     919        TextRun spaceSuffixRun(spaceSuffix, 2);
     920        int width = font.width(spaceSuffixRun);
     921        context->drawText(style()->font(), spaceSuffixRun, marker.location());
    633922        context->drawText(style()->font(), textRun, marker.location() + IntSize(width, 0));
    634923    }
     
    702991            width = (font.ascent() * 2 / 3 + 1) / 2 + 2;
    703992            break;
     993        case Afar:
     994        case Amharic:
     995        case AmharicAbegede:
    704996        case Armenian:
    705997        case CJKIdeographic:
     998        case CjkEarthlyBranch:
     999        case CjkHeavenlyStem:
    7061000        case DecimalLeadingZero:
     1001        case DecimalListStyle:
     1002        case Ethiopic:
     1003        case EthiopicAbegede:
     1004        case EthiopicAbegedeAmEt:
     1005        case EthiopicAbegedeGez:
     1006        case EthiopicAbegedeTiEr:
     1007        case EthiopicAbegedeTiEt:
     1008        case EthiopicHalehameAaEr:
     1009        case EthiopicHalehameAaEt:
     1010        case EthiopicHalehameAmEt:
     1011        case EthiopicHalehameGez:
     1012        case EthiopicHalehameOmEt:
     1013        case EthiopicHalehameSidEt:
     1014        case EthiopicHalehameSoEt:
     1015        case EthiopicHalehameTiEr:
     1016        case EthiopicHalehameTiEt:
     1017        case EthiopicHalehameTig:
    7071018        case Georgian:
     1019        case Hangul:
     1020        case HangulConsonant:
    7081021        case Hebrew:
    7091022        case Hiragana:
     
    7111024        case Katakana:
    7121025        case KatakanaIroha:
    713         case DecimalListStyle:
    7141026        case LowerAlpha:
    7151027        case LowerGreek:
    7161028        case LowerLatin:
     1029        case LowerNorwegian:
    7171030        case LowerRoman:
     1031        case Oromo:
     1032        case Sidama:
     1033        case Somali:
     1034        case Tigre:
     1035        case TigrinyaEr:
     1036        case TigrinyaErAbegede:
     1037        case TigrinyaEt:
     1038        case TigrinyaEtAbegede:
    7181039        case UpperAlpha:
     1040        case UpperGreek:
    7191041        case UpperLatin:
     1042        case UpperNorwegian:
    7201043        case UpperRoman:
    7211044            m_text = listMarkerText(type, m_listItem->value());
     
    7241047            else {
    7251048                int itemWidth = font.width(m_text);
    726                 const UChar periodSpace[2] = { '.', ' ' };
    727                 int periodSpaceWidth = font.width(TextRun(periodSpace, 2));
    728                 width = itemWidth + periodSpaceWidth;
     1049                UChar suffixSpace[2] = { listMarkerSuffix(type), ' ' };
     1050                int suffixSpaceWidth = font.width(TextRun(suffixSpace, 2));
     1051                width = itemWidth + suffixSpaceWidth;
    7291052            }
    7301053            break;
     
    8361159        return IntRect(x(), y(), m_image->imageSize(this, style()->effectiveZoom()).width(), m_image->imageSize(this, style()->effectiveZoom()).height());
    8371160
    838     switch (style()->listStyleType()) {
     1161    EListStyleType type = style()->listStyleType();
     1162    switch (type) {
    8391163        case Disc:
    8401164        case Circle:
     
    8481172        case NoneListStyle:
    8491173            return IntRect();
     1174        case Afar:
     1175        case Amharic:
     1176        case AmharicAbegede:
    8501177        case Armenian:
    8511178        case CJKIdeographic:
     1179        case CjkEarthlyBranch:
     1180        case CjkHeavenlyStem:
    8521181        case DecimalLeadingZero:
     1182        case DecimalListStyle:
     1183        case Ethiopic:
     1184        case EthiopicAbegede:
     1185        case EthiopicAbegedeAmEt:
     1186        case EthiopicAbegedeGez:
     1187        case EthiopicAbegedeTiEr:
     1188        case EthiopicAbegedeTiEt:
     1189        case EthiopicHalehameAaEr:
     1190        case EthiopicHalehameAaEt:
     1191        case EthiopicHalehameAmEt:
     1192        case EthiopicHalehameGez:
     1193        case EthiopicHalehameOmEt:
     1194        case EthiopicHalehameSidEt:
     1195        case EthiopicHalehameSoEt:
     1196        case EthiopicHalehameTiEr:
     1197        case EthiopicHalehameTiEt:
     1198        case EthiopicHalehameTig:
    8531199        case Georgian:
     1200        case Hangul:
     1201        case HangulConsonant:
    8541202        case Hebrew:
    8551203        case Hiragana:
     
    8571205        case Katakana:
    8581206        case KatakanaIroha:
    859         case DecimalListStyle:
    8601207        case LowerAlpha:
    8611208        case LowerGreek:
    8621209        case LowerLatin:
     1210        case LowerNorwegian:
    8631211        case LowerRoman:
     1212        case Oromo:
     1213        case Sidama:
     1214        case Somali:
     1215        case Tigre:
     1216        case TigrinyaEr:
     1217        case TigrinyaErAbegede:
     1218        case TigrinyaEt:
     1219        case TigrinyaEtAbegede:
    8641220        case UpperAlpha:
     1221        case UpperGreek:
    8651222        case UpperLatin:
     1223        case UpperNorwegian:
    8661224        case UpperRoman:
    8671225            if (m_text.isEmpty())
     
    8691227            const Font& font = style()->font();
    8701228            int itemWidth = font.width(m_text);
    871             const UChar periodSpace[2] = { '.', ' ' };
    872             int periodSpaceWidth = font.width(TextRun(periodSpace, 2));
    873             return IntRect(x(), y() + font.ascent(), itemWidth + periodSpaceWidth, font.height());
     1229            UChar suffixSpace[2] = { listMarkerSuffix(type), ' ' };
     1230            int suffixSpaceWidth = font.width(TextRun(suffixSpace, 2));
     1231            return IntRect(x(), y() + font.ascent(), itemWidth + suffixSpaceWidth, font.height());
    8741232    }
    8751233
  • trunk/WebCore/rendering/style/RenderStyle.h

    r53450 r53452  
    184184        unsigned _empty_cells : 1; // EEmptyCell
    185185        unsigned _caption_side : 2; // ECaptionSide
    186         unsigned _list_style_type : 5 ; // EListStyleType
     186        unsigned _list_style_type : 6; // 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         // 32 bits
     197        // 33 bits
    198198       
    199199        // non CSS2 inherited
     
    202202        bool _force_backgrounds_to_white : 1;
    203203        unsigned _pointerEvents : 4; // EPointerEvents
    204         // 39 bits
     204        // 40 bits
    205205    } inherited_flags;
    206206
  • trunk/WebCore/rendering/style/RenderStyleConstants.h

    r52521 r53452  
    204204};
    205205
     206// The order of this enum must match the order of the list style types in CSSValueKeywords.in.
    206207enum EListStyleType {
    207      Disc, Circle, Square, DecimalListStyle, DecimalLeadingZero,
    208      LowerRoman, UpperRoman, LowerGreek,
    209      LowerAlpha, LowerLatin, UpperAlpha, UpperLatin,
    210      Hebrew, Armenian, Georgian, CJKIdeographic,
    211      Hiragana, Katakana, HiraganaIroha, KatakanaIroha, NoneListStyle
     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
    212263};
    213264
Note: See TracChangeset for help on using the changeset viewer.