[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

dbates at webkit.org dbates at webkit.org
Wed Dec 22 12:31:43 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit dd6ec3e5cb3065fe6e6677e2c0a4a269f6efa4b1
Author: dbates at webkit.org <dbates at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 25 03:05:10 2010 +0000

    2010-08-23  Daniel Bates  <dbates at rim.com>
    
            Reviewed by Darin Adler.
    
            Suffix for CSS alphabetic list style types should fallback to
            decimal for ordinals outside of their representable range
            https://bugs.webkit.org/show_bug.cgi?id=44486
    
            Test: fast/lists/w3-css3-list-styles-fallback-style.html
    
            Fixes an issue where the decimal suffix is not used for
            ordinals that cannot be represented by the alphabetic list
            style type.
    
            Currently, for ordinals that cannot be represented in the
            alphabetic list style we use the suffix associated with the
            list style. Instead, we should use the suffix for the decimal
            list style ('.'). For instance, when the list style type is
            Afar and the starting ordinal is 0, then we fallback to the
            decimal list style suffix '.' because 0 cannot be represented
            in Afar.
    
            * rendering/RenderListMarker.cpp:
            (WebCore::toRoman): Moved bounds check into WebCore::effectiveListMarkerType().
            (WebCore::toAlphabetic): Ditto.
            (WebCore::toHebrew): Ditto.
            (WebCore::toArmenian): Ditto.
            (WebCore::toGeorgian): Ditto.
            (WebCore::toCJKIdeographic): Ditto.
            (WebCore::effectiveListMarkerType): Added.
            (WebCore::listMarkerSuffix): Added value parameter to prototype.
            Modified to call WebCore::effectiveListMarkerType.
            (WebCore::listMarkerText): Modified to call WebCore::effectiveListMarkerType().
            (WebCore::RenderListMarker::paint): Modified to pass list item ordinal (i.e. m_listItem->value()) to WebCore::listMarkerSuffix().
            (WebCore::RenderListMarker::calcPrefWidths): Ditto.
            (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
    2010-08-23  Daniel Bates  <dbates at rim.com>
    
            Reviewed by Darin Adler.
    
            Suffix for CSS alphabetic list style types should fallback to
            decimal for ordinals outside of their representable range
            https://bugs.webkit.org/show_bug.cgi?id=44486
    
            Tests that CSS list styles fallback to the decimal list style
            for ordinals that cannot be represented. We need to implement
            DRT support to test the actual suffix (see bug #44489).
    
            Also, adds test for ordinal 0 for each numeric list style type.
    
            * fast/lists/resources/w3-css3-list-styles-alphabetic.css: Added.
            * fast/lists/w3-css3-list-styles-alphabetic.html: Moved CSS list styles to file w3-css3-list-styles-alphabetic.css,
            * fast/lists/w3-css3-list-styles-fallback-style-expected.txt: Added.
            * fast/lists/w3-css3-list-styles-fallback-style.html: Added.
            * fast/lists/w3-css3-list-styles-numeric-expected.txt: Added test for ordinal 0 for each list style type.
            * fast/lists/w3-css3-list-styles-numeric.html: Rebased result.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3361434..c8b70d9 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,24 @@
+2010-08-23  Daniel Bates  <dbates at rim.com>
+
+        Reviewed by Darin Adler.
+
+        Suffix for CSS alphabetic list style types should fallback to
+        decimal for ordinals outside of their representable range
+        https://bugs.webkit.org/show_bug.cgi?id=44486
+
+        Tests that CSS list styles fallback to the decimal list style
+        for ordinals that cannot be represented. We need to implement
+        DRT support to test the actual suffix (see bug #44489).
+
+        Also, adds test for ordinal 0 for each numeric list style type.
+
+        * fast/lists/resources/w3-css3-list-styles-alphabetic.css: Added.
+        * fast/lists/w3-css3-list-styles-alphabetic.html: Moved CSS list styles to file w3-css3-list-styles-alphabetic.css,
+        * fast/lists/w3-css3-list-styles-fallback-style-expected.txt: Added.
+        * fast/lists/w3-css3-list-styles-fallback-style.html: Added.
+        * fast/lists/w3-css3-list-styles-numeric-expected.txt: Added test for ordinal 0 for each list style type.
+        * fast/lists/w3-css3-list-styles-numeric.html: Rebased result.
+
 2010-08-24  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/LayoutTests/fast/lists/resources/w3-css3-list-styles-alphabetic.css b/LayoutTests/fast/lists/resources/w3-css3-list-styles-alphabetic.css
new file mode 100644
index 0000000..8e9e2e8
--- /dev/null
+++ b/LayoutTests/fast/lists/resources/w3-css3-list-styles-alphabetic.css
@@ -0,0 +1,73 @@
+/* 
+The following styles are ordered as they appear in section 4.4. of the 
+Draft 7 November 2002 draft of the CSS3 Lists module <http://www.w3.org/TR/css3-lists/#alphabetic>.
+*/
+
+ol.afar { list-style-type: afar; }
+ol.ethiopic-halehame-aa-et { list-style-type: ethiopic-halehame-aa-et; }
+ol.ethiopic-halehame-aa-er { list-style-type: ethiopic-halehame-aa-er; }
+
+ol.amharic { list-style-type: amharic; }
+ol.ethiopic-halehame-am-et { list-style-type: ethiopic-halehame-am-et; }
+
+ol.amharic-abegede { list-style-type: amharic-abegede; }
+ol.ethiopic-abegede-am-et { list-style-type: ethiopic-abegede-am-et; }
+
+ol.cjk-earthly-branch { list-style-type: cjk-earthly-branch; }
+
+ol.cjk-heavenly-stem { list-style-type: cjk-heavenly-stem; }
+
+ol.ethiopic { list-style-type: ethiopic; }
+ol.ethiopic-halehame-gez { list-style-type: ethiopic-halehame-gez; }
+
+ol.ethiopic-abegede { list-style-type: ethiopic-abegede; }
+ol.ethiopic-abegede-gez { list-style-type: ethiopic-abegede-gez; }
+
+ol.hangul-consonant { list-style-type: hangul-consonant; }
+ol.hangul { list-style-type: hangul; }
+
+ol.hiragana-iroha { list-style-type: hiragana-iroha; }
+
+ol.hiragana { list-style-type: hiragana; }
+
+ol.katakana-iroha { list-style-type: katakana-iroha; }
+
+ol.katakana { list-style-type: katakana; }
+
+ol.lower-alpha { list-style-type: lower-alpha; }
+ol.lower-latin { list-style-type: lower-latin; }
+
+ol.lower-greek { list-style-type: lower-greek; }
+
+ol.lower-norwegian { list-style-type: lower-norwegian; }
+
+ol.oromo { list-style-type: oromo; }
+ol.ethiopic-halehame-om-et { list-style-type: ethiopic-halehame-om-et; }
+
+ol.sidama { list-style-type: sidama; }
+ol.ethiopic-halehame-sid-et { list-style-type: ethiopic-halehame-sid-et; }
+
+ol.somali { list-style-type: somali; }
+ol.ethiopic-halehame-so-et { list-style-type: ethiopic-halehame-so-et; }
+
+ol.tigre { list-style-type: tigre; }
+ol.ethiopic-halehame-tig { list-style-type: ethiopic-halehame-tig; }
+
+ol.tigrinya-er { list-style-type: tigrinya-er; }
+ol.ethiopic-halehame-ti-er { list-style-type: ethiopic-halehame-ti-er; }
+
+ol.tigrinya-er-abegede { list-style-type: tigrinya-er-abegede; }
+ol.ethiopic-abegede-ti-er { list-style-type: ethiopic-abegede-ti-er; }
+
+ol.tigrinya-et { list-style-type: tigrinya-et; }
+ol.ethiopic-halehame-ti-et { list-style-type: ethiopic-halehame-ti-et; }
+
+ol.tigrinya-et-abegede { list-style-type: tigrinya-et-abegede; }
+ol.ethiopic-abegede-ti-et { list-style-type: ethiopic-abegede-ti-et; }
+
+ol.upper-alpha { list-style-type: upper-alpha; }
+ol.upper-latin { list-style-type: upper-latin; }
+
+ol.upper-greek { list-style-type: upper-greek; }
+
+ol.upper-norwegian { list-style-type: upper-norwegian; }
diff --git a/LayoutTests/fast/lists/w3-css3-list-styles-alphabetic.html b/LayoutTests/fast/lists/w3-css3-list-styles-alphabetic.html
index 6262e0a..df2acd1 100755
--- a/LayoutTests/fast/lists/w3-css3-list-styles-alphabetic.html
+++ b/LayoutTests/fast/lists/w3-css3-list-styles-alphabetic.html
@@ -1,83 +1,10 @@
 <html>
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <link rel="stylesheet" href="resources/w3-css3-list-styles-alphabetic.css" type="text/css" charset="utf-8" />
     <style>
         .test ol { float: left; padding-right: 20px; }
         .test h2 { clear: left; }
-        
-        /* 
-        The following styles are ordered as they appear in section 4.4. of the 
-        Draft 7 November 2002 draft of the CSS3 Lists module <http://www.w3.org/TR/css3-lists/#alphabetic>.
-        */
-        
-        ol.afar { list-style-type: afar; }
-        ol.ethiopic-halehame-aa-et { list-style-type: ethiopic-halehame-aa-et; }
-        ol.ethiopic-halehame-aa-er { list-style-type: ethiopic-halehame-aa-er; }
-        
-        ol.amharic { list-style-type: amharic; }
-        ol.ethiopic-halehame-am-et { list-style-type: ethiopic-halehame-am-et; }
-        
-        ol.amharic-abegede { list-style-type: amharic-abegede; }
-        ol.ethiopic-abegede-am-et { list-style-type: ethiopic-abegede-am-et; }
-        
-        ol.cjk-earthly-branch { list-style-type: cjk-earthly-branch; }
-        
-        ol.cjk-heavenly-stem { list-style-type: cjk-heavenly-stem; }
-        
-        ol.ethiopic { list-style-type: ethiopic; }
-        ol.ethiopic-halehame-gez { list-style-type: ethiopic-halehame-gez; }
-        
-        ol.ethiopic-abegede { list-style-type: ethiopic-abegede; }
-        ol.ethiopic-abegede-gez { list-style-type: ethiopic-abegede-gez; }
-        
-        ol.hangul-consonant { list-style-type: hangul-consonant; }
-        ol.hangul { list-style-type: hangul; }
-        
-        ol.hiragana-iroha { list-style-type: hiragana-iroha; }
-        
-        ol.hiragana { list-style-type: hiragana; }
-        
-        ol.katakana-iroha { list-style-type: katakana-iroha; }
-        
-        ol.katakana { list-style-type: katakana; }
-        
-        ol.lower-alpha { list-style-type: lower-alpha; }
-        ol.lower-latin { list-style-type: lower-latin; }
-        
-        ol.lower-greek { list-style-type: lower-greek; }
-        
-        ol.lower-norwegian { list-style-type: lower-norwegian; }
-        
-        ol.oromo { list-style-type: oromo; }
-        ol.ethiopic-halehame-om-et { list-style-type: ethiopic-halehame-om-et; }
-        
-        ol.sidama { list-style-type: sidama; }
-        ol.ethiopic-halehame-sid-et { list-style-type: ethiopic-halehame-sid-et; }
-        
-        ol.somali { list-style-type: somali; }
-        ol.ethiopic-halehame-so-et { list-style-type: ethiopic-halehame-so-et; }
-        
-        ol.tigre { list-style-type: tigre; }
-        ol.ethiopic-halehame-tig { list-style-type: ethiopic-halehame-tig; }
-        
-        ol.tigrinya-er { list-style-type: tigrinya-er; }
-        ol.ethiopic-halehame-ti-er { list-style-type: ethiopic-halehame-ti-er; }
-        
-        ol.tigrinya-er-abegede { list-style-type: tigrinya-er-abegede; }
-        ol.ethiopic-abegede-ti-er { list-style-type: ethiopic-abegede-ti-er; }
-        
-        ol.tigrinya-et { list-style-type: tigrinya-et; }
-        ol.ethiopic-halehame-ti-et { list-style-type: ethiopic-halehame-ti-et; }
-        
-        ol.tigrinya-et-abegede { list-style-type: tigrinya-et-abegede; }
-        ol.ethiopic-abegede-ti-et { list-style-type: ethiopic-abegede-ti-et; }
-        
-        ol.upper-alpha { list-style-type: upper-alpha; }
-        ol.upper-latin { list-style-type: upper-latin; }
-        
-        ol.upper-greek { list-style-type: upper-greek; }
-        
-        ol.upper-norwegian { list-style-type: upper-norwegian; }
     </style>
     <script src="resources/dump-list.js"></script>
     <script>
diff --git a/LayoutTests/fast/lists/w3-css3-list-styles-fallback-style-expected.txt b/LayoutTests/fast/lists/w3-css3-list-styles-fallback-style-expected.txt
new file mode 100644
index 0000000..ad9c778
--- /dev/null
+++ b/LayoutTests/fast/lists/w3-css3-list-styles-fallback-style-expected.txt
@@ -0,0 +1,315 @@
+CSS3 Fallback to Decimal List Style
+
+Algorithmic
+
+armenian
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is Ա.
+PASS list marker is Ք̂Ջ̂Ղ̂Թ̂ՔՋՂԹ.
+PASS list marker is 100000000.
+cjk-ideographic
+
+PASS list marker is -1.
+PASS list marker is 零.
+PASS list marker is 一.
+ethiopic-numeric
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+georgian
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ა.
+PASS list marker is ჵჰშჟთ.
+PASS list marker is 20000.
+PASS list marker is 20001.
+hebrew
+
+PASS list marker is -1.
+PASS list marker is אפס.
+PASS list marker is א.
+PASS list marker is תתקצט'תתקצט.
+PASS list marker is 1000000.
+PASS list marker is 1000001.
+japanese-formal
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+japanese-informal
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+lower-armenian
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+lower-roman
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is i.
+simp-chinese-formal
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+simp-chinese-informal
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+syriac
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+tamil
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+trad-chinese-formal
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+trad-chinese-informal
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+upper-armenian
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 1.
+upper-roman
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is I.
+Alphabetic
+
+afar
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-halehame-aa-et
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-halehame-aa-er
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+amharic
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-halehame-am-et
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+amharic-abegede
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is አ.
+ethiopic-abegede-am-et
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is አ.
+cjk-earthly-branch
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 子.
+cjk-heavenly-stem
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 甲.
+ethiopic
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-halehame-gez
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-abegede
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is አ.
+ethiopic-abegede-gez
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is አ.
+hangul-consonant
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ㄱ.
+hangul
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is 가.
+hiragana-iroha
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is い.
+hiragana
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is あ.
+katakana-iroha
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is イ.
+katakana
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ア.
+lower-alpha
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is a.
+lower-latin
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is a.
+lower-greek
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is α.
+lower-norwegian
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is a.
+oromo
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-halehame-om-et
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+sidama
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-halehame-sid-et
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+somali
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-halehame-so-et
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+tigre
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-halehame-tig
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+tigrinya-er
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-halehame-ti-er
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+tigrinya-er-abegede
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is አ.
+ethiopic-abegede-ti-er
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is አ.
+tigrinya-et
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+ethiopic-halehame-ti-et
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is ሀ.
+tigrinya-et-abegede
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is አ.
+ethiopic-abegede-ti-et
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is አ.
+upper-alpha
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is A.
+upper-latin
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is A.
+upper-greek
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is Α.
+upper-norwegian
+
+PASS list marker is -1.
+PASS list marker is 0.
+PASS list marker is A.
+
diff --git a/LayoutTests/fast/lists/w3-css3-list-styles-fallback-style.html b/LayoutTests/fast/lists/w3-css3-list-styles-fallback-style.html
new file mode 100644
index 0000000..5e5b974
--- /dev/null
+++ b/LayoutTests/fast/lists/w3-css3-list-styles-fallback-style.html
@@ -0,0 +1,609 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <link rel="stylesheet" href="resources/w3-css3-list-styles-alphabetic.css" type="text/css" charset="utf-8" />
+    <style>
+        .test ol { float: left; padding-right: 20px; }
+        .test h2 { clear: left; }
+        hr { clear: left;}
+        hr + h2 { color: blue; }
+        
+        /* 
+        The following styles are ordered as they appear in section 4.2. of the 
+        Draft 7 November 2002 draft of the CSS3 Lists module <http://www.w3.org/TR/css3-lists/#algorithmic>.
+        */
+        
+        ol.armenian { list-style-type: armenian; }
+        
+        ol.cjk-ideographic { list-style-type: cjk-ideographic; }
+        
+        ol.ethiopic-numeric { list-style-type: ethiopic-numeric; }
+        
+        ol.georgian { list-style-type: georgian; }
+        
+        ol.hebrew { list-style-type: hebrew; }
+        
+        ol.japanese-formal { list-style-type: japanese-formal; }
+        
+        ol.japanese-informal { list-style-type: japanese-informal; }
+        
+        ol.lower-armenian { list-style-type: lower-armenian; }
+        
+        ol.lower-roman { list-style-type: lower-roman; }
+        
+        ol.simp-chinese-formal { list-style-type: simp-chinese-formal; }
+        
+        ol.simp-chinese-informal { list-style-type: simp-chinese-informal; }
+        
+        ol.syriac { list-style-type: syriac; }
+        
+        ol.tamil { list-style-type: tamil; }
+        
+        ol.trad-chinese-formal { list-style-type: trad-chinese-formal; }
+        
+        ol.trad-chinese-informal { list-style-type: trad-chinese-informal; }
+        
+        ol.upper-armenian { list-style-type: upper-armenian; }
+        
+        ol.upper-roman { list-style-type: upper-roman; }
+    </style>
+    <script src="resources/dump-list.js"></script>
+    <script>
+        function runTest()
+        {
+            if (!window.layoutTestController)
+                return;
+                
+            layoutTestController.dumpAsText();
+            filterListsWithReplacement(document.querySelectorAll(".test ol"), testListItemMarkerEqualsListItemText);
+            document.body.removeChild(document.getElementById("description")); // Remove description when running in DRT.
+        }
+        window.onload = runTest;
+    </script>
+</head>
+<body>
+    <h1>CSS3 Fallback to Decimal List Style</h1>
+    <div id="description">
+        <p>This tests that we fallback to the decimal list style type when the ordinal is outside the representable range for the list style type as per the <a href="http://www.w3.org/TR/css3-lists/">CSS3 Lists module</a> (Draft 7 November 2002). This test PASSED if the list item matches its marker for every list item (below).</p>
+        <p>Note, as of 08/23/2010, ethiopic-numeric; japanese-formal; japanese-informal; lower-armenian; simp-chinese-formal; simp-chinese-informal; syriac; tamil; trad-chinese-formal; trad-chinese-informal; and upper-armenian are unsupported and hence have expected failure results.</p> 
+    </div>
+    <hr/>
+    <h2>Algorithmic</h2>
+    <div class="test">
+        <h2>armenian</h2>
+        <ol class="armenian" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x531;</li>
+        </ol>
+        <ol class="armenian" start="99999999">
+            <li>&#x554;&#x302;&#x54B;&#x302;&#x542;&#x302;&#x539;&#x302;&#x554;&#x54B;&#x542;&#x539;</li>
+            <li>100000000</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>cjk-ideographic</h2>
+        <ol class="cjk-ideographic" start="-1">
+            <li>-1</li>
+            <li>&#x96F6;</li>
+            <li>&#x4E00;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>ethiopic-numeric</h2>
+        <ol class="ethiopic-numeric" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>georgian</h2>
+        <ol class="georgian" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x10D0;</li>
+        </ol>
+        <ol class="georgian" start="19999">
+            <li>&#x10F5;&#x10F0;&#x10E8;&#x10DF;&#x10D7;</li>
+            <li>20000</li>
+            <li>20001</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>hebrew</h2>
+        <ol class="hebrew" start="-1">
+            <li>-1</li>
+            <li>&#x5D0;&#x5E4;&#x5E1;</li>
+            <li>&#x5D0;</li>
+        </ol>
+        <ol class="hebrew" start="999999">
+            <li>&#x5EA;&#x5EA;&#x5E7;&#x5E6;&#x5D8;&#x27;&#x5EA;&#x5EA;&#x5E7;&#x5E6;&#x5D8;</li>
+            <li>1000000</li>
+            <li>1000001</li>
+        </ol>
+    </div>
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>japanese-formal</h2>
+        <ol class="japanese-formal" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>japanese-informal</h2>
+        <ol class="japanese-informal" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>lower-armenian</h2>
+        <ol class="lower-armenian" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>lower-roman</h2>
+        <ol class="lower-roman" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>i</li>
+        </ol>
+    </div>
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>simp-chinese-formal</h2>
+        <ol class="simp-chinese-formal" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>simp-chinese-informal</h2>
+        <ol class="simp-chinese-informal" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>syriac</h2>
+        <ol class="syriac" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>tamil</h2>
+        <ol class="tamil" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>trad-chinese-formal</h2>
+        <ol class="trad-chinese-formal" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>trad-chinese-informal</h2>
+        <ol class="trad-chinese-informal" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    <div class="test">
+        <!-- FIXME: We don't currently support this list-style-type. These are expected failure results. -->
+        <h2>upper-armenian</h2>
+        <ol class="upper-armenian" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>1</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>upper-roman</h2>
+        <ol class="upper-roman" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>I</li>
+        </ol>
+    </div>
+    <hr/>
+    <h2>Alphabetic</h2>
+    <div class="test">
+        <h2>afar</h2>
+        <ol class="afar" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-halehame-aa-et</h2>
+        <ol class="ethiopic-halehame-aa-et" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-halehame-aa-er</h2>
+        <ol class="ethiopic-halehame-aa-er" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>amharic</h2>
+        <ol class="amharic" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-halehame-am-et</h2>
+        <ol class="ethiopic-halehame-am-et" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>amharic-abegede</h2>
+        <ol class="amharic-abegede" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x12A0;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-abegede-am-et</h2>
+        <ol class="ethiopic-abegede-am-et" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x12A0;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>cjk-earthly-branch</h2>
+        <ol class="cjk-earthly-branch" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x5B50;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>cjk-heavenly-stem</h2>
+        <ol class="cjk-heavenly-stem" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x7532;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>ethiopic</h2>
+        <ol class="ethiopic" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-halehame-gez</h2>
+        <ol class="ethiopic-halehame-gez" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>ethiopic-abegede</h2>
+        <ol class="ethiopic-abegede" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x12A0;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-abegede-gez</h2>
+        <ol class="ethiopic-abegede-gez" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x12A0;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>hangul-consonant</h2>
+        <ol class="hangul-consonant" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x3131;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>hangul</h2>
+        <ol class="hangul" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#xAC00;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>hiragana-iroha</h2>
+        <ol class="hiragana-iroha" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x3044;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>hiragana</h2>
+        <ol class="hiragana" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x3042;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>katakana-iroha</h2>
+        <ol class="katakana-iroha" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x30A4;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>katakana</h2>
+        <ol class="katakana" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x30A2;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>lower-alpha</h2>
+        <ol class="lower-alpha" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x0061;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>lower-latin</h2>
+        <ol class="lower-latin" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x0061;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>lower-greek</h2>
+        <ol class="lower-greek" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x03B1;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>lower-norwegian</h2>
+        <ol class="lower-norwegian" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x0061;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>oromo</h2>
+        <ol class="oromo" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-halehame-om-et</h2>
+        <ol class="ethiopic-halehame-om-et" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>sidama</h2>
+        <ol class="sidama" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-halehame-sid-et</h2>
+        <ol class="ethiopic-halehame-sid-et" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>somali</h2>
+        <ol class="somali" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-halehame-so-et</h2>
+        <ol class="ethiopic-halehame-so-et" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>tigre</h2>
+        <ol class="tigre" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-halehame-tig</h2>
+        <ol class="ethiopic-halehame-tig" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>tigrinya-er</h2>
+        <ol class="tigrinya-er" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-halehame-ti-er</h2>
+        <ol class="ethiopic-halehame-ti-er" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>tigrinya-er-abegede</h2>
+        <ol class="tigrinya-er-abegede" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x12A0;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-abegede-ti-er</h2>
+        <ol class="ethiopic-abegede-ti-er" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x12A0;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>tigrinya-et</h2>
+        <ol class="tigrinya-et" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-halehame-ti-et</h2>
+        <ol class="ethiopic-halehame-ti-et" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x1200;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>tigrinya-et-abegede</h2>
+        <ol class="tigrinya-et-abegede" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x12A0;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>ethiopic-abegede-ti-et</h2>
+        <ol class="ethiopic-abegede-ti-et" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x12A0;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>upper-alpha</h2>
+        <ol class="upper-alpha" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x0041;</li>
+        </ol>
+    </div>
+    <div class="test">
+        <h2>upper-latin</h2>
+        <ol class="upper-latin" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x0041;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>upper-greek</h2>
+        <ol class="upper-greek" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x0391;</li>
+        </ol>
+    </div>
+    
+    <div class="test">
+        <h2>upper-norwegian</h2>
+        <ol class="upper-norwegian" start="-1">
+            <li>-1</li>
+            <li>0</li>
+            <li>&#x0041;</li>
+        </ol>
+    </div>
+</body>
+</html>
diff --git a/LayoutTests/fast/lists/w3-css3-list-styles-numeric-expected.txt b/LayoutTests/fast/lists/w3-css3-list-styles-numeric-expected.txt
index fc0bfec..c4dbe9b 100755
--- a/LayoutTests/fast/lists/w3-css3-list-styles-numeric-expected.txt
+++ b/LayoutTests/fast/lists/w3-css3-list-styles-numeric-expected.txt
@@ -12,6 +12,7 @@ PASS list marker is ٧.
 PASS list marker is ٨.
 PASS list marker is ٩.
 PASS list marker is ١٠.
+PASS list marker is ٠.
 PASS list marker is ١.
 PASS list marker is -٢١٤٧٤٨٣٦٤٨.
 PASS list marker is -٢١٤٧٤٨٣٦٤٧.
@@ -19,6 +20,7 @@ binary
 
 PASS list marker is 1.
 PASS list marker is 10.
+PASS list marker is 0.
 PASS list marker is 1.
 PASS list marker is -10000000000000000000000000000000.
 PASS list marker is -1111111111111111111111111111111.
@@ -34,6 +36,7 @@ PASS list marker is ৭.
 PASS list marker is ৮.
 PASS list marker is ৯.
 PASS list marker is ১০.
+PASS list marker is ০.
 PASS list marker is ১.
 PASS list marker is -২১৪৭৪৮৩৬৪৮.
 PASS list marker is -২১৪৭৪৮৩৬৪৭.
@@ -49,6 +52,7 @@ PASS list marker is ៧.
 PASS list marker is ៨.
 PASS list marker is ៩.
 PASS list marker is ១០.
+PASS list marker is ០.
 PASS list marker is ១.
 PASS list marker is -២១៤៧៤៨៣៦៤៨.
 PASS list marker is -២១៤៧៤៨៣៦៤៧.
@@ -64,6 +68,7 @@ PASS list marker is ៧.
 PASS list marker is ៨.
 PASS list marker is ៩.
 PASS list marker is ១០.
+PASS list marker is ០.
 PASS list marker is ១.
 PASS list marker is -២១៤៧៤៨៣៦៤៨.
 PASS list marker is -២១៤៧៤៨៣៦៤៧.
@@ -79,6 +84,7 @@ PASS list marker is 7.
 PASS list marker is 8.
 PASS list marker is 9.
 PASS list marker is 10.
+PASS list marker is 0.
 PASS list marker is 1.
 PASS list marker is -2147483648.
 PASS list marker is -2147483647.
@@ -94,6 +100,7 @@ PASS list marker is 07.
 PASS list marker is 08.
 PASS list marker is 09.
 PASS list marker is 10.
+PASS list marker is 00.
 PASS list marker is 01.
 PASS list marker is -2147483648.
 PASS list marker is -2147483647.
@@ -109,6 +116,7 @@ PASS list marker is ७.
 PASS list marker is ८.
 PASS list marker is ९.
 PASS list marker is १०.
+PASS list marker is ०.
 PASS list marker is १.
 PASS list marker is -२१४७४८३६४८.
 PASS list marker is -२१४७४८३६४७.
@@ -124,6 +132,7 @@ PASS list marker is ૭.
 PASS list marker is ૮.
 PASS list marker is ૯.
 PASS list marker is ૧૦.
+PASS list marker is ૦.
 PASS list marker is ૧.
 PASS list marker is -૨૧૪૭૪૮૩૬૪૮.
 PASS list marker is -૨૧૪૭૪૮૩૬૪૭.
@@ -139,6 +148,7 @@ PASS list marker is ੭.
 PASS list marker is ੮.
 PASS list marker is ੯.
 PASS list marker is ੧੦.
+PASS list marker is ੦.
 PASS list marker is ੧.
 PASS list marker is -੨੧੪੭੪੮੩੬੪੮.
 PASS list marker is -੨੧੪੭੪੮੩੬੪੭.
@@ -154,6 +164,7 @@ PASS list marker is ೭.
 PASS list marker is ೮.
 PASS list marker is ೯.
 PASS list marker is ೧೦.
+PASS list marker is ೦.
 PASS list marker is ೧.
 PASS list marker is -೨೧೪೭೪೮೩೬೪೮.
 PASS list marker is -೨೧೪೭೪೮೩೬೪೭.
@@ -175,6 +186,7 @@ PASS list marker is d.
 PASS list marker is e.
 PASS list marker is f.
 PASS list marker is 10.
+PASS list marker is 0.
 PASS list marker is 1.
 PASS list marker is -80000000.
 PASS list marker is -7fffffff.
@@ -190,6 +202,7 @@ PASS list marker is ໗.
 PASS list marker is ໘.
 PASS list marker is ໙.
 PASS list marker is ໑໐.
+PASS list marker is ໐.
 PASS list marker is ໑.
 PASS list marker is -໒໑໔໗໔໘໓໖໔໘.
 PASS list marker is -໒໑໔໗໔໘໓໖໔໗.
@@ -205,6 +218,7 @@ PASS list marker is ൭.
 PASS list marker is ൮.
 PASS list marker is ൯.
 PASS list marker is ൧൦.
+PASS list marker is ൦.
 PASS list marker is ൧.
 PASS list marker is -൨൧൪൭൪൮൩൬൪൮.
 PASS list marker is -൨൧൪൭൪൮൩൬൪൭.
@@ -220,6 +234,7 @@ PASS list marker is ᠗.
 PASS list marker is ᠘.
 PASS list marker is ᠙.
 PASS list marker is ᠑᠐.
+PASS list marker is ᠐.
 PASS list marker is ᠑.
 PASS list marker is -᠒᠑᠔᠗᠔᠘᠓᠖᠔᠘.
 PASS list marker is -᠒᠑᠔᠗᠔᠘᠓᠖᠔᠗.
@@ -235,6 +250,7 @@ PASS list marker is ၇.
 PASS list marker is ၈.
 PASS list marker is ၉.
 PASS list marker is ၁၀.
+PASS list marker is ၀.
 PASS list marker is ၁.
 PASS list marker is -၂၁၄၇၄၈၃၆၄၈.
 PASS list marker is -၂၁၄၇၄၈၃၆၄၇.
@@ -248,6 +264,7 @@ PASS list marker is 5.
 PASS list marker is 6.
 PASS list marker is 7.
 PASS list marker is 10.
+PASS list marker is 0.
 PASS list marker is 1.
 PASS list marker is -20000000000.
 PASS list marker is -17777777777.
@@ -263,6 +280,7 @@ PASS list marker is ୭.
 PASS list marker is ୮.
 PASS list marker is ୯.
 PASS list marker is ୧୦.
+PASS list marker is ୦.
 PASS list marker is ୧.
 PASS list marker is -୨୧୪୭୪୮୩୬୪୮.
 PASS list marker is -୨୧୪୭୪୮୩୬୪୭.
@@ -278,6 +296,7 @@ PASS list marker is ۷.
 PASS list marker is ۸.
 PASS list marker is ۹.
 PASS list marker is ۱۰.
+PASS list marker is ۰.
 PASS list marker is ۱.
 PASS list marker is -۲۱۴۷۴۸۳۶۴۸.
 PASS list marker is -۲۱۴۷۴۸۳۶۴۷.
@@ -293,6 +312,7 @@ PASS list marker is ۷.
 PASS list marker is ۸.
 PASS list marker is ۹.
 PASS list marker is ۱۰.
+PASS list marker is ۰.
 PASS list marker is ۱.
 PASS list marker is -۲۱۴۷۴۸۳۶۴۸.
 PASS list marker is -۲۱۴۷۴۸۳۶۴۷.
@@ -308,6 +328,7 @@ PASS list marker is ౭.
 PASS list marker is ౮.
 PASS list marker is ౯.
 PASS list marker is ౧౦.
+PASS list marker is ౦.
 PASS list marker is ౧.
 PASS list marker is -౨౧౪౭౪౮౩౬౪౮.
 PASS list marker is -౨౧౪౭౪౮౩౬౪౭.
@@ -323,6 +344,7 @@ PASS list marker is ༧.
 PASS list marker is ༨.
 PASS list marker is ༩.
 PASS list marker is ༡༠.
+PASS list marker is ༠.
 PASS list marker is ༡.
 PASS list marker is -༢༡༤༧༤༨༣༦༤༨.
 PASS list marker is -༢༡༤༧༤༨༣༦༤༧.
@@ -338,6 +360,7 @@ PASS list marker is ๗.
 PASS list marker is ๘.
 PASS list marker is ๙.
 PASS list marker is ๑๐.
+PASS list marker is ๐.
 PASS list marker is ๑.
 PASS list marker is -๒๑๔๗๔๘๓๖๔๘.
 PASS list marker is -๒๑๔๗๔๘๓๖๔๗.
@@ -359,6 +382,7 @@ PASS list marker is D.
 PASS list marker is E.
 PASS list marker is F.
 PASS list marker is 10.
+PASS list marker is 0.
 PASS list marker is 1.
 PASS list marker is -80000000.
 PASS list marker is -7FFFFFFF.
diff --git a/LayoutTests/fast/lists/w3-css3-list-styles-numeric.html b/LayoutTests/fast/lists/w3-css3-list-styles-numeric.html
index 3e1bd4b..061b1c0 100755
--- a/LayoutTests/fast/lists/w3-css3-list-styles-numeric.html
+++ b/LayoutTests/fast/lists/w3-css3-list-styles-numeric.html
@@ -96,6 +96,9 @@
             <li>&#x0669;</li>
             <li>&#x0661;&#x0660;</li>
         </ol>
+        <ol class="arabic-indic" start="0">
+            <li>&#x0660;</li>
+        </ol>
         <ol class="arabic-indic" start="-2147483649">
             <li>&#x661;</li>
         </ol>
@@ -111,6 +114,9 @@
             <li>1</li>
             <li>10</li>
         </ol>
+        <ol class="binary" start="0">
+            <li>0</li>
+        </ol>
         <ol class="binary" start="-2147483649">
             <li>1</li>
         </ol>
@@ -134,6 +140,9 @@
             <li>&#x09EF;</li>
             <li>&#x09E7;&#x09E6;</li>
         </ol>
+        <ol class="bengali" start="0">
+            <li>&#x09E6;</li>
+        </ol>
         <ol class="bengali" start="-2147483649">
             <li>&#x9E7;</li>
         </ol>
@@ -157,6 +166,9 @@
             <li>&#x17E9;</li>
             <li>&#x17E1;&#x17E0;</li>
         </ol>
+        <ol class="cambodian" start="0">
+            <li>&#x17E0;</li>
+        </ol>
         <ol class="cambodian" start="-2147483649">
             <li>&#x17E1;</li>
         </ol>
@@ -179,6 +191,9 @@
             <li>&#x17E9;</li>
             <li>&#x17E1;&#x17E0;</li>
         </ol>
+        <ol class="khmer" start="0">
+            <li>&#x17E0;</li>
+        </ol>
         <ol class="khmer" start="-2147483649">
             <li>&#x17E1;</li>
         </ol>
@@ -202,6 +217,9 @@
             <li>9</li>
             <li>10</li>
         </ol>
+        <ol class="decimal" start="0">
+            <li>0</li>
+        </ol>
         <ol class="decimal" start="-2147483649">
             <li>1</li>
         </ol>
@@ -225,6 +243,9 @@
             <li>09</li>
             <li>10</li>
         </ol>
+        <ol class="decimal-leading-zero" start="0">
+            <li>00</li>
+        </ol>
         <ol class="decimal-leading-zero" start="-2147483649">
             <li>01</li>
         </ol>
@@ -248,6 +269,9 @@
             <li>&#x096F;</li>
             <li>&#x0967;&#x0966;</li>
         </ol>
+        <ol class="devanagari" start="0">
+            <li>&#x0966;</li>
+        </ol>
         <ol class="devanagari" start="-2147483649">
             <li>&#x967;</li>
         </ol>
@@ -271,6 +295,9 @@
             <li>&#x0AEF;</li>
             <li>&#x0AE7;&#x0AE6;</li>
         </ol>
+        <ol class="gujarati" start="0">
+            <li>&#x0AE6;</li>
+        </ol>
         <ol class="gujarati" start="-2147483649">
             <li>&#xAE7;</li>
         </ol>
@@ -294,6 +321,9 @@
             <li>&#x0A6F;</li>
             <li>&#x0A67;&#x0A66;</li>
         </ol>
+        <ol class="gurmukhi" start="0">
+            <li>&#x0A66;</li>
+        </ol>
         <ol class="gurmukhi" start="-2147483649">
             <li>&#xA67;</li>
         </ol>
@@ -317,6 +347,9 @@
             <li>&#x0CEF;</li>
             <li>&#x0CE7;&#x0CE6;</li>
         </ol>
+        <ol class="kannada" start="0">
+            <li>&#x0CE6;</li>
+        </ol>
         <ol class="kannada" start="-2147483649">
             <li>&#xCE7;</li>
         </ol>
@@ -346,6 +379,9 @@
             <li>f</li>
             <li>10</li>
         </ol>
+        <ol class="lower-hexadecimal" start="0">
+            <li>0</li>
+        </ol>
         <ol class="lower-hexadecimal" start="-2147483649">
             <li>1</li>
         </ol>
@@ -369,6 +405,9 @@
             <li>&#x0ED9;</li>
             <li>&#x0ED1;&#x0ED0;</li>
         </ol>
+        <ol class="lao" start="0">
+            <li>&#x0ED0;</li>
+        </ol>
         <ol class="lao" start="-2147483649">
             <li>&#xED1;</li>
         </ol>
@@ -392,6 +431,9 @@
             <li>&#x0D6F;</li>
             <li>&#x0D67;&#x0D66;</li>
         </ol>
+        <ol class="malayalam" start="0">
+            <li>&#x0D66;</li>
+        </ol>
         <ol class="malayalam" start="-2147483649">
             <li>&#xD67;</li>
         </ol>
@@ -415,6 +457,9 @@
             <li>&#x1819;</li>
             <li>&#x1811;&#x1810;</li>
         </ol>
+        <ol class="mongolian" start="0">
+            <li>&#x1810;</li>
+        </ol>
         <ol class="mongolian" start="-2147483649">
             <li>&#x1811;</li>
         </ol>
@@ -438,6 +483,9 @@
             <li>&#x1049;</li>
             <li>&#x1041;&#x1040;</li>
         </ol>
+        <ol class="myanmar" start="0">
+            <li>&#x1040;</li>
+        </ol>
         <ol class="myanmar" start="-2147483649">
             <li>&#x1041;</li>
         </ol>
@@ -459,6 +507,9 @@
             <li>7</li>
             <li>10</li>
         </ol>
+        <ol class="octal" start="0">
+            <li>0</li>
+        </ol>
         <ol class="octal" start="-2147483649">
             <li>1</li>
         </ol>
@@ -482,6 +533,9 @@
             <li>&#x0B6F;</li>
             <li>&#x0B67;&#x0B66;</li>
         </ol>
+        <ol class="oriya" start="0">
+            <li>&#x0B66;</li>
+        </ol>
         <ol class="oriya" start="-2147483649">
             <li>&#xB67;</li>
         </ol>
@@ -505,6 +559,9 @@
             <li>&#x06F9;</li>
             <li>&#x06F1;&#x06F0;</li>
         </ol>
+        <ol class="persian" start="0">
+            <li>&#x06F0;</li>
+        </ol>
         <ol class="persian" start="-2147483649">
             <li>&#x6F1;</li>
         </ol>
@@ -527,6 +584,9 @@
             <li>&#x06F9;</li>
             <li>&#x06F1;&#x06F0;</li>
         </ol>
+        <ol class="urdu" start="0">
+            <li>&#x06F0;</li>
+        </ol>
         <ol class="urdu" start="-2147483649">
             <li>&#x6F1;</li>
         </ol>
@@ -550,6 +610,9 @@
             <li>&#x0C6F;</li>
             <li>&#x0C67;&#x0C66;</li>
         </ol>
+        <ol class="telugu" start="0">
+            <li>&#x0C66;</li>
+        </ol>
         <ol class="telugu" start="-2147483649">
             <li>&#xC67;</li>
         </ol>
@@ -573,6 +636,9 @@
             <li>&#x0F29;</li>
             <li>&#x0F21;&#x0F20;</li>
         </ol>
+        <ol class="tibetan" start="0">
+            <li>&#x0F20;</li>
+        </ol>
         <ol class="tibetan" start="-2147483649">
             <li>&#xF21;</li>
         </ol>
@@ -596,6 +662,9 @@
             <li>&#x0E59;</li>
             <li>&#x0E51;&#x0E50;</li>
         </ol>
+        <ol class="thai" start="0">
+            <li>&#x0E50;</li>
+        </ol>
         <ol class="thai" start="-2147483649">
             <li>&#xE51;</li>
         </ol>
@@ -625,6 +694,9 @@
             <li>F</li>
             <li>10</li>
         </ol>
+        <ol class="upper-hexadecimal" start="0">
+            <li>0</li>
+        </ol>
         <ol class="upper-hexadecimal" start="-2147483649">
             <li>1</li>
         </ol>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d39f8f9..686913e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,40 @@
+2010-08-23  Daniel Bates  <dbates at rim.com>
+
+        Reviewed by Darin Adler.
+
+        Suffix for CSS alphabetic list style types should fallback to
+        decimal for ordinals outside of their representable range
+        https://bugs.webkit.org/show_bug.cgi?id=44486
+
+        Test: fast/lists/w3-css3-list-styles-fallback-style.html
+
+        Fixes an issue where the decimal suffix is not used for
+        ordinals that cannot be represented by the alphabetic list
+        style type.
+
+        Currently, for ordinals that cannot be represented in the
+        alphabetic list style we use the suffix associated with the
+        list style. Instead, we should use the suffix for the decimal
+        list style ('.'). For instance, when the list style type is
+        Afar and the starting ordinal is 0, then we fallback to the
+        decimal list style suffix '.' because 0 cannot be represented
+        in Afar.
+
+        * rendering/RenderListMarker.cpp:
+        (WebCore::toRoman): Moved bounds check into WebCore::effectiveListMarkerType().
+        (WebCore::toAlphabetic): Ditto.
+        (WebCore::toHebrew): Ditto.
+        (WebCore::toArmenian): Ditto.
+        (WebCore::toGeorgian): Ditto.
+        (WebCore::toCJKIdeographic): Ditto.
+        (WebCore::effectiveListMarkerType): Added.
+        (WebCore::listMarkerSuffix): Added value parameter to prototype.
+        Modified to call WebCore::effectiveListMarkerType.
+        (WebCore::listMarkerText): Modified to call WebCore::effectiveListMarkerType().
+        (WebCore::RenderListMarker::paint): Modified to pass list item ordinal (i.e. m_listItem->value()) to WebCore::listMarkerSuffix().
+        (WebCore::RenderListMarker::calcPrefWidths): Ditto.
+        (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
+
 2010-08-24  Gavin Barraclough  <barraclough at apple.com>
 
         Windows build fix.
diff --git a/WebCore/rendering/RenderListMarker.cpp b/WebCore/rendering/RenderListMarker.cpp
index e148c81..cab09f5 100644
--- a/WebCore/rendering/RenderListMarker.cpp
+++ b/WebCore/rendering/RenderListMarker.cpp
@@ -48,8 +48,7 @@ static String toRoman(int number, bool upper)
     // FIXME: CSS3 describes how to make this work for much larger numbers,
     // using overbars and special characters. It also specifies the characters
     // in the range U+2160 to U+217F instead of standard ASCII ones.
-    if (number < 1 || number > 3999)
-        return String::number(number);
+    ASSERT(number >= 1 && number <= 3999);
 
     // Big enough to store largest roman number less than 3999 which
     // is 3888 (MMMDCCCLXXXVIII)
@@ -118,9 +117,6 @@ static inline String toAlphabeticOrNumeric(int number, const UChar* sequence, in
 
 static String toAlphabetic(int number, const UChar* alphabet, int alphabetSize)
 {
-    if (number < 1)
-        return String::number(number);
-
     return toAlphabeticOrNumeric(number, alphabet, alphabetSize, AlphabeticSequence);
 }
 
@@ -170,8 +166,7 @@ static int toHebrewUnder1000(int number, UChar letters[5])
 static String toHebrew(int number)
 {
     // FIXME: CSS3 mentions ways to make this work for much larger numbers.
-    if (number < 0 || number > 999999)
-        return String::number(number);
+    ASSERT(number >= 0 && number <= 999999);
 
     if (number == 0) {
         static const UChar hebrewZero[3] = { 0x05D0, 0x05E4, 0x05E1 };
@@ -238,8 +233,7 @@ static int toArmenianUnder10000(int number, bool upper, bool addCircumflex, UCha
 
 static String toArmenian(int number, bool upper)
 {
-    if (number < 1 || number > 99999999)
-        return String::number(number);
+    ASSERT(number >= 1 && number <= 99999999);
 
     const int lettersSize = 18; // twice what toArmenianUnder10000 needs
     UChar letters[lettersSize];
@@ -253,8 +247,7 @@ static String toArmenian(int number, bool upper)
 
 static String toGeorgian(int number)
 {
-    if (number < 1 || number > 19999)
-        return String::number(number);
+    ASSERT(number >= 1 && number <= 19999);
 
     const int lettersSize = 5;
     UChar letters[lettersSize];
@@ -300,8 +293,7 @@ static String toGeorgian(int number)
 // first 3 group markers, then 3 digit markers, then ten digits.
 static String toCJKIdeographic(int number, const UChar table[16])
 {
-    if (number < 0)
-        return String::number(number);
+    ASSERT(number >= 0);
 
     enum AbstractCJKChar {
         noChar,
@@ -379,11 +371,110 @@ static String toCJKIdeographic(int number, const UChar table[16])
     return String(characters, length);
 }
 
-static UChar listMarkerSuffix(EListStyleType type)
+static EListStyleType effectiveListMarkerType(EListStyleType type, int value)
+{
+    // Note, the following switch statement has been explicitly grouped
+    // by list-style-type ordinal range.
+    switch (type) {
+    case ArabicIndic:
+    case Bengali:
+    case BinaryListStyle:
+    case Cambodian:
+    case Circle:
+    case DecimalLeadingZero:
+    case DecimalListStyle:
+    case Devanagari:
+    case Disc:
+    case Gujarati:
+    case Gurmukhi:
+    case Kannada:
+    case Khmer:
+    case Lao:
+    case LowerHexadecimal:
+    case Malayalam:
+    case Mongolian:
+    case Myanmar:
+    case NoneListStyle:
+    case Octal:
+    case Oriya:
+    case Persian:
+    case Square:
+    case Telugu:
+    case Thai:
+    case Tibetan:
+    case UpperHexadecimal:
+    case Urdu:
+        return type; // Can represent all ordinals.
+    case Armenian:
+        return (value < 1 || value > 99999999) ? DecimalListStyle : type;
+    case CJKIdeographic:
+        return (value < 0) ? DecimalListStyle : type;
+    case Georgian:
+        return (value < 1 || value > 19999) ? DecimalListStyle : type;
+    case Hebrew:
+        return (value < 0 || value > 999999) ? DecimalListStyle : type;
+    case LowerRoman:
+    case UpperRoman:
+        return (value < 1 || value > 3999) ? DecimalListStyle : type;
+    case Afar:
+    case Amharic:
+    case AmharicAbegede:
+    case CjkEarthlyBranch:
+    case CjkHeavenlyStem:
+    case Ethiopic:
+    case EthiopicAbegede:
+    case EthiopicAbegedeAmEt:
+    case EthiopicAbegedeGez:
+    case EthiopicAbegedeTiEr:
+    case EthiopicAbegedeTiEt:
+    case EthiopicHalehameAaEr:
+    case EthiopicHalehameAaEt:
+    case EthiopicHalehameAmEt:
+    case EthiopicHalehameGez:
+    case EthiopicHalehameOmEt:
+    case EthiopicHalehameSidEt:
+    case EthiopicHalehameSoEt:
+    case EthiopicHalehameTiEr:
+    case EthiopicHalehameTiEt:
+    case EthiopicHalehameTig:
+    case Hangul:
+    case HangulConsonant:
+    case Hiragana:
+    case HiraganaIroha:
+    case Katakana:
+    case KatakanaIroha:
+    case LowerAlpha:
+    case LowerGreek:
+    case LowerLatin:
+    case LowerNorwegian:
+    case Oromo:
+    case Sidama:
+    case Somali:
+    case Tigre:
+    case TigrinyaEr:
+    case TigrinyaErAbegede:
+    case TigrinyaEt:
+    case TigrinyaEtAbegede:
+    case UpperAlpha:
+    case UpperGreek:
+    case UpperLatin:
+    case UpperNorwegian:
+        return (value < 1) ? DecimalListStyle : type;
+    }
+
+    ASSERT_NOT_REACHED();
+    return type;
+}
+
+static UChar listMarkerSuffix(EListStyleType type, int value)
 {
+    // If the list-style-type, say hebrew, cannot represent |value| because it's outside
+    // its ordinal range then we fallback to some list style that can represent |value|.
+    EListStyleType effectiveType = effectiveListMarkerType(type, value);
+
     // Note, the following switch statement has been explicitly
     // grouped by list-style-type suffix.
-    switch (type) {
+    switch (effectiveType) {
     case NoneListStyle:
     case Disc:
     case Circle:
@@ -473,7 +564,9 @@ static UChar listMarkerSuffix(EListStyleType type)
 
 String listMarkerText(EListStyleType type, int value)
 {
-    switch (type) {
+    // If the list-style-type, say hebrew, cannot represent |value| because it's outside
+    // its ordinal range then we fallback to some list style that can represent |value|.
+    switch (effectiveListMarkerType(type, value)) {
         case NoneListStyle:
             return "";
 
@@ -1122,7 +1215,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
     }
 
     const Font& font = style()->font();
-    const UChar suffix = listMarkerSuffix(type);
+    const UChar suffix = listMarkerSuffix(type, m_listItem->value());
     if (style()->direction() == LTR) {
         int width = font.width(textRun);
         context->drawText(style()->font(), textRun, marker.location());
@@ -1282,7 +1375,7 @@ void RenderListMarker::calcPrefWidths()
                 width = 0;
             else {
                 int itemWidth = font.width(m_text);
-                UChar suffixSpace[2] = { listMarkerSuffix(type), ' ' };
+                UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem->value()), ' ' };
                 int suffixSpaceWidth = font.width(TextRun(suffixSpace, 2));
                 width = itemWidth + suffixSpaceWidth;
             }
@@ -1484,7 +1577,7 @@ IntRect RenderListMarker::getRelativeMarkerRect()
                 return IntRect();
             const Font& font = style()->font();
             int itemWidth = font.width(m_text);
-            UChar suffixSpace[2] = { listMarkerSuffix(type), ' ' };
+            UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem->value()), ' ' };
             int suffixSpaceWidth = font.width(TextRun(suffixSpace, 2));
             return IntRect(x(), y() + font.ascent(), itemWidth + suffixSpaceWidth, font.height());
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list