summaryrefslogtreecommitdiffstats
path: root/layout/reftests/counters
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/reftests/counters
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/counters')
-rw-r--r--layout/reftests/counters/counter-cjk-decimal-ref.html20
-rw-r--r--layout/reftests/counters/counter-cjk-decimal.html25
-rw-r--r--layout/reftests/counters/counter-ethiopic-numeric-ref.html47
-rw-r--r--layout/reftests/counters/counter-ethiopic-numeric.html50
-rw-r--r--layout/reftests/counters/counter-hebrew-reference.html62
-rw-r--r--layout/reftests/counters/counter-hebrew-test.html68
-rw-r--r--layout/reftests/counters/counter-japanese-formal-ref.html36
-rw-r--r--layout/reftests/counters/counter-japanese-formal.html41
-rw-r--r--layout/reftests/counters/counter-japanese-informal-ref.html36
-rw-r--r--layout/reftests/counters/counter-japanese-informal.html41
-rw-r--r--layout/reftests/counters/counter-korean-hangul-formal-ref.html36
-rw-r--r--layout/reftests/counters/counter-korean-hangul-formal.html41
-rw-r--r--layout/reftests/counters/counter-korean-hanja-formal-ref.html36
-rw-r--r--layout/reftests/counters/counter-korean-hanja-formal.html41
-rw-r--r--layout/reftests/counters/counter-korean-hanja-informal-ref.html36
-rw-r--r--layout/reftests/counters/counter-korean-hanja-informal.html41
-rw-r--r--layout/reftests/counters/counter-name-case-sensitive-ref.html18
-rw-r--r--layout/reftests/counters/counter-name-case-sensitive.html26
-rw-r--r--layout/reftests/counters/counter-reset-integer-range-ref.html9
-rw-r--r--layout/reftests/counters/counter-reset-integer-range.html14
-rw-r--r--layout/reftests/counters/counter-simp-chinese-formal-ref.html36
-rw-r--r--layout/reftests/counters/counter-simp-chinese-formal.html41
-rw-r--r--layout/reftests/counters/counter-simp-chinese-informal-ref.html36
-rw-r--r--layout/reftests/counters/counter-simp-chinese-informal.html41
-rw-r--r--layout/reftests/counters/counter-suffix-ref.html38
-rw-r--r--layout/reftests/counters/counter-suffix.html18
-rw-r--r--layout/reftests/counters/counter-trad-chinese-formal-ref.html36
-rw-r--r--layout/reftests/counters/counter-trad-chinese-formal.html41
-rw-r--r--layout/reftests/counters/counter-trad-chinese-informal-ref.html36
-rw-r--r--layout/reftests/counters/counter-trad-chinese-informal.html41
-rw-r--r--layout/reftests/counters/counter-ua-limits-00-ref.html26
-rw-r--r--layout/reftests/counters/counter-ua-limits-00.html33
-rw-r--r--layout/reftests/counters/counter-ua-limits-01-ref.html26
-rw-r--r--layout/reftests/counters/counter-ua-limits-01.html33
-rw-r--r--layout/reftests/counters/counter-ua-limits-02-ref.html26
-rw-r--r--layout/reftests/counters/counter-ua-limits-02.html33
-rw-r--r--layout/reftests/counters/counter-ua-limits-03-ref.html26
-rw-r--r--layout/reftests/counters/counter-ua-limits-03.html33
-rw-r--r--layout/reftests/counters/counter-ua-limits-list-00-ref.html33
-rw-r--r--layout/reftests/counters/counter-ua-limits-list-00.html33
-rw-r--r--layout/reftests/counters/counter-ua-limits-list-01-ref.html46
-rw-r--r--layout/reftests/counters/counter-ua-limits-list-01.html33
-rw-r--r--layout/reftests/counters/counters-hebrew-reference.html63
-rw-r--r--layout/reftests/counters/counters-hebrew-test.html72
-rw-r--r--layout/reftests/counters/multiple-thai-counters-ref.html9
-rw-r--r--layout/reftests/counters/multiple-thai-counters.html12
-rw-r--r--layout/reftests/counters/reftest-stylo.list85
-rw-r--r--layout/reftests/counters/reftest.list82
-rw-r--r--layout/reftests/counters/t1202-counter-00-b-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-00-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-01-b-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-01-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-02-b-reference.html27
-rw-r--r--layout/reftests/counters/t1202-counter-02-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-03-b-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-03-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-04-b-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-04-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-05-b-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-05-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-06-b-reference.html32
-rw-r--r--layout/reftests/counters/t1202-counter-06-b-test.html38
-rw-r--r--layout/reftests/counters/t1202-counter-07-b-reference.html35
-rw-r--r--layout/reftests/counters/t1202-counter-07-b-test.html42
-rw-r--r--layout/reftests/counters/t1202-counter-08-b-reference.html35
-rw-r--r--layout/reftests/counters/t1202-counter-08-b-test.html42
-rw-r--r--layout/reftests/counters/t1202-counter-09-b-reference.html57
-rw-r--r--layout/reftests/counters/t1202-counter-09-b-test.html63
-rw-r--r--layout/reftests/counters/t1202-counter-10-b-reference.html56
-rw-r--r--layout/reftests/counters/t1202-counter-10-b-test.html62
-rw-r--r--layout/reftests/counters/t1202-counter-11-b-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-11-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-12-b-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-12-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-13-b-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-13-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-14-b-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-14-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-15-b-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-15-b-test.html34
-rw-r--r--layout/reftests/counters/t1202-counter-16-f-reference.html28
-rw-r--r--layout/reftests/counters/t1202-counter-16-f-test.html40
-rw-r--r--layout/reftests/counters/t1202-counters-00-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-00-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-01-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-01-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-02-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-02-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-03-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-03-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-04-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-04-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-05-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-05-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-06-b-reference.html33
-rw-r--r--layout/reftests/counters/t1202-counters-06-b-test.html41
-rw-r--r--layout/reftests/counters/t1202-counters-07-b-reference.html37
-rw-r--r--layout/reftests/counters/t1202-counters-07-b-test.html45
-rw-r--r--layout/reftests/counters/t1202-counters-08-b-reference.html37
-rw-r--r--layout/reftests/counters/t1202-counters-08-b-test.html45
-rw-r--r--layout/reftests/counters/t1202-counters-09-b-reference.html58
-rw-r--r--layout/reftests/counters/t1202-counters-09-b-test.html66
-rw-r--r--layout/reftests/counters/t1202-counters-10-b-reference.html57
-rw-r--r--layout/reftests/counters/t1202-counters-10-b-test.html65
-rw-r--r--layout/reftests/counters/t1202-counters-11-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-11-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-12-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-12-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-13-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-13-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-14-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-14-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-15-b-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-15-b-test.html37
-rw-r--r--layout/reftests/counters/t1202-counters-16-c-reference.html16
-rw-r--r--layout/reftests/counters/t1202-counters-16-c-test.html27
-rw-r--r--layout/reftests/counters/t1202-counters-17-d-reference.html21
-rw-r--r--layout/reftests/counters/t1202-counters-17-d-test.html28
-rw-r--r--layout/reftests/counters/t1202-counters-18-f-reference.html29
-rw-r--r--layout/reftests/counters/t1202-counters-18-f-test.html44
-rw-r--r--layout/reftests/counters/t1204-implied-00-b-reference.html15
-rw-r--r--layout/reftests/counters/t1204-implied-00-b-test.html21
-rw-r--r--layout/reftests/counters/t1204-implied-01-c-reference.html16
-rw-r--r--layout/reftests/counters/t1204-implied-01-c-test.html23
-rw-r--r--layout/reftests/counters/t1204-implied-02-d-reference.html16
-rw-r--r--layout/reftests/counters/t1204-implied-02-d-test.html24
-rw-r--r--layout/reftests/counters/t1204-increment-00-c-o-reference.html15
-rw-r--r--layout/reftests/counters/t1204-increment-00-c-o-test.html35
-rw-r--r--layout/reftests/counters/t1204-increment-01-c-o-reference.html15
-rw-r--r--layout/reftests/counters/t1204-increment-01-c-o-test.html32
-rw-r--r--layout/reftests/counters/t1204-increment-02-c-o-reference.html16
-rw-r--r--layout/reftests/counters/t1204-increment-02-c-o-test.html34
-rw-r--r--layout/reftests/counters/t1204-multiple-00-c-reference.html15
-rw-r--r--layout/reftests/counters/t1204-multiple-00-c-test.html21
-rw-r--r--layout/reftests/counters/t1204-multiple-01-c-reference.html15
-rw-r--r--layout/reftests/counters/t1204-multiple-01-c-test.html22
-rw-r--r--layout/reftests/counters/t1204-order-00-c-reference.html33
-rw-r--r--layout/reftests/counters/t1204-order-00-c-test.html44
-rw-r--r--layout/reftests/counters/t1204-order-01-d-reference.html43
-rw-r--r--layout/reftests/counters/t1204-order-01-d-test.html46
-rw-r--r--layout/reftests/counters/t1204-reset-00-c-o-reference.html15
-rw-r--r--layout/reftests/counters/t1204-reset-00-c-o-test.html34
-rw-r--r--layout/reftests/counters/t1204-reset-01-c-o-reference.html15
-rw-r--r--layout/reftests/counters/t1204-reset-01-c-o-test.html32
-rw-r--r--layout/reftests/counters/t1204-reset-02-c-o-reference.html15
-rw-r--r--layout/reftests/counters/t1204-reset-02-c-o-test.html32
-rw-r--r--layout/reftests/counters/t1204-root-e-reference.html18
-rw-r--r--layout/reftests/counters/t1204-root-e-test.html27
-rw-r--r--layout/reftests/counters/t120401-scope-00-b-reference.html19
-rw-r--r--layout/reftests/counters/t120401-scope-00-b-test.html29
-rw-r--r--layout/reftests/counters/t120401-scope-01-c-reference.html16
-rw-r--r--layout/reftests/counters/t120401-scope-01-c-test.html24
-rw-r--r--layout/reftests/counters/t120401-scope-02-c-reference.html16
-rw-r--r--layout/reftests/counters/t120401-scope-02-c-test.html24
-rw-r--r--layout/reftests/counters/t120401-scope-03-c-reference.html16
-rw-r--r--layout/reftests/counters/t120401-scope-03-c-test.html24
-rw-r--r--layout/reftests/counters/t120401-scope-04-d-reference.html15
-rw-r--r--layout/reftests/counters/t120401-scope-04-d-test.html23
-rw-r--r--layout/reftests/counters/t120403-content-none-00-c-reference.html16
-rw-r--r--layout/reftests/counters/t120403-content-none-00-c-test.html23
-rw-r--r--layout/reftests/counters/t120403-display-none-00-c-reference.html16
-rw-r--r--layout/reftests/counters/t120403-display-none-00-c-test.html23
-rw-r--r--layout/reftests/counters/t120403-visibility-00-c-reference.html16
-rw-r--r--layout/reftests/counters/t120403-visibility-00-c-test.html23
-rw-r--r--layout/reftests/counters/text-boundaries-subpixel-ref.html17
-rw-r--r--layout/reftests/counters/text-boundaries-subpixel.html17
166 files changed, 5424 insertions, 0 deletions
diff --git a/layout/reftests/counters/counter-cjk-decimal-ref.html b/layout/reftests/counters/counter-cjk-decimal-ref.html
new file mode 100644
index 000000000..20848cc15
--- /dev/null
+++ b/layout/reftests/counters/counter-cjk-decimal-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<div>&#x3007;</div>
+<div>&#x4e00;</div>
+<div>&#x4e8c;</div>
+<div>&#x4e09;</div>
+<div>&#x56db;</div>
+<div>&#x4e94;</div>
+<div>&#x516d;</div>
+<div>&#x4e03;</div>
+<div>&#x516b;</div>
+<div>&#x4e5d;</div>
+
+<div>&#x4e00;&#x3007;</div>
+<div>&#x4e00;&#x4e00;</div>
+<div>&#x4e5d;&#x4e5d;</div>
+<div>&#x4e00;&#x3007;&#x3007;</div>
+<div>&#x516d;&#x3007;&#x3007;&#x4e00;</div>
+<div>&#x4e00;&#x4e8c;&#x4e09;&#x56db;&#x4e94;</div>
+
+<div>-1</div>
diff --git a/layout/reftests/counters/counter-cjk-decimal.html b/layout/reftests/counters/counter-cjk-decimal.html
new file mode 100644
index 000000000..e4bcce920
--- /dev/null
+++ b/layout/reftests/counters/counter-cjk-decimal.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<style>
+ div::after {
+ content: counter(n, cjk-decimal);
+ }
+</style>
+<div style="counter-reset: n 0;"></div>
+<div style="counter-reset: n 1;"></div>
+<div style="counter-reset: n 2;"></div>
+<div style="counter-reset: n 3;"></div>
+<div style="counter-reset: n 4;"></div>
+<div style="counter-reset: n 5;"></div>
+<div style="counter-reset: n 6;"></div>
+<div style="counter-reset: n 7;"></div>
+<div style="counter-reset: n 8;"></div>
+<div style="counter-reset: n 9;"></div>
+
+<div style="counter-reset: n 10;"></div>
+<div style="counter-reset: n 11;"></div>
+<div style="counter-reset: n 99;"></div>
+<div style="counter-reset: n 100;"></div>
+<div style="counter-reset: n 6001;"></div>
+<div style="counter-reset: n 12345;"></div>
+
+<div style="counter-reset: n -1;"></div>
diff --git a/layout/reftests/counters/counter-ethiopic-numeric-ref.html b/layout/reftests/counters/counter-ethiopic-numeric-ref.html
new file mode 100644
index 000000000..02cac0b4d
--- /dev/null
+++ b/layout/reftests/counters/counter-ethiopic-numeric-ref.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<style type="text/css">
+ div {
+ float: left;
+ padding: .5em;
+ }
+</style>
+<div>&#x1369;</div>
+<div>&#x136a;</div>
+<div>&#x136b;</div>
+<div>&#x136c;</div>
+<div>&#x136d;</div>
+<div>&#x136e;</div>
+<div>&#x136f;</div>
+<div>&#x1370;</div>
+<div>&#x1371;</div>
+
+<div>&#x1372;</div>
+<div>&#x1372;&#x1369;</div>
+<div>&#x1372;&#x136a;</div>
+<div>&#x1375;&#x136b;</div>
+<div>&#x1378;&#x136f;</div>
+<div>&#x1379;</div>
+<div>&#x137a;&#x1371;</div>
+<div>&#x137b;</div>
+<div>&#x137b;&#x1369;</div>
+<div>&#x136a;&#x137b;&#x1373;&#x136a;</div>
+<div>&#x136d;&#x137b;&#x1375;</div>
+<div>&#x1371;&#x137b;&#x137a;&#x1371;</div>
+<div>&#x1372;&#x137b;</div>
+<div>&#x1372;&#x137b;&#x136d;</div>
+<div>&#x1372;&#x137b;&#x1377;</div>
+<div>&#x1372;&#x137b;&#x1377;&#x136d;</div>
+<div>&#x1372;&#x1370;&#x137b;</div>
+<div>&#x1372;&#x1370;&#x137b;&#x1377;</div>
+<div>&#x1372;&#x1370;&#x137b;&#x1377;&#x136d;</div>
+<div>&#x1376;&#x1370;&#x137b;&#x1377;&#x136d;</div>
+<div>&#x1378;&#x137b;&#x136d;</div>
+<div>&#x1378;&#x1370;&#x137b;</div>
+<div>&#x1378;&#x1370;&#x137b;&#x1377;&#x136c;</div>
+<div>&#x137a;&#x1371;&#x137b;&#x137a;&#x1371;</div>
+<div>&#x137c;</div>
+<div>&#x137b;&#x137c;&#x1369;</div>
+<div>&#x1378;&#x1370;&#x137b;&#x1369;&#x137c;&#x137a;&#x136a;</div>
+
+<div>0</div>
+<div>-1</div>
diff --git a/layout/reftests/counters/counter-ethiopic-numeric.html b/layout/reftests/counters/counter-ethiopic-numeric.html
new file mode 100644
index 000000000..aeca84f30
--- /dev/null
+++ b/layout/reftests/counters/counter-ethiopic-numeric.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<style type="text/css">
+ div {
+ float: left;
+ padding: .5em;
+ }
+ div::after {
+ content: counter(n, ethiopic-numeric);
+ }
+</style>
+<div style="counter-reset: n 1;"></div>
+<div style="counter-reset: n 2;"></div>
+<div style="counter-reset: n 3;"></div>
+<div style="counter-reset: n 4;"></div>
+<div style="counter-reset: n 5;"></div>
+<div style="counter-reset: n 6;"></div>
+<div style="counter-reset: n 7;"></div>
+<div style="counter-reset: n 8;"></div>
+<div style="counter-reset: n 9;"></div>
+
+<div style="counter-reset: n 10;"></div>
+<div style="counter-reset: n 11;"></div>
+<div style="counter-reset: n 12;"></div>
+<div style="counter-reset: n 43;"></div>
+<div style="counter-reset: n 77;"></div>
+<div style="counter-reset: n 80;"></div>
+<div style="counter-reset: n 99;"></div>
+<div style="counter-reset: n 100;"></div>
+<div style="counter-reset: n 101;"></div>
+<div style="counter-reset: n 222;"></div>
+<div style="counter-reset: n 540;"></div>
+<div style="counter-reset: n 999;"></div>
+<div style="counter-reset: n 1000;"></div>
+<div style="counter-reset: n 1005;"></div>
+<div style="counter-reset: n 1060;"></div>
+<div style="counter-reset: n 1065;"></div>
+<div style="counter-reset: n 1800;"></div>
+<div style="counter-reset: n 1860;"></div>
+<div style="counter-reset: n 1865;"></div>
+<div style="counter-reset: n 5865;"></div>
+<div style="counter-reset: n 7005;"></div>
+<div style="counter-reset: n 7800;"></div>
+<div style="counter-reset: n 7864;"></div>
+<div style="counter-reset: n 9999;"></div>
+<div style="counter-reset: n 10000;"></div>
+<div style="counter-reset: n 1000001;"></div>
+<div style="counter-reset: n 78010092;"></div>
+
+<div style="counter-reset: n 0;"></div>
+<div style="counter-reset: n -1;"></div>
diff --git a/layout/reftests/counters/counter-hebrew-reference.html b/layout/reftests/counters/counter-hebrew-reference.html
new file mode 100644
index 000000000..0d08f6d49
--- /dev/null
+++ b/layout/reftests/counters/counter-hebrew-reference.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter() error cases</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>&#x5d0;</span>
+ <span>&#x5d1;</span>
+ <span>&#x5d2;</span>
+ <span>&#x5d3;</span>
+ <span>&#x5d4;</span>
+ <span>&#x5d5;</span>
+ <span>&#x5d6;</span>
+ <span>&#x5d7;</span>
+ <span>&#x5d8;</span>
+ <span>&#x5d9;</span>
+ <span>&#x5d9;&#x5d0;</span>
+ <span>&#x5d9;&#x5d1;</span>
+ <span>&#x5d9;&#x5d2;</span>
+ <span>&#x5d9;&#x5d3;</span>
+ <span>&#x5d8;&#x5d5;</span>
+ <span>&#x5d8;&#x5d6;</span>
+ <span>&#x5d9;&#x5d6;</span>
+ <span>&#x5db;</span>
+ <span>&#x5dc;</span>
+ <span>&#x5de;</span>
+ <span>&#x5e0;</span>
+ <span>&#x5e1;</span>
+ <span>&#x5e2;</span>
+ <span>&#x5e4;</span>
+ <span>&#x5e6;</span>
+ <span>&#x5e7;</span>
+ <span>&#x5e8;</span>
+ <span>&#x5e9;</span>
+ <span>&#x5ea;</span>
+ <span>&#x5ea;&#x5e7;</span>
+ <span>&#x5ea;&#x5e8;</span>
+ <span>&#x5ea;&#x5e9;</span>
+ <span>&#x5ea;&#x5ea;</span>
+ <span>&#x5ea;&#x5ea;&#x5e7;</span>
+ <span>&#x5d0;&#x05f3;</span>
+ <span>&#x5d1;&#x05f3;</span>
+ <span>&#x5d2;&#x05f3;</span>
+ <span>&#x5d3;&#x05f3;</span>
+ <span>&#x5d4;&#x05f3;</span>
+ <span>&#x5d5;&#x05f3;</span>
+ <span>&#x5d6;&#x05f3;</span>
+ <span>&#x5d7;&#x05f3;</span>
+ <span>&#x5d8;&#x05f3;</span>
+ <span>&#x5d8;&#x05f3;&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;</span>
+ <span>&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;&#x05f3;&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;</span>
+ <span>1000000</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-hebrew-test.html b/layout/reftests/counters/counter-hebrew-test.html
new file mode 100644
index 000000000..8c636342d
--- /dev/null
+++ b/layout/reftests/counters/counter-hebrew-test.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter() error cases</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, hebrew); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 19"></span>
+ <span style="counter-reset: c 29"></span>
+ <span style="counter-reset: c 39"></span>
+ <span style="counter-reset: c 49"></span>
+ <span style="counter-reset: c 59"></span>
+ <span style="counter-reset: c 69"></span>
+ <span style="counter-reset: c 79"></span>
+ <span style="counter-reset: c 89"></span>
+ <span style="counter-reset: c 99"></span>
+ <span style="counter-reset: c 199"></span>
+ <span style="counter-reset: c 299"></span>
+ <span style="counter-reset: c 399"></span>
+ <span style="counter-reset: c 499"></span>
+ <span style="counter-reset: c 599"></span>
+ <span style="counter-reset: c 699"></span>
+ <span style="counter-reset: c 799"></span>
+ <span style="counter-reset: c 899"></span>
+ <span style="counter-reset: c 999"></span>
+ <span style="counter-reset: c 1999"></span>
+ <span style="counter-reset: c 2999"></span>
+ <span style="counter-reset: c 3999"></span>
+ <span style="counter-reset: c 4999"></span>
+ <span style="counter-reset: c 5999"></span>
+ <span style="counter-reset: c 6999"></span>
+ <span style="counter-reset: c 7999"></span>
+ <span style="counter-reset: c 8999"></span>
+ <span style="counter-reset: c 9998"></span>
+ <span style="counter-reset: c 999998"></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-japanese-formal-ref.html b/layout/reftests/counters/counter-japanese-formal-ref.html
new file mode 100644
index 000000000..674823030
--- /dev/null
+++ b/layout/reftests/counters/counter-japanese-formal-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<div>&#x96f6;</div>
+<div>&#x58f1;</div>
+<div>&#x5f10;</div>
+<div>&#x53c2;</div>
+<div>&#x56db;</div>
+<div>&#x4f0d;</div>
+<div>&#x516d;</div>
+<div>&#x4e03;</div>
+<div>&#x516b;</div>
+<div>&#x4e5d;</div>
+
+<div>&#x58f1;&#x62fe;</div>
+<div>&#x58f1;&#x767e;</div>
+<div>&#x58f1;&#x9621;</div>
+<div>&#x58f1;&#x842c;</div>
+<div>&#x58f1;&#x62fe;&#x842c;</div>
+<div>&#x58f1;&#x767e;&#x842c;</div>
+<div>&#x58f1;&#x9621;&#x842c;</div>
+<div>&#x58f1;&#x5104;</div>
+<div>&#x58f1;&#x62fe;&#x5104;</div>
+
+<div>&#x58f1;&#x62fe;&#x58f1;</div>
+<div>&#x4e5d;&#x62fe;&#x4e5d;</div>
+<div>&#x58f1;&#x767e;&#x58f1;</div>
+<div>&#x5f10;&#x767e;</div>
+<div>&#x516d;&#x9621;&#x58f1;</div>
+<div>&#x58f1;&#x842c;&#x58f1;</div>
+<div>&#x58f1;&#x842c;&#x58f1;&#x62fe;&#x58f1;</div>
+<div>&#x58f1;&#x842c;&#x58f1;&#x767e;&#x58f1;</div>
+<div>&#x58f1;&#x842c;&#x58f1;&#x9621;&#x58f1;&#x767e;&#x58f1;&#x62fe;&#x58f1;</div>
+<div>&#x58f1;&#x9621;&#x58f1;&#x767e;&#x842c;</div>
+<div>&#x58f1;&#x5104;&#x58f1;&#x842c;&#x58f1;</div>
+<div>&#x58f1;&#x5104;&#x58f1;&#x62fe;&#x58f1;&#x842c;&#x58f1;</div>
+
+<div>&#x30de;&#x30a4;&#x30ca;&#x30b9;&#x58f1;</div>
diff --git a/layout/reftests/counters/counter-japanese-formal.html b/layout/reftests/counters/counter-japanese-formal.html
new file mode 100644
index 000000000..f580db780
--- /dev/null
+++ b/layout/reftests/counters/counter-japanese-formal.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style>
+ div::after {
+ content: counter(n, japanese-formal);
+ }
+</style>
+<div style="counter-reset: n 0;"></div>
+<div style="counter-reset: n 1;"></div>
+<div style="counter-reset: n 2;"></div>
+<div style="counter-reset: n 3;"></div>
+<div style="counter-reset: n 4;"></div>
+<div style="counter-reset: n 5;"></div>
+<div style="counter-reset: n 6;"></div>
+<div style="counter-reset: n 7;"></div>
+<div style="counter-reset: n 8;"></div>
+<div style="counter-reset: n 9;"></div>
+
+<div style="counter-reset: n 10;"></div>
+<div style="counter-reset: n 100;"></div>
+<div style="counter-reset: n 1000;"></div>
+<div style="counter-reset: n 10000;"></div>
+<div style="counter-reset: n 100000;"></div>
+<div style="counter-reset: n 1000000;"></div>
+<div style="counter-reset: n 10000000;"></div>
+<div style="counter-reset: n 100000000;"></div>
+<div style="counter-reset: n 1000000000;"></div>
+
+<div style="counter-reset: n 11;"></div>
+<div style="counter-reset: n 99;"></div>
+<div style="counter-reset: n 101;"></div>
+<div style="counter-reset: n 200;"></div>
+<div style="counter-reset: n 6001;"></div>
+<div style="counter-reset: n 10001;"></div>
+<div style="counter-reset: n 10011;"></div>
+<div style="counter-reset: n 10101;"></div>
+<div style="counter-reset: n 11111;"></div>
+<div style="counter-reset: n 11000000;"></div>
+<div style="counter-reset: n 100010001;"></div>
+<div style="counter-reset: n 100110001;"></div>
+
+<div style="counter-reset: n -1;"></div>
diff --git a/layout/reftests/counters/counter-japanese-informal-ref.html b/layout/reftests/counters/counter-japanese-informal-ref.html
new file mode 100644
index 000000000..a08a63631
--- /dev/null
+++ b/layout/reftests/counters/counter-japanese-informal-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<div>&#x3007;</div>
+<div>&#x4e00;</div>
+<div>&#x4e8c;</div>
+<div>&#x4e09;</div>
+<div>&#x56db;</div>
+<div>&#x4e94;</div>
+<div>&#x516d;</div>
+<div>&#x4e03;</div>
+<div>&#x516b;</div>
+<div>&#x4e5d;</div>
+
+<div>&#x5341;</div>
+<div>&#x767e;</div>
+<div>&#x5343;</div>
+<div>&#x4e00;&#x4e07;</div>
+<div>&#x5341;&#x4e07;</div>
+<div>&#x767e;&#x4e07;</div>
+<div>&#x4e00;&#x5343;&#x4e07;</div>
+<div>&#x4e00;&#x5104;</div>
+<div>&#x5341;&#x5104;</div>
+
+<div>&#x5341;&#x4e00;</div>
+<div>&#x4e5d;&#x5341;&#x4e5d;</div>
+<div>&#x767e;&#x4e00;</div>
+<div>&#x4e8c;&#x767e;</div>
+<div>&#x516d;&#x5343;&#x4e00;</div>
+<div>&#x4e00;&#x4e07;&#x4e00;</div>
+<div>&#x4e00;&#x4e07;&#x5341;&#x4e00;</div>
+<div>&#x4e00;&#x4e07;&#x767e;&#x4e00;</div>
+<div>&#x4e00;&#x4e07;&#x4e00;&#x5343;&#x767e;&#x5341;&#x4e00;</div>
+<div>&#x4e00;&#x5343;&#x767e;&#x4e07;</div>
+<div>&#x4e00;&#x5104;&#x4e00;&#x4e07;&#x4e00;</div>
+<div>&#x4e00;&#x5104;&#x5341;&#x4e00;&#x4e07;&#x4e00;</div>
+
+<div>&#x30de;&#x30a4;&#x30ca;&#x30b9;&#x4e00;</div>
diff --git a/layout/reftests/counters/counter-japanese-informal.html b/layout/reftests/counters/counter-japanese-informal.html
new file mode 100644
index 000000000..e421fb5f6
--- /dev/null
+++ b/layout/reftests/counters/counter-japanese-informal.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style>
+ div::after {
+ content: counter(n, japanese-informal);
+ }
+</style>
+<div style="counter-reset: n 0;"></div>
+<div style="counter-reset: n 1;"></div>
+<div style="counter-reset: n 2;"></div>
+<div style="counter-reset: n 3;"></div>
+<div style="counter-reset: n 4;"></div>
+<div style="counter-reset: n 5;"></div>
+<div style="counter-reset: n 6;"></div>
+<div style="counter-reset: n 7;"></div>
+<div style="counter-reset: n 8;"></div>
+<div style="counter-reset: n 9;"></div>
+
+<div style="counter-reset: n 10;"></div>
+<div style="counter-reset: n 100;"></div>
+<div style="counter-reset: n 1000;"></div>
+<div style="counter-reset: n 10000;"></div>
+<div style="counter-reset: n 100000;"></div>
+<div style="counter-reset: n 1000000;"></div>
+<div style="counter-reset: n 10000000;"></div>
+<div style="counter-reset: n 100000000;"></div>
+<div style="counter-reset: n 1000000000;"></div>
+
+<div style="counter-reset: n 11;"></div>
+<div style="counter-reset: n 99;"></div>
+<div style="counter-reset: n 101;"></div>
+<div style="counter-reset: n 200;"></div>
+<div style="counter-reset: n 6001;"></div>
+<div style="counter-reset: n 10001;"></div>
+<div style="counter-reset: n 10011;"></div>
+<div style="counter-reset: n 10101;"></div>
+<div style="counter-reset: n 11111;"></div>
+<div style="counter-reset: n 11000000;"></div>
+<div style="counter-reset: n 100010001;"></div>
+<div style="counter-reset: n 100110001;"></div>
+
+<div style="counter-reset: n -1;"></div>
diff --git a/layout/reftests/counters/counter-korean-hangul-formal-ref.html b/layout/reftests/counters/counter-korean-hangul-formal-ref.html
new file mode 100644
index 000000000..641fa5de1
--- /dev/null
+++ b/layout/reftests/counters/counter-korean-hangul-formal-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<div>&#xc601;,</div>
+<div>&#xc77c;,</div>
+<div>&#xc774;,</div>
+<div>&#xc0bc;,</div>
+<div>&#xc0ac;,</div>
+<div>&#xc624;,</div>
+<div>&#xc721;,</div>
+<div>&#xce60;,</div>
+<div>&#xd314;,</div>
+<div>&#xad6c;,</div>
+
+<div>&#xc77c;&#xc2ed;,</div>
+<div>&#xc77c;&#xbc31;,</div>
+<div>&#xc77c;&#xcc9c;,</div>
+<div>&#xc77c;&#xb9cc;,</div>
+<div>&#xc77c;&#xc2ed;&#xb9cc;,</div>
+<div>&#xc77c;&#xbc31;&#xb9cc;,</div>
+<div>&#xc77c;&#xcc9c;&#xb9cc;,</div>
+<div>&#xc77c;&#xc5b5;,</div>
+<div>&#xc77c;&#xc2ed;&#xc5b5;,</div>
+
+<div>&#xc77c;&#xc2ed;&#xc77c;,</div>
+<div>&#xad6c;&#xc2ed;&#xad6c;,</div>
+<div>&#xc77c;&#xbc31;&#xc77c;,</div>
+<div>&#xc774;&#xbc31;,</div>
+<div>&#xc721;&#xcc9c;&#xc77c;,</div>
+<div>&#xc77c;&#xb9cc; &#xc77c;,</div>
+<div>&#xc77c;&#xb9cc; &#xc77c;&#xc2ed;&#xc77c;,</div>
+<div>&#xc77c;&#xb9cc; &#xc77c;&#xbc31;&#xc77c;,</div>
+<div>&#xc77c;&#xb9cc; &#xc77c;&#xcc9c;&#xc77c;&#xbc31;&#xc77c;&#xc2ed;&#xc77c;,</div>
+<div>&#xc77c;&#xcc9c;&#xc77c;&#xbc31;&#xb9cc;,</div>
+<div>&#xc77c;&#xc5b5; &#xc77c;&#xb9cc; &#xc77c;,</div>
+<div>&#xc77c;&#xc5b5; &#xc77c;&#xc2ed;&#xc77c;&#xb9cc; &#xc77c;,</div>
+
+<div>&#xb9c8;&#xc774;&#xb108;&#xc2a4; &#xc77c;,</div>
diff --git a/layout/reftests/counters/counter-korean-hangul-formal.html b/layout/reftests/counters/counter-korean-hangul-formal.html
new file mode 100644
index 000000000..57a110cee
--- /dev/null
+++ b/layout/reftests/counters/counter-korean-hangul-formal.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style>
+ div::before {
+ content: counter(n, korean-hangul-formal);
+ }
+</style>
+<div style="counter-reset: n 0;">,</div>
+<div style="counter-reset: n 1;">,</div>
+<div style="counter-reset: n 2;">,</div>
+<div style="counter-reset: n 3;">,</div>
+<div style="counter-reset: n 4;">,</div>
+<div style="counter-reset: n 5;">,</div>
+<div style="counter-reset: n 6;">,</div>
+<div style="counter-reset: n 7;">,</div>
+<div style="counter-reset: n 8;">,</div>
+<div style="counter-reset: n 9;">,</div>
+
+<div style="counter-reset: n 10;">,</div>
+<div style="counter-reset: n 100;">,</div>
+<div style="counter-reset: n 1000;">,</div>
+<div style="counter-reset: n 10000;">,</div>
+<div style="counter-reset: n 100000;">,</div>
+<div style="counter-reset: n 1000000;">,</div>
+<div style="counter-reset: n 10000000;">,</div>
+<div style="counter-reset: n 100000000;">,</div>
+<div style="counter-reset: n 1000000000;">,</div>
+
+<div style="counter-reset: n 11;">,</div>
+<div style="counter-reset: n 99;">,</div>
+<div style="counter-reset: n 101;">,</div>
+<div style="counter-reset: n 200;">,</div>
+<div style="counter-reset: n 6001;">,</div>
+<div style="counter-reset: n 10001;">,</div>
+<div style="counter-reset: n 10011;">,</div>
+<div style="counter-reset: n 10101;">,</div>
+<div style="counter-reset: n 11111;">,</div>
+<div style="counter-reset: n 11000000;">,</div>
+<div style="counter-reset: n 100010001;">,</div>
+<div style="counter-reset: n 100110001;">,</div>
+
+<div style="counter-reset: n -1;">,</div>
diff --git a/layout/reftests/counters/counter-korean-hanja-formal-ref.html b/layout/reftests/counters/counter-korean-hanja-formal-ref.html
new file mode 100644
index 000000000..da1f8a481
--- /dev/null
+++ b/layout/reftests/counters/counter-korean-hanja-formal-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<div>&#x96f6;,</div>
+<div>&#x58f9;,</div>
+<div>&#x8cb3;,</div>
+<div>&#x53c3;,</div>
+<div>&#x56db;,</div>
+<div>&#x4e94;,</div>
+<div>&#x516d;,</div>
+<div>&#x4e03;,</div>
+<div>&#x516b;,</div>
+<div>&#x4e5d;,</div>
+
+<div>&#x58f9;&#x62fe;,</div>
+<div>&#x58f9;&#x767e;,</div>
+<div>&#x58f9;&#x4edf;,</div>
+<div>&#x58f9;&#x842c;,</div>
+<div>&#x58f9;&#x62fe;&#x842c;,</div>
+<div>&#x58f9;&#x767e;&#x842c;,</div>
+<div>&#x58f9;&#x4edf;&#x842c;,</div>
+<div>&#x58f9;&#x5104;,</div>
+<div>&#x58f9;&#x62fe;&#x5104;,</div>
+
+<div>&#x58f9;&#x62fe;&#x58f9;,</div>
+<div>&#x4e5d;&#x62fe;&#x4e5d;,</div>
+<div>&#x58f9;&#x767e;&#x58f9;,</div>
+<div>&#x8cb3;&#x767e;,</div>
+<div>&#x516d;&#x4edf;&#x58f9;,</div>
+<div>&#x58f9;&#x842c; &#x58f9;,</div>
+<div>&#x58f9;&#x842c; &#x58f9;&#x62fe;&#x58f9;,</div>
+<div>&#x58f9;&#x842c; &#x58f9;&#x767e;&#x58f9;,</div>
+<div>&#x58f9;&#x842c; &#x58f9;&#x4edf;&#x58f9;&#x767e;&#x58f9;&#x62fe;&#x58f9;,</div>
+<div>&#x58f9;&#x4edf;&#x58f9;&#x767e;&#x842c;,</div>
+<div>&#x58f9;&#x5104; &#x58f9;&#x842c; &#x58f9;,</div>
+<div>&#x58f9;&#x5104; &#x58f9;&#x62fe;&#x58f9;&#x842c; &#x58f9;,</div>
+
+<div>&#xb9c8;&#xc774;&#xb108;&#xc2a4; &#x58f9;,</div>
diff --git a/layout/reftests/counters/counter-korean-hanja-formal.html b/layout/reftests/counters/counter-korean-hanja-formal.html
new file mode 100644
index 000000000..fa1289229
--- /dev/null
+++ b/layout/reftests/counters/counter-korean-hanja-formal.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style>
+ div::before {
+ content: counter(n, korean-hanja-formal);
+ }
+</style>
+<div style="counter-reset: n 0;">,</div>
+<div style="counter-reset: n 1;">,</div>
+<div style="counter-reset: n 2;">,</div>
+<div style="counter-reset: n 3;">,</div>
+<div style="counter-reset: n 4;">,</div>
+<div style="counter-reset: n 5;">,</div>
+<div style="counter-reset: n 6;">,</div>
+<div style="counter-reset: n 7;">,</div>
+<div style="counter-reset: n 8;">,</div>
+<div style="counter-reset: n 9;">,</div>
+
+<div style="counter-reset: n 10;">,</div>
+<div style="counter-reset: n 100;">,</div>
+<div style="counter-reset: n 1000;">,</div>
+<div style="counter-reset: n 10000;">,</div>
+<div style="counter-reset: n 100000;">,</div>
+<div style="counter-reset: n 1000000;">,</div>
+<div style="counter-reset: n 10000000;">,</div>
+<div style="counter-reset: n 100000000;">,</div>
+<div style="counter-reset: n 1000000000;">,</div>
+
+<div style="counter-reset: n 11;">,</div>
+<div style="counter-reset: n 99;">,</div>
+<div style="counter-reset: n 101;">,</div>
+<div style="counter-reset: n 200;">,</div>
+<div style="counter-reset: n 6001;">,</div>
+<div style="counter-reset: n 10001;">,</div>
+<div style="counter-reset: n 10011;">,</div>
+<div style="counter-reset: n 10101;">,</div>
+<div style="counter-reset: n 11111;">,</div>
+<div style="counter-reset: n 11000000;">,</div>
+<div style="counter-reset: n 100010001;">,</div>
+<div style="counter-reset: n 100110001;">,</div>
+
+<div style="counter-reset: n -1;">,</div>
diff --git a/layout/reftests/counters/counter-korean-hanja-informal-ref.html b/layout/reftests/counters/counter-korean-hanja-informal-ref.html
new file mode 100644
index 000000000..1a7286f4d
--- /dev/null
+++ b/layout/reftests/counters/counter-korean-hanja-informal-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<div>&#x96f6;,</div>
+<div>&#x4e00;,</div>
+<div>&#x4e8c;,</div>
+<div>&#x4e09;,</div>
+<div>&#x56db;,</div>
+<div>&#x4e94;,</div>
+<div>&#x516d;,</div>
+<div>&#x4e03;,</div>
+<div>&#x516b;,</div>
+<div>&#x4e5d;,</div>
+
+<div>&#x5341;,</div>
+<div>&#x767e;,</div>
+<div>&#x5343;,</div>
+<div>&#x842c;,</div>
+<div>&#x5341;&#x842c;,</div>
+<div>&#x767e;&#x842c;,</div>
+<div>&#x5343;&#x842c;,</div>
+<div>&#x4e00;&#x5104;,</div>
+<div>&#x5341;&#x5104;,</div>
+
+<div>&#x5341;&#x4e00;,</div>
+<div>&#x4e5d;&#x5341;&#x4e5d;,</div>
+<div>&#x767e;&#x4e00;,</div>
+<div>&#x4e8c;&#x767e;,</div>
+<div>&#x516d;&#x5343;&#x4e00;,</div>
+<div>&#x842c; &#x4e00;,</div>
+<div>&#x842c; &#x5341;&#x4e00;,</div>
+<div>&#x842c; &#x767e;&#x4e00;,</div>
+<div>&#x842c; &#x5343;&#x767e;&#x5341;&#x4e00;,</div>
+<div>&#x5343;&#x767e;&#x842c;,</div>
+<div>&#x4e00;&#x5104; &#x842c; &#x4e00;,</div>
+<div>&#x4e00;&#x5104; &#x5341;&#x4e00;&#x842c; &#x4e00;,</div>
+
+<div>&#xb9c8;&#xc774;&#xb108;&#xc2a4; &#x4e00;,</div>
diff --git a/layout/reftests/counters/counter-korean-hanja-informal.html b/layout/reftests/counters/counter-korean-hanja-informal.html
new file mode 100644
index 000000000..51e70cb9a
--- /dev/null
+++ b/layout/reftests/counters/counter-korean-hanja-informal.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style>
+ div::before {
+ content: counter(n, korean-hanja-informal);
+ }
+</style>
+<div style="counter-reset: n 0;">,</div>
+<div style="counter-reset: n 1;">,</div>
+<div style="counter-reset: n 2;">,</div>
+<div style="counter-reset: n 3;">,</div>
+<div style="counter-reset: n 4;">,</div>
+<div style="counter-reset: n 5;">,</div>
+<div style="counter-reset: n 6;">,</div>
+<div style="counter-reset: n 7;">,</div>
+<div style="counter-reset: n 8;">,</div>
+<div style="counter-reset: n 9;">,</div>
+
+<div style="counter-reset: n 10;">,</div>
+<div style="counter-reset: n 100;">,</div>
+<div style="counter-reset: n 1000;">,</div>
+<div style="counter-reset: n 10000;">,</div>
+<div style="counter-reset: n 100000;">,</div>
+<div style="counter-reset: n 1000000;">,</div>
+<div style="counter-reset: n 10000000;">,</div>
+<div style="counter-reset: n 100000000;">,</div>
+<div style="counter-reset: n 1000000000;">,</div>
+
+<div style="counter-reset: n 11;">,</div>
+<div style="counter-reset: n 99;">,</div>
+<div style="counter-reset: n 101;">,</div>
+<div style="counter-reset: n 200;">,</div>
+<div style="counter-reset: n 6001;">,</div>
+<div style="counter-reset: n 10001;">,</div>
+<div style="counter-reset: n 10011;">,</div>
+<div style="counter-reset: n 10101;">,</div>
+<div style="counter-reset: n 11111;">,</div>
+<div style="counter-reset: n 11000000;">,</div>
+<div style="counter-reset: n 100010001;">,</div>
+<div style="counter-reset: n 100110001;">,</div>
+
+<div style="counter-reset: n -1;">,</div>
diff --git a/layout/reftests/counters/counter-name-case-sensitive-ref.html b/layout/reftests/counters/counter-name-case-sensitive-ref.html
new file mode 100644
index 000000000..cccccc90e
--- /dev/null
+++ b/layout/reftests/counters/counter-name-case-sensitive-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test that counter names are case sensitive (bug 416106)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+
+<div>1-5</div>
+<div>1-7</div>
+<div>1-7</div>
+<div>2-7</div>
+<div>2-9</div>
+<div>2-9</div>
+
+</body>
+</html>
diff --git a/layout/reftests/counters/counter-name-case-sensitive.html b/layout/reftests/counters/counter-name-case-sensitive.html
new file mode 100644
index 000000000..7697062df
--- /dev/null
+++ b/layout/reftests/counters/counter-name-case-sensitive.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title>Test that counter names are case sensitive (bug 416106)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <style type="text/css">
+
+ body { counter-reset: foo 0 Foo 5; }
+ div:before { content: counters(foo, ".") "-" counters(Foo, "."); }
+ div.a { counter-increment: foo; }
+ div.b { counter-increment: Foo 2; }
+
+ </style>
+</head>
+<body>
+
+<div class="a"></div>
+<div class="b"></div>
+<div></div>
+<div class="a"></div>
+<div class="b"></div>
+<div></div>
+
+</body>
+</html>
diff --git a/layout/reftests/counters/counter-reset-integer-range-ref.html b/layout/reftests/counters/counter-reset-integer-range-ref.html
new file mode 100644
index 000000000..dfc950bc1
--- /dev/null
+++ b/layout/reftests/counters/counter-reset-integer-range-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<title>Expected integer range</title>
+0
+2147483647
+2147483647
+2147483647
+-2147483647
+-2147483647
+-2147483647
diff --git a/layout/reftests/counters/counter-reset-integer-range.html b/layout/reftests/counters/counter-reset-integer-range.html
new file mode 100644
index 000000000..7867e09bd
--- /dev/null
+++ b/layout/reftests/counters/counter-reset-integer-range.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>Expected integer range</title>
+<style>
+
+span::after { content: counter(c); }
+
+</style>
+<span style="counter-reset: c 0"></span>
+<span style="counter-reset: c 2147483647"></span>
+<span style="counter-reset: c 2147483648"></span>
+<span style="counter-reset: c 2147483649"></span>
+<span style="counter-reset: c -2147483647"></span>
+<span style="counter-reset: c -2147483648"></span>
+<span style="counter-reset: c -2147483649"></span>
diff --git a/layout/reftests/counters/counter-simp-chinese-formal-ref.html b/layout/reftests/counters/counter-simp-chinese-formal-ref.html
new file mode 100644
index 000000000..9a39f6742
--- /dev/null
+++ b/layout/reftests/counters/counter-simp-chinese-formal-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<div>&#x96f6;</div>
+<div>&#x58f9;</div>
+<div>&#x8d30;</div>
+<div>&#x53c1;</div>
+<div>&#x8086;</div>
+<div>&#x4f0d;</div>
+<div>&#x9646;</div>
+<div>&#x67d2;</div>
+<div>&#x634c;</div>
+<div>&#x7396;</div>
+
+<div>&#x58f9;&#x62fe;</div>
+<div>&#x58f9;&#x4f70;</div>
+<div>&#x58f9;&#x4edf;</div>
+<div>&#x58f9;&#x4e07;</div>
+<div>&#x58f9;&#x62fe;&#x4e07;</div>
+<div>&#x58f9;&#x4f70;&#x4e07;</div>
+<div>&#x58f9;&#x4edf;&#x4e07;</div>
+<div>&#x58f9;&#x4ebf;</div>
+<div>&#x58f9;&#x62fe;&#x4ebf;</div>
+
+<div>&#x58f9;&#x62fe;&#x58f9;</div>
+<div>&#x7396;&#x62fe;&#x7396;</div>
+<div>&#x58f9;&#x4f70;&#x96f6;&#x58f9;</div>
+<div>&#x8d30;&#x4f70;</div>
+<div>&#x9646;&#x4edf;&#x96f6;&#x58f9;</div>
+<div>&#x58f9;&#x4e07;&#x96f6;&#x58f9;</div>
+<div>&#x58f9;&#x4e07;&#x96f6;&#x58f9;&#x62fe;&#x58f9;</div>
+<div>&#x58f9;&#x4e07;&#x96f6;&#x58f9;&#x4f70;&#x96f6;&#x58f9;</div>
+<div>&#x58f9;&#x4e07;&#x58f9;&#x4edf;&#x58f9;&#x4f70;&#x58f9;&#x62fe;&#x58f9;</div>
+<div>&#x58f9;&#x4edf;&#x58f9;&#x4f70;&#x4e07;</div>
+<div>&#x58f9;&#x4ebf;&#x96f6;&#x58f9;&#x4e07;&#x96f6;&#x58f9;</div>
+<div>&#x58f9;&#x4ebf;&#x96f6;&#x58f9;&#x62fe;&#x58f9;&#x4e07;&#x96f6;&#x58f9;</div>
+
+<div>&#x8d1f;&#x58f9;</div>
diff --git a/layout/reftests/counters/counter-simp-chinese-formal.html b/layout/reftests/counters/counter-simp-chinese-formal.html
new file mode 100644
index 000000000..2f9f15f2c
--- /dev/null
+++ b/layout/reftests/counters/counter-simp-chinese-formal.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style>
+ div::after {
+ content: counter(n, simp-chinese-formal);
+ }
+</style>
+<div style="counter-reset: n 0;"></div>
+<div style="counter-reset: n 1;"></div>
+<div style="counter-reset: n 2;"></div>
+<div style="counter-reset: n 3;"></div>
+<div style="counter-reset: n 4;"></div>
+<div style="counter-reset: n 5;"></div>
+<div style="counter-reset: n 6;"></div>
+<div style="counter-reset: n 7;"></div>
+<div style="counter-reset: n 8;"></div>
+<div style="counter-reset: n 9;"></div>
+
+<div style="counter-reset: n 10;"></div>
+<div style="counter-reset: n 100;"></div>
+<div style="counter-reset: n 1000;"></div>
+<div style="counter-reset: n 10000;"></div>
+<div style="counter-reset: n 100000;"></div>
+<div style="counter-reset: n 1000000;"></div>
+<div style="counter-reset: n 10000000;"></div>
+<div style="counter-reset: n 100000000;"></div>
+<div style="counter-reset: n 1000000000;"></div>
+
+<div style="counter-reset: n 11;"></div>
+<div style="counter-reset: n 99;"></div>
+<div style="counter-reset: n 101;"></div>
+<div style="counter-reset: n 200;"></div>
+<div style="counter-reset: n 6001;"></div>
+<div style="counter-reset: n 10001;"></div>
+<div style="counter-reset: n 10011;"></div>
+<div style="counter-reset: n 10101;"></div>
+<div style="counter-reset: n 11111;"></div>
+<div style="counter-reset: n 11000000;"></div>
+<div style="counter-reset: n 100010001;"></div>
+<div style="counter-reset: n 100110001;"></div>
+
+<div style="counter-reset: n -1;"></div>
diff --git a/layout/reftests/counters/counter-simp-chinese-informal-ref.html b/layout/reftests/counters/counter-simp-chinese-informal-ref.html
new file mode 100644
index 000000000..adc0a4c6c
--- /dev/null
+++ b/layout/reftests/counters/counter-simp-chinese-informal-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<div>&#x96f6;</div>
+<div>&#x4e00;</div>
+<div>&#x4e8c;</div>
+<div>&#x4e09;</div>
+<div>&#x56db;</div>
+<div>&#x4e94;</div>
+<div>&#x516d;</div>
+<div>&#x4e03;</div>
+<div>&#x516b;</div>
+<div>&#x4e5d;</div>
+
+<div>&#x5341;</div>
+<div>&#x4e00;&#x767e;</div>
+<div>&#x4e00;&#x5343;</div>
+<div>&#x4e00;&#x4e07;</div>
+<div>&#x5341;&#x4e07;</div>
+<div>&#x4e00;&#x767e;&#x4e07;</div>
+<div>&#x4e00;&#x5343;&#x4e07;</div>
+<div>&#x4e00;&#x4ebf;</div>
+<div>&#x5341;&#x4ebf;</div>
+
+<div>&#x5341;&#x4e00;</div>
+<div>&#x4e5d;&#x5341;&#x4e5d;</div>
+<div>&#x4e00;&#x767e;&#x96f6;&#x4e00;</div>
+<div>&#x4e8c;&#x767e;</div>
+<div>&#x516d;&#x5343;&#x96f6;&#x4e00;</div>
+<div>&#x4e00;&#x4e07;&#x96f6;&#x4e00;</div>
+<div>&#x4e00;&#x4e07;&#x96f6;&#x4e00;&#x5341;&#x4e00;</div>
+<div>&#x4e00;&#x4e07;&#x96f6;&#x4e00;&#x767e;&#x96f6;&#x4e00;</div>
+<div>&#x4e00;&#x4e07;&#x4e00;&#x5343;&#x4e00;&#x767e;&#x4e00;&#x5341;&#x4e00;</div>
+<div>&#x4e00;&#x5343;&#x4e00;&#x767e;&#x4e07;</div>
+<div>&#x4e00;&#x4ebf;&#x96f6;&#x4e00;&#x4e07;&#x96f6;&#x4e00;</div>
+<div>&#x4e00;&#x4ebf;&#x96f6;&#x5341;&#x4e00;&#x4e07;&#x96f6;&#x4e00;</div>
+
+<div>&#x8d1f;&#x4e00;</div>
diff --git a/layout/reftests/counters/counter-simp-chinese-informal.html b/layout/reftests/counters/counter-simp-chinese-informal.html
new file mode 100644
index 000000000..c4c394b89
--- /dev/null
+++ b/layout/reftests/counters/counter-simp-chinese-informal.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style>
+ div::after {
+ content: counter(n, simp-chinese-informal);
+ }
+</style>
+<div style="counter-reset: n 0;"></div>
+<div style="counter-reset: n 1;"></div>
+<div style="counter-reset: n 2;"></div>
+<div style="counter-reset: n 3;"></div>
+<div style="counter-reset: n 4;"></div>
+<div style="counter-reset: n 5;"></div>
+<div style="counter-reset: n 6;"></div>
+<div style="counter-reset: n 7;"></div>
+<div style="counter-reset: n 8;"></div>
+<div style="counter-reset: n 9;"></div>
+
+<div style="counter-reset: n 10;"></div>
+<div style="counter-reset: n 100;"></div>
+<div style="counter-reset: n 1000;"></div>
+<div style="counter-reset: n 10000;"></div>
+<div style="counter-reset: n 100000;"></div>
+<div style="counter-reset: n 1000000;"></div>
+<div style="counter-reset: n 10000000;"></div>
+<div style="counter-reset: n 100000000;"></div>
+<div style="counter-reset: n 1000000000;"></div>
+
+<div style="counter-reset: n 11;"></div>
+<div style="counter-reset: n 99;"></div>
+<div style="counter-reset: n 101;"></div>
+<div style="counter-reset: n 200;"></div>
+<div style="counter-reset: n 6001;"></div>
+<div style="counter-reset: n 10001;"></div>
+<div style="counter-reset: n 10011;"></div>
+<div style="counter-reset: n 10101;"></div>
+<div style="counter-reset: n 11111;"></div>
+<div style="counter-reset: n 11000000;"></div>
+<div style="counter-reset: n 100010001;"></div>
+<div style="counter-reset: n 100110001;"></div>
+
+<div style="counter-reset: n -1;"></div>
diff --git a/layout/reftests/counters/counter-suffix-ref.html b/layout/reftests/counters/counter-suffix-ref.html
new file mode 100644
index 000000000..bcc760a7d
--- /dev/null
+++ b/layout/reftests/counters/counter-suffix-ref.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<style>
+ p, span { margin: 0; padding: 0; line-height: 150%; }
+ #wrapper { width: 10em; }
+ span {
+ display: inline-block;
+ width: 3em;
+ text-align: end;
+ box-sizing: border-box;
+ font-variant-numeric: tabular-nums;
+ }
+</style>
+<div id="wrapper">
+ <p>
+ <span>1.&nbsp;</span>foo<br>
+ <span>2.&nbsp;</span>bar
+ </p>
+ <p>
+ <span>&#x5d0;.&nbsp;</span>foo<br>
+ <span>&#x5d1;.&nbsp;</span>bar
+ </p>
+ <p>
+ <span>&#x4e00;&#x3001;</span>foo<br>
+ <span>&#x4e8c;&#x3001;</span>bar
+ </p>
+ <p>
+ <span>&#xc77c;,&nbsp;</span>foo<br>
+ <span>&#xc774;,&nbsp;</span>bar
+ </p>
+ <p dir="rtl">
+ <span>1.&nbsp;</span>foo<br>
+ <span>2.&nbsp;</span>bar
+ </p>
+ <p dir="rtl">
+ <span>&#x5d0;.&nbsp;</span>foo<br>
+ <span>&#x5d1;.&nbsp;</span>bar
+ </p>
+</div>
diff --git a/layout/reftests/counters/counter-suffix.html b/layout/reftests/counters/counter-suffix.html
new file mode 100644
index 000000000..6378d7500
--- /dev/null
+++ b/layout/reftests/counters/counter-suffix.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<style>
+ ol, li { margin: 0; padding: 0; line-height: 150%; }
+ #wrapper { width: 10em; }
+ ol { padding: 0 3em; }
+ .dec { list-style-type: decimal; }
+ .heb { list-style-type: hebrew; }
+ .cjk { list-style-type: cjk-decimal; }
+ .kor { list-style-type: korean-hangul-formal; }
+</style>
+<div id="wrapper">
+ <ol class="dec"><li>foo<li>bar</ol>
+ <ol class="heb"><li>foo<li>bar</ol>
+ <ol class="cjk"><li>foo<li>bar</ol>
+ <ol class="kor"><li>foo<li>bar</ol>
+ <ol class="dec" dir="rtl"><li>foo<li>bar</ol>
+ <ol class="heb" dir="rtl"><li>foo<li>bar</ol>
+</div>
diff --git a/layout/reftests/counters/counter-trad-chinese-formal-ref.html b/layout/reftests/counters/counter-trad-chinese-formal-ref.html
new file mode 100644
index 000000000..8437f8314
--- /dev/null
+++ b/layout/reftests/counters/counter-trad-chinese-formal-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<div>&#x96f6;</div>
+<div>&#x58f9;</div>
+<div>&#x8cb3;</div>
+<div>&#x53c3;</div>
+<div>&#x8086;</div>
+<div>&#x4f0d;</div>
+<div>&#x9678;</div>
+<div>&#x67d2;</div>
+<div>&#x634c;</div>
+<div>&#x7396;</div>
+
+<div>&#x58f9;&#x62fe;</div>
+<div>&#x58f9;&#x4f70;</div>
+<div>&#x58f9;&#x4edf;</div>
+<div>&#x58f9;&#x842c;</div>
+<div>&#x58f9;&#x62fe;&#x842c;</div>
+<div>&#x58f9;&#x4f70;&#x842c;</div>
+<div>&#x58f9;&#x4edf;&#x842c;</div>
+<div>&#x58f9;&#x5104;</div>
+<div>&#x58f9;&#x62fe;&#x5104;</div>
+
+<div>&#x58f9;&#x62fe;&#x58f9;</div>
+<div>&#x7396;&#x62fe;&#x7396;</div>
+<div>&#x58f9;&#x4f70;&#x96f6;&#x58f9;</div>
+<div>&#x8cb3;&#x4f70;</div>
+<div>&#x9678;&#x4edf;&#x96f6;&#x58f9;</div>
+<div>&#x58f9;&#x842c;&#x96f6;&#x58f9;</div>
+<div>&#x58f9;&#x842c;&#x96f6;&#x58f9;&#x62fe;&#x58f9;</div>
+<div>&#x58f9;&#x842c;&#x96f6;&#x58f9;&#x4f70;&#x96f6;&#x58f9;</div>
+<div>&#x58f9;&#x842c;&#x58f9;&#x4edf;&#x58f9;&#x4f70;&#x58f9;&#x62fe;&#x58f9;</div>
+<div>&#x58f9;&#x4edf;&#x58f9;&#x4f70;&#x842c;</div>
+<div>&#x58f9;&#x5104;&#x96f6;&#x58f9;&#x842c;&#x96f6;&#x58f9;</div>
+<div>&#x58f9;&#x5104;&#x96f6;&#x58f9;&#x62fe;&#x58f9;&#x842c;&#x96f6;&#x58f9;</div>
+
+<div>&#x8ca0;&#x58f9;</div>
diff --git a/layout/reftests/counters/counter-trad-chinese-formal.html b/layout/reftests/counters/counter-trad-chinese-formal.html
new file mode 100644
index 000000000..6c6ded5dc
--- /dev/null
+++ b/layout/reftests/counters/counter-trad-chinese-formal.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style>
+ div::after {
+ content: counter(n, trad-chinese-formal);
+ }
+</style>
+<div style="counter-reset: n 0;"></div>
+<div style="counter-reset: n 1;"></div>
+<div style="counter-reset: n 2;"></div>
+<div style="counter-reset: n 3;"></div>
+<div style="counter-reset: n 4;"></div>
+<div style="counter-reset: n 5;"></div>
+<div style="counter-reset: n 6;"></div>
+<div style="counter-reset: n 7;"></div>
+<div style="counter-reset: n 8;"></div>
+<div style="counter-reset: n 9;"></div>
+
+<div style="counter-reset: n 10;"></div>
+<div style="counter-reset: n 100;"></div>
+<div style="counter-reset: n 1000;"></div>
+<div style="counter-reset: n 10000;"></div>
+<div style="counter-reset: n 100000;"></div>
+<div style="counter-reset: n 1000000;"></div>
+<div style="counter-reset: n 10000000;"></div>
+<div style="counter-reset: n 100000000;"></div>
+<div style="counter-reset: n 1000000000;"></div>
+
+<div style="counter-reset: n 11;"></div>
+<div style="counter-reset: n 99;"></div>
+<div style="counter-reset: n 101;"></div>
+<div style="counter-reset: n 200;"></div>
+<div style="counter-reset: n 6001;"></div>
+<div style="counter-reset: n 10001;"></div>
+<div style="counter-reset: n 10011;"></div>
+<div style="counter-reset: n 10101;"></div>
+<div style="counter-reset: n 11111;"></div>
+<div style="counter-reset: n 11000000;"></div>
+<div style="counter-reset: n 100010001;"></div>
+<div style="counter-reset: n 100110001;"></div>
+
+<div style="counter-reset: n -1;"></div>
diff --git a/layout/reftests/counters/counter-trad-chinese-informal-ref.html b/layout/reftests/counters/counter-trad-chinese-informal-ref.html
new file mode 100644
index 000000000..2e156901e
--- /dev/null
+++ b/layout/reftests/counters/counter-trad-chinese-informal-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<div>&#x96f6;</div>
+<div>&#x4e00;</div>
+<div>&#x4e8c;</div>
+<div>&#x4e09;</div>
+<div>&#x56db;</div>
+<div>&#x4e94;</div>
+<div>&#x516d;</div>
+<div>&#x4e03;</div>
+<div>&#x516b;</div>
+<div>&#x4e5d;</div>
+
+<div>&#x5341;</div>
+<div>&#x4e00;&#x767e;</div>
+<div>&#x4e00;&#x5343;</div>
+<div>&#x4e00;&#x842c;<div>
+<div>&#x5341;&#x842c;</div>
+<div>&#x4e00;&#x767e;&#x842c;</div>
+<div>&#x4e00;&#x5343;&#x842c;</div>
+<div>&#x4e00;&#x5104;</div>
+<div>&#x5341;&#x5104;</div>
+
+<div>&#x5341;&#x4e00;</div>
+<div>&#x4e5d;&#x5341;&#x4e5d;</div>
+<div>&#x4e00;&#x767e;&#x96f6;&#x4e00;</div>
+<div>&#x4e8c;&#x767e;</div>
+<div>&#x516d;&#x5343;&#x96f6;&#x4e00;</div>
+<div>&#x4e00;&#x842c;&#x96f6;&#x4e00;</div>
+<div>&#x4e00;&#x842c;&#x96f6;&#x4e00;&#x5341;&#x4e00;</div>
+<div>&#x4e00;&#x842c;&#x96f6;&#x4e00;&#x767e;&#x96f6;&#x4e00;</div>
+<div>&#x4e00;&#x842c;&#x4e00;&#x5343;&#x4e00;&#x767e;&#x4e00;&#x5341;&#x4e00;</div>
+<div>&#x4e00;&#x5343;&#x4e00;&#x767e;&#x842c;</div>
+<div>&#x4e00;&#x5104;&#x96f6;&#x4e00;&#x842c;&#x96f6;&#x4e00;</div>
+<div>&#x4e00;&#x5104;&#x96f6;&#x5341;&#x4e00;&#x842c;&#x96f6;&#x4e00;</div>
+
+<div>&#x8ca0;&#x4e00;</div>
diff --git a/layout/reftests/counters/counter-trad-chinese-informal.html b/layout/reftests/counters/counter-trad-chinese-informal.html
new file mode 100644
index 000000000..809cd7b94
--- /dev/null
+++ b/layout/reftests/counters/counter-trad-chinese-informal.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style>
+ div::after {
+ content: counter(n, trad-chinese-informal);
+ }
+</style>
+<div style="counter-reset: n 0;"></div>
+<div style="counter-reset: n 1;"></div>
+<div style="counter-reset: n 2;"></div>
+<div style="counter-reset: n 3;"></div>
+<div style="counter-reset: n 4;"></div>
+<div style="counter-reset: n 5;"></div>
+<div style="counter-reset: n 6;"></div>
+<div style="counter-reset: n 7;"></div>
+<div style="counter-reset: n 8;"></div>
+<div style="counter-reset: n 9;"></div>
+
+<div style="counter-reset: n 10;"></div>
+<div style="counter-reset: n 100;"></div>
+<div style="counter-reset: n 1000;"></div>
+<div style="counter-reset: n 10000;"></div>
+<div style="counter-reset: n 100000;"></div>
+<div style="counter-reset: n 1000000;"></div>
+<div style="counter-reset: n 10000000;"></div>
+<div style="counter-reset: n 100000000;"></div>
+<div style="counter-reset: n 1000000000;"></div>
+
+<div style="counter-reset: n 11;"></div>
+<div style="counter-reset: n 99;"></div>
+<div style="counter-reset: n 101;"></div>
+<div style="counter-reset: n 200;"></div>
+<div style="counter-reset: n 6001;"></div>
+<div style="counter-reset: n 10001;"></div>
+<div style="counter-reset: n 10011;"></div>
+<div style="counter-reset: n 10101;"></div>
+<div style="counter-reset: n 11111;"></div>
+<div style="counter-reset: n 11000000;"></div>
+<div style="counter-reset: n 100010001;"></div>
+<div style="counter-reset: n 100110001;"></div>
+
+<div style="counter-reset: n -1;"></div>
diff --git a/layout/reftests/counters/counter-ua-limits-00-ref.html b/layout/reftests/counters/counter-ua-limits-00-ref.html
new file mode 100644
index 000000000..d0f76d8be
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-00-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>css-counter-styles-3 Test Suite: content: counter(c)</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ </head>
+ <body>
+
+ <div id="test">
+ <span>2147483646</span>
+ <span>2147483647</span>
+ <span>2147483647</span>
+ <span>2147483647</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-00.html b/layout/reftests/counters/counter-ua-limits-00.html
new file mode 100644
index 000000000..9522f60fd
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-00.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>css-counter-styles-3 Test Suite: content: counter(c)</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ <style type="text/css">
+
+ #test { counter-reset: c 2147483645; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-01-ref.html b/layout/reftests/counters/counter-ua-limits-01-ref.html
new file mode 100644
index 000000000..c1742f61b
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-01-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>css-counter-styles-3 Test Suite: content: counter(c)</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ </head>
+ <body>
+
+ <div id="test">
+ <span>2147483640</span>
+ <span>2147483645</span>
+ <span>2147483645</span>
+ <span>2147483645</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-01.html b/layout/reftests/counters/counter-ua-limits-01.html
new file mode 100644
index 000000000..cf6bcbe6a
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-01.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>css-counter-styles-3 Test Suite: content: counter(c)</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ <style type="text/css">
+
+ #test { counter-reset: c 2147483635; }
+ #test span { counter-increment: c 5; }
+ #test span:before { content: counter(c); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-02-ref.html b/layout/reftests/counters/counter-ua-limits-02-ref.html
new file mode 100644
index 000000000..2715253f3
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-02-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>css-counter-styles-3 Test Suite: content: counter(c)</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ </head>
+ <body>
+
+ <div id="test">
+ <span>-2147483646</span>
+ <span>-2147483647</span>
+ <span>-2147483647</span>
+ <span>-2147483647</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-02.html b/layout/reftests/counters/counter-ua-limits-02.html
new file mode 100644
index 000000000..e6cc9850b
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-02.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>css-counter-styles-3 Test Suite: content: counter(c)</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ <style type="text/css">
+
+ #test { counter-reset: c -2147483645; }
+ #test span { counter-increment: c -1; }
+ #test span:before { content: counter(c); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-03-ref.html b/layout/reftests/counters/counter-ua-limits-03-ref.html
new file mode 100644
index 000000000..41c6e3432
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-03-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>css-counter-styles-3 Test Suite: content: counter(c)</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ </head>
+ <body>
+
+ <div id="test">
+ <span>-2147483640</span>
+ <span>-2147483645</span>
+ <span>-2147483645</span>
+ <span>-2147483645</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-03.html b/layout/reftests/counters/counter-ua-limits-03.html
new file mode 100644
index 000000000..338234fba
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-03.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>css-counter-styles-3 Test Suite: content: counter(c)</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ <style type="text/css">
+
+ #test { counter-reset: c -2147483635; }
+ #test span { counter-increment: c -5; }
+ #test span:before { content: counter(c); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-list-00-ref.html b/layout/reftests/counters/counter-ua-limits-list-00-ref.html
new file mode 100644
index 000000000..9cdd2bf0a
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-list-00-ref.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>test of counter UA overflow rules for HTML lists</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec. It also can't be contributed because it's testing HTML
+ lists.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ <style type="text/css">
+
+ ol { margin-left: 10em; padding-left: 0; }
+ li { margin-left: 0; padding-left: 0 }
+
+ </style>
+ </head>
+ <body>
+
+ <ol>
+ <li value="2147483646">Alpha
+ <li value="2147483647">Bravo
+ <li value="2147483647">Charlie
+ <li value="2147483647">Delta
+ </ol>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-list-00.html b/layout/reftests/counters/counter-ua-limits-list-00.html
new file mode 100644
index 000000000..68cf7cebd
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-list-00.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>test of counter UA overflow rules for HTML lists</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec. It also can't be contributed because it's testing HTML
+ lists.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ <style type="text/css">
+
+ ol { margin-left: 10em; padding-left: 0; }
+ li { margin-left: 0; padding-left: 0 }
+
+ </style>
+ </head>
+ <body>
+
+ <ol start="2147483646">
+ <li>Alpha
+ <li>Bravo
+ <li>Charlie
+ <li>Delta
+ </ol>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-list-01-ref.html b/layout/reftests/counters/counter-ua-limits-list-01-ref.html
new file mode 100644
index 000000000..2fb1370c6
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-list-01-ref.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>test of counter UA overflow rules for HTML lists</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec. It also can't be contributed because it's testing HTML
+ lists.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ <style type="text/css">
+
+ ol { margin-left: 10em; padding-left: 0; }
+ li { margin-left: 0; padding-left: 0 }
+ li.hidden { visibility: hidden; height: 0 }
+ ol { margin-bottom: 0 }
+ ol + ol { margin-top: 0 }
+
+ </style>
+ </head>
+ <body>
+
+ <ol reversed start="-2147483645">
+ <li class="hidden">hidden
+ <li>Alpha
+ </ol>
+ <ol reversed start="-2147483646">
+ <li class="hidden">hidden
+ <li>Bravo
+ </ol>
+ <ol reversed start="-2147483647">
+ <li class="hidden">hidden
+ <li>Charlie
+ </ol>
+ <ol reversed start="-2147483648">
+ <li class="hidden">hidden
+ <li>Delta
+ </ol>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counter-ua-limits-list-01.html b/layout/reftests/counters/counter-ua-limits-list-01.html
new file mode 100644
index 000000000..0ab5448a8
--- /dev/null
+++ b/layout/reftests/counters/counter-ua-limits-list-01.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>test of counter UA overflow rules for HTML lists</title>
+ <!--
+ NOTE: This test cannot be contributed to the test suite because
+ it presumes a 4-byte unsigned integer, which is not required by
+ the spec. It also can't be contributed because it's testing HTML
+ lists.
+
+ However, it tests the rules for what happens at the UA-specific
+ limit, which are required by the spec.
+ -->
+ <link rel="help" href="http://dev.w3.org/csswg/css-counter-styles-3/#counter-style-range"/>
+ <link rel="help" href="http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590"/>
+ <style type="text/css">
+
+ ol { margin-left: 10em; padding-left: 0; }
+ li { margin-left: 0; padding-left: 0 }
+
+ </style>
+ </head>
+ <body>
+
+ <ol reversed start="-2147483646">
+ <li>Alpha
+ <li>Bravo
+ <li>Charlie
+ <li>Delta
+ </ol>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counters-hebrew-reference.html b/layout/reftests/counters/counters-hebrew-reference.html
new file mode 100644
index 000000000..9ae6b5e01
--- /dev/null
+++ b/layout/reftests/counters/counters-hebrew-reference.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", hebrew)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <p></p>
+ <div>
+ <span>&#x5d0;.&#x5d0;</span>
+ <span>&#x5d0;.&#x5d1;</span>
+ <span>&#x5d0;.&#x5d2;</span>
+ <span>&#x5d0;.&#x5d3;</span>
+ <span>&#x5d0;.&#x5d4;</span>
+ <span>&#x5d0;.&#x5d5;</span>
+ <span>&#x5d0;.&#x5d6;</span>
+ <span>&#x5d0;.&#x5d7;</span>
+ <span>&#x5d0;.&#x5d8;</span>
+ <span>&#x5d0;.&#x5d9;</span>
+ <span>&#x5d0;.&#x5d9;&#x5d0;</span>
+ <span>&#x5d0;.&#x5d9;&#x5d1;</span>
+ <span>&#x5d0;.&#x5d9;&#x5d2;</span>
+ <span>&#x5d0;.&#x5d9;&#x5d3;</span>
+ <span>&#x5d0;.&#x5d8;&#x5d5;</span>
+ <span>&#x5d0;.&#x5d8;&#x5d6;</span>
+ <span>&#x5d0;.&#x5d9;&#x5d6;</span>
+ <span>&#x5d0;.&#x5db;</span>
+ <span>&#x5d0;.&#x5dc;</span>
+ <span>&#x5d0;.&#x5de;</span>
+ <span>&#x5d0;.&#x5e0;</span>
+ <span>&#x5d0;.&#x5e1;</span>
+ <span>&#x5d0;.&#x5e2;</span>
+ <span>&#x5d0;.&#x5e4;</span>
+ <span>&#x5d0;.&#x5e6;</span>
+ <span>&#x5d0;.&#x5e7;</span>
+ <span>&#x5d0;.&#x5e8;</span>
+ <span>&#x5d0;.&#x5e9;</span>
+ <span>&#x5d0;.&#x5ea;</span>
+ <span>&#x5d0;.&#x5ea;&#x5e7;</span>
+ <span>&#x5d0;.&#x5ea;&#x5e8;</span>
+ <span>&#x5d0;.&#x5ea;&#x5e9;</span>
+ <span>&#x5d0;.&#x5ea;&#x5ea;</span>
+ <span>&#x5d0;.&#x5ea;&#x5ea;&#x5e7;</span>
+ <span>&#x5d0;.&#x5d0;&#x05f3;</span>
+ <span>&#x5d0;.&#x5d1;&#x05f3;</span>
+ <span>&#x5d0;.&#x5d2;&#x05f3;</span>
+ <span>&#x5d0;.&#x5d3;&#x05f3;</span>
+ <span>&#x5d0;.&#x5d4;&#x05f3;</span>
+ <span>&#x5d0;.&#x5d5;&#x05f3;</span>
+ <span>&#x5d0;.&#x5d6;&#x05f3;</span>
+ <span>&#x5d0;.&#x5d7;&#x05f3;</span>
+ <span>&#x5d0;.&#x5d8;&#x05f3;</span>
+ <span>&#x5d0;.&#x5d8;&#x05f3;&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;</span>
+ <span>&#x5d0;.&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;&#x05f3;&#x5ea;&#x5ea;&#x5e7;&#x5e6;&#x5d8;</span>
+ <span>&#x5d0;.1000000</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/counters-hebrew-test.html b/layout/reftests/counters/counters-hebrew-test.html
new file mode 100644
index 000000000..ca18ae5ff
--- /dev/null
+++ b/layout/reftests/counters/counters-hebrew-test.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", hebrew)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ body, #test span:first-child { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", hebrew); }
+ #test span { direction: rtl; }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 19"></span>
+ <span style="counter-reset: c 29"></span>
+ <span style="counter-reset: c 39"></span>
+ <span style="counter-reset: c 49"></span>
+ <span style="counter-reset: c 59"></span>
+ <span style="counter-reset: c 69"></span>
+ <span style="counter-reset: c 79"></span>
+ <span style="counter-reset: c 89"></span>
+ <span style="counter-reset: c 99"></span>
+ <span style="counter-reset: c 199"></span>
+ <span style="counter-reset: c 299"></span>
+ <span style="counter-reset: c 399"></span>
+ <span style="counter-reset: c 499"></span>
+ <span style="counter-reset: c 599"></span>
+ <span style="counter-reset: c 699"></span>
+ <span style="counter-reset: c 799"></span>
+ <span style="counter-reset: c 899"></span>
+ <span style="counter-reset: c 999"></span>
+ <span style="counter-reset: c 1999"></span>
+ <span style="counter-reset: c 2999"></span>
+ <span style="counter-reset: c 3999"></span>
+ <span style="counter-reset: c 4999"></span>
+ <span style="counter-reset: c 5999"></span>
+ <span style="counter-reset: c 6999"></span>
+ <span style="counter-reset: c 7999"></span>
+ <span style="counter-reset: c 8999"></span>
+ <span style="counter-reset: c 9998"></span>
+ <span style="counter-reset: c 999998"></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/multiple-thai-counters-ref.html b/layout/reftests/counters/multiple-thai-counters-ref.html
new file mode 100644
index 000000000..cb2e921c1
--- /dev/null
+++ b/layout/reftests/counters/multiple-thai-counters-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+ span span span::before {
+ counter-increment: item;
+ content: counter(item, -moz-thai) "." counter(item, -moz-thai) "." counter(item, -moz-thai);
+ content: counter(item, thai) "." counter(item, thai) "." counter(item, thai);
+ }
+</style>
+<span><span><span></span></span></span>
diff --git a/layout/reftests/counters/multiple-thai-counters.html b/layout/reftests/counters/multiple-thai-counters.html
new file mode 100644
index 000000000..0e37af4d0
--- /dev/null
+++ b/layout/reftests/counters/multiple-thai-counters.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<style>
+ span {
+ counter-reset: item;
+ counter-increment: item;
+ }
+ span span span::before {
+ content: counters(item, ".", -moz-thai);
+ content: counters(item, ".", thai);
+ }
+</style>
+<span><span><span></span></span></span>
diff --git a/layout/reftests/counters/reftest-stylo.list b/layout/reftests/counters/reftest-stylo.list
new file mode 100644
index 000000000..3f75ad9e8
--- /dev/null
+++ b/layout/reftests/counters/reftest-stylo.list
@@ -0,0 +1,85 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== counter-name-case-sensitive.html counter-name-case-sensitive.html
+== t1202-counter-00-b-test.html t1202-counter-00-b-test.html
+== t1202-counter-01-b-test.html t1202-counter-01-b-test.html
+== t1202-counter-02-b-test.html t1202-counter-02-b-test.html
+== t1202-counter-03-b-test.html t1202-counter-03-b-test.html
+== t1202-counter-04-b-test.html t1202-counter-04-b-test.html
+== t1202-counter-05-b-test.html t1202-counter-05-b-test.html
+== t1202-counter-06-b-test.html t1202-counter-06-b-test.html
+== t1202-counter-07-b-test.html t1202-counter-07-b-test.html
+skip == t1202-counter-08-b-test.html t1202-counter-08-b-test.html
+== t1202-counter-09-b-test.html t1202-counter-09-b-test.html
+== t1202-counter-10-b-test.html t1202-counter-10-b-test.html
+== t1202-counter-11-b-test.html t1202-counter-11-b-test.html
+== t1202-counter-12-b-test.html t1202-counter-12-b-test.html
+== t1202-counter-13-b-test.html t1202-counter-13-b-test.html
+== t1202-counter-14-b-test.html t1202-counter-14-b-test.html
+== t1202-counter-15-b-test.html t1202-counter-15-b-test.html
+== t1202-counter-16-f-test.html t1202-counter-16-f-test.html
+== t1202-counters-00-b-test.html t1202-counters-00-b-test.html
+== t1202-counters-01-b-test.html t1202-counters-01-b-test.html
+== t1202-counters-02-b-test.html t1202-counters-02-b-test.html
+== t1202-counters-03-b-test.html t1202-counters-03-b-test.html
+== t1202-counters-04-b-test.html t1202-counters-04-b-test.html
+== t1202-counters-05-b-test.html t1202-counters-05-b-test.html
+skip == t1202-counters-06-b-test.html t1202-counters-06-b-test.html
+== t1202-counters-07-b-test.html t1202-counters-07-b-test.html
+== t1202-counters-08-b-test.html t1202-counters-08-b-test.html
+== t1202-counters-09-b-test.html t1202-counters-09-b-test.html
+== t1202-counters-10-b-test.html t1202-counters-10-b-test.html
+== t1202-counters-11-b-test.html t1202-counters-11-b-test.html
+== t1202-counters-12-b-test.html t1202-counters-12-b-test.html
+== t1202-counters-13-b-test.html t1202-counters-13-b-test.html
+== t1202-counters-14-b-test.html t1202-counters-14-b-test.html
+== t1202-counters-15-b-test.html t1202-counters-15-b-test.html
+== t1202-counters-16-c-test.html t1202-counters-16-c-test.html
+== t1202-counters-17-d-test.html t1202-counters-17-d-test.html
+== t1202-counters-18-f-test.html t1202-counters-18-f-test.html
+== t1204-implied-00-b-test.html t1204-implied-00-b-test.html
+== t1204-implied-01-c-test.html t1204-implied-01-c-test.html
+== t1204-implied-02-d-test.html t1204-implied-02-d-test.html
+== t1204-increment-00-c-o-test.html t1204-increment-00-c-o-test.html
+== t1204-increment-01-c-o-test.html t1204-increment-01-c-o-test.html
+== t1204-increment-02-c-o-test.html t1204-increment-02-c-o-test.html
+== t1204-multiple-00-c-test.html t1204-multiple-00-c-test.html
+== t1204-multiple-01-c-test.html t1204-multiple-01-c-test.html
+== t1204-order-00-c-test.html t1204-order-00-c-test.html
+== t1204-order-01-d-test.html t1204-order-01-d-test.html
+== t1204-reset-00-c-o-test.html t1204-reset-00-c-o-test.html
+== t1204-reset-01-c-o-test.html t1204-reset-01-c-o-test.html
+== t1204-reset-02-c-o-test.html t1204-reset-02-c-o-test.html
+== t1204-root-e-test.html t1204-root-e-test.html
+== t120401-scope-00-b-test.html t120401-scope-00-b-test.html
+== t120401-scope-01-c-test.html t120401-scope-01-c-test.html
+== t120401-scope-02-c-test.html t120401-scope-02-c-test.html
+== t120401-scope-03-c-test.html t120401-scope-03-c-test.html
+== t120401-scope-04-d-test.html t120401-scope-04-d-test.html
+== t120403-content-none-00-c-test.html t120403-content-none-00-c-test.html
+== t120403-display-none-00-c-test.html t120403-display-none-00-c-test.html
+== t120403-visibility-00-c-test.html t120403-visibility-00-c-test.html
+== text-boundaries-subpixel.html text-boundaries-subpixel.html
+skip == counter-hebrew-test.html counter-hebrew-test.html
+== counters-hebrew-test.html counters-hebrew-test.html
+fails-if(xulRuntime.XPCOMABI.match(/arm/)) == counter-reset-integer-range.html counter-reset-integer-range.html
+# bug 989718
+== counter-ua-limits-00.html counter-ua-limits-00.html
+== counter-ua-limits-01.html counter-ua-limits-01.html
+fails-if(xulRuntime.XPCOMABI.match(/arm/)) == counter-ua-limits-02.html counter-ua-limits-02.html
+# bug 989718
+== counter-ua-limits-03.html counter-ua-limits-03.html
+== counter-ua-limits-list-00.html counter-ua-limits-list-00.html
+== counter-ua-limits-list-01.html counter-ua-limits-list-01.html
+== multiple-thai-counters.html multiple-thai-counters.html
+== counter-suffix.html counter-suffix.html
+== counter-cjk-decimal.html counter-cjk-decimal.html
+== counter-japanese-informal.html counter-japanese-informal.html
+== counter-japanese-formal.html counter-japanese-formal.html
+== counter-korean-hangul-formal.html counter-korean-hangul-formal.html
+== counter-korean-hanja-informal.html counter-korean-hanja-informal.html
+== counter-korean-hanja-formal.html counter-korean-hanja-formal.html
+== counter-simp-chinese-informal.html counter-simp-chinese-informal.html
+== counter-simp-chinese-formal.html counter-simp-chinese-formal.html
+== counter-trad-chinese-informal.html counter-trad-chinese-informal.html
+== counter-trad-chinese-formal.html counter-trad-chinese-formal.html
+== counter-ethiopic-numeric.html counter-ethiopic-numeric.html
diff --git a/layout/reftests/counters/reftest.list b/layout/reftests/counters/reftest.list
new file mode 100644
index 000000000..b7eb0bec9
--- /dev/null
+++ b/layout/reftests/counters/reftest.list
@@ -0,0 +1,82 @@
+== counter-name-case-sensitive.html counter-name-case-sensitive-ref.html
+== t1202-counter-00-b-test.html t1202-counter-00-b-reference.html
+== t1202-counter-01-b-test.html t1202-counter-01-b-reference.html
+== t1202-counter-02-b-test.html t1202-counter-02-b-reference.html
+== t1202-counter-03-b-test.html t1202-counter-03-b-reference.html
+== t1202-counter-04-b-test.html t1202-counter-04-b-reference.html
+== t1202-counter-05-b-test.html t1202-counter-05-b-reference.html
+== t1202-counter-06-b-test.html t1202-counter-06-b-reference.html
+== t1202-counter-07-b-test.html t1202-counter-07-b-reference.html
+== t1202-counter-08-b-test.html t1202-counter-08-b-reference.html
+== t1202-counter-09-b-test.html t1202-counter-09-b-reference.html
+== t1202-counter-10-b-test.html t1202-counter-10-b-reference.html
+== t1202-counter-11-b-test.html t1202-counter-11-b-reference.html
+== t1202-counter-12-b-test.html t1202-counter-12-b-reference.html
+== t1202-counter-13-b-test.html t1202-counter-13-b-reference.html
+== t1202-counter-14-b-test.html t1202-counter-14-b-reference.html
+== t1202-counter-15-b-test.html t1202-counter-15-b-reference.html
+== t1202-counter-16-f-test.html t1202-counter-16-f-reference.html
+== t1202-counters-00-b-test.html t1202-counters-00-b-reference.html
+== t1202-counters-01-b-test.html t1202-counters-01-b-reference.html
+== t1202-counters-02-b-test.html t1202-counters-02-b-reference.html
+== t1202-counters-03-b-test.html t1202-counters-03-b-reference.html
+== t1202-counters-04-b-test.html t1202-counters-04-b-reference.html
+== t1202-counters-05-b-test.html t1202-counters-05-b-reference.html
+== t1202-counters-06-b-test.html t1202-counters-06-b-reference.html
+== t1202-counters-07-b-test.html t1202-counters-07-b-reference.html
+== t1202-counters-08-b-test.html t1202-counters-08-b-reference.html
+== t1202-counters-09-b-test.html t1202-counters-09-b-reference.html
+== t1202-counters-10-b-test.html t1202-counters-10-b-reference.html
+== t1202-counters-11-b-test.html t1202-counters-11-b-reference.html
+== t1202-counters-12-b-test.html t1202-counters-12-b-reference.html
+== t1202-counters-13-b-test.html t1202-counters-13-b-reference.html
+== t1202-counters-14-b-test.html t1202-counters-14-b-reference.html
+== t1202-counters-15-b-test.html t1202-counters-15-b-reference.html
+== t1202-counters-16-c-test.html t1202-counters-16-c-reference.html
+== t1202-counters-17-d-test.html t1202-counters-17-d-reference.html
+== t1202-counters-18-f-test.html t1202-counters-18-f-reference.html
+== t1204-implied-00-b-test.html t1204-implied-00-b-reference.html
+== t1204-implied-01-c-test.html t1204-implied-01-c-reference.html
+== t1204-implied-02-d-test.html t1204-implied-02-d-reference.html
+== t1204-increment-00-c-o-test.html t1204-increment-00-c-o-reference.html
+== t1204-increment-01-c-o-test.html t1204-increment-01-c-o-reference.html
+== t1204-increment-02-c-o-test.html t1204-increment-02-c-o-reference.html
+== t1204-multiple-00-c-test.html t1204-multiple-00-c-reference.html
+== t1204-multiple-01-c-test.html t1204-multiple-01-c-reference.html
+== t1204-order-00-c-test.html t1204-order-00-c-reference.html
+== t1204-order-01-d-test.html t1204-order-01-d-reference.html
+== t1204-reset-00-c-o-test.html t1204-reset-00-c-o-reference.html
+== t1204-reset-01-c-o-test.html t1204-reset-01-c-o-reference.html
+== t1204-reset-02-c-o-test.html t1204-reset-02-c-o-reference.html
+== t1204-root-e-test.html t1204-root-e-reference.html
+== t120401-scope-00-b-test.html t120401-scope-00-b-reference.html
+== t120401-scope-01-c-test.html t120401-scope-01-c-reference.html
+== t120401-scope-02-c-test.html t120401-scope-02-c-reference.html
+== t120401-scope-03-c-test.html t120401-scope-03-c-reference.html
+== t120401-scope-04-d-test.html t120401-scope-04-d-reference.html
+== t120403-content-none-00-c-test.html t120403-content-none-00-c-reference.html
+== t120403-display-none-00-c-test.html t120403-display-none-00-c-reference.html
+== t120403-visibility-00-c-test.html t120403-visibility-00-c-reference.html
+== text-boundaries-subpixel.html text-boundaries-subpixel-ref.html
+== counter-hebrew-test.html counter-hebrew-reference.html
+== counters-hebrew-test.html counters-hebrew-reference.html
+fails-if(xulRuntime.XPCOMABI.match(/arm/)) == counter-reset-integer-range.html counter-reset-integer-range-ref.html # bug 989718
+== counter-ua-limits-00.html counter-ua-limits-00-ref.html
+== counter-ua-limits-01.html counter-ua-limits-01-ref.html
+fails-if(xulRuntime.XPCOMABI.match(/arm/)) == counter-ua-limits-02.html counter-ua-limits-02-ref.html # bug 989718
+== counter-ua-limits-03.html counter-ua-limits-03-ref.html
+== counter-ua-limits-list-00.html counter-ua-limits-list-00-ref.html
+== counter-ua-limits-list-01.html counter-ua-limits-list-01-ref.html
+== multiple-thai-counters.html multiple-thai-counters-ref.html
+== counter-suffix.html counter-suffix-ref.html
+== counter-cjk-decimal.html counter-cjk-decimal-ref.html
+== counter-japanese-informal.html counter-japanese-informal-ref.html
+== counter-japanese-formal.html counter-japanese-formal-ref.html
+== counter-korean-hangul-formal.html counter-korean-hangul-formal-ref.html
+== counter-korean-hanja-informal.html counter-korean-hanja-informal-ref.html
+== counter-korean-hanja-formal.html counter-korean-hanja-formal-ref.html
+== counter-simp-chinese-informal.html counter-simp-chinese-informal-ref.html
+== counter-simp-chinese-formal.html counter-simp-chinese-formal-ref.html
+== counter-trad-chinese-informal.html counter-trad-chinese-informal-ref.html
+== counter-trad-chinese-formal.html counter-trad-chinese-formal-ref.html
+== counter-ethiopic-numeric.html counter-ethiopic-numeric-ref.html
diff --git a/layout/reftests/counters/t1202-counter-00-b-reference.html b/layout/reftests/counters/t1202-counter-00-b-reference.html
new file mode 100644
index 000000000..f51610e8b
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-00-b-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+<div>
+ <span>1</span>
+ <span>2</span>
+ <span>3</span>
+ <span>4</span>
+ <span>5</span>
+ <span>6</span>
+ <span>7</span>
+ <span>8</span>
+ <span>9</span>
+ <span>10</span>
+ <span>11</span>
+ <span>12</span>
+</div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-00-b-test.html b/layout/reftests/counters/t1202-counter-00-b-test.html
new file mode 100644
index 000000000..c3ac0ad57
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-00-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-01-b-reference.html b/layout/reftests/counters/t1202-counter-01-b-reference.html
new file mode 100644
index 000000000..dc14dd61e
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-01-b-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, none)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>z</span>
+ <span>z</span>
+ <span>z</span>
+ <span>z</span>
+ <span>z</span>
+ <span>z</span>
+ <span>z</span>
+ <span>z</span>
+ <span>z</span>
+ <span>z</span>
+ <span>z</span>
+ <span>z</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-01-b-test.html b/layout/reftests/counters/t1202-counter-01-b-test.html
new file mode 100644
index 000000000..9ca7eff58
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-01-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, none)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, none) "z"; }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-02-b-reference.html b/layout/reftests/counters/t1202-counter-02-b-reference.html
new file mode 100644
index 000000000..5b7fcc22a
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-02-b-reference.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, disc)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <div>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ <span>&#x2022;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-02-b-test.html b/layout/reftests/counters/t1202-counter-02-b-test.html
new file mode 100644
index 000000000..8c2819fbb
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-02-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, disc)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, disc); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-03-b-reference.html b/layout/reftests/counters/t1202-counter-03-b-reference.html
new file mode 100644
index 000000000..f926beacd
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-03-b-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, circle)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ <span>&#x25E6;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-03-b-test.html b/layout/reftests/counters/t1202-counter-03-b-test.html
new file mode 100644
index 000000000..8e57a13d5
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-03-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, circle)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, circle); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-04-b-reference.html b/layout/reftests/counters/t1202-counter-04-b-reference.html
new file mode 100644
index 000000000..50634dc21
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-04-b-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, square)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ <span>&#x25FE;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-04-b-test.html b/layout/reftests/counters/t1202-counter-04-b-test.html
new file mode 100644
index 000000000..3a56ceda6
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-04-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, square)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, square); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-05-b-reference.html b/layout/reftests/counters/t1202-counter-05-b-reference.html
new file mode 100644
index 000000000..9bb369daa
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-05-b-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, decimal)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>1</span>
+ <span>2</span>
+ <span>3</span>
+ <span>4</span>
+ <span>5</span>
+ <span>6</span>
+ <span>7</span>
+ <span>8</span>
+ <span>9</span>
+ <span>10</span>
+ <span>11</span>
+ <span>12</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-05-b-test.html b/layout/reftests/counters/t1202-counter-05-b-test.html
new file mode 100644
index 000000000..06809d4fd
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-05-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, decimal)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, decimal); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-06-b-reference.html b/layout/reftests/counters/t1202-counter-06-b-reference.html
new file mode 100644
index 000000000..0fdc2905e
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-06-b-reference.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, decimal-leading-zero)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>01</span>
+ <span>02</span>
+ <span>03</span>
+ <span>04</span>
+ <span>05</span>
+ <span>06</span>
+ <span>07</span>
+ <span>08</span>
+ <span>09</span>
+ <span>10</span>
+ <span>11</span>
+ <span>12</span>
+ <span>99</span>
+ <span>100</span>
+ <span>101</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-06-b-test.html b/layout/reftests/counters/t1202-counter-06-b-test.html
new file mode 100644
index 000000000..8a4109c35
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-06-b-test.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, decimal-leading-zero)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, decimal-leading-zero); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 98"></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-07-b-reference.html b/layout/reftests/counters/t1202-counter-07-b-reference.html
new file mode 100644
index 000000000..f6429c211
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-07-b-reference.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, lower-roman)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ </head>
+ <body>
+
+ <div>
+ <span>i</span>
+ <span>ii</span>
+ <span>iii</span>
+ <span>iv</span>
+ <span>v</span>
+ <span>vi</span>
+ <span>vii</span>
+ <span>viii</span>
+ <span>ix</span>
+ <span>x</span>
+ <span>xi</span>
+ <span>xii</span>
+ <span>xlix</span>
+ <span>l</span>
+ <span>ccclxxxix</span>
+ <span>cccxc</span>
+ <span>mmmcdlxxxix</span>
+ <span>mmmcdxc</span>
+ <span>mmmcdxci</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-07-b-test.html b/layout/reftests/counters/t1202-counter-07-b-test.html
new file mode 100644
index 000000000..85c0f9df7
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-07-b-test.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, lower-roman)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, lower-roman); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 48"></span>
+ <span></span>
+ <span style="counter-reset: c 388"></span>
+ <span></span>
+ <span style="counter-reset: c 3488"></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-08-b-reference.html b/layout/reftests/counters/t1202-counter-08-b-reference.html
new file mode 100644
index 000000000..16be49dcb
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-08-b-reference.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, upper-roman)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ </head>
+ <body>
+
+ <div>
+ <span>I</span>
+ <span>II</span>
+ <span>III</span>
+ <span>IV</span>
+ <span>V</span>
+ <span>VI</span>
+ <span>VII</span>
+ <span>VIII</span>
+ <span>IX</span>
+ <span>X</span>
+ <span>XI</span>
+ <span>XII</span>
+ <span>XLIX</span>
+ <span>L</span>
+ <span>CCCLXXXIX</span>
+ <span>CCCXC</span>
+ <span>MMMCDLXXXIX</span>
+ <span>MMMCDXC</span>
+ <span>MMMCDXCI</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-08-b-test.html b/layout/reftests/counters/t1202-counter-08-b-test.html
new file mode 100644
index 000000000..188ac0e45
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-08-b-test.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, upper-roman)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, upper-roman); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 48"></span>
+ <span></span>
+ <span style="counter-reset: c 388"></span>
+ <span></span>
+ <span style="counter-reset: c 3488"></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/counters/t1202-counter-09-b-reference.html b/layout/reftests/counters/t1202-counter-09-b-reference.html
new file mode 100644
index 000000000..d54030065
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-09-b-reference.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, georgian)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>&#x10D0;</span>
+ <span>&#x10D1;</span>
+ <span>&#x10D2;</span>
+ <span>&#x10D3;</span>
+ <span>&#x10D4;</span>
+ <span>&#x10D5;</span>
+ <span>&#x10D6;</span>
+ <span>&#x10F1;</span>
+ <span>&#x10D7;</span>
+ <span>&#x10D8;</span>
+ <span>&#x10D8;&#x10D0;</span>
+ <span>&#x10D8;&#x10D1;</span>
+ <span>&#x10D9;</span>
+ <span>&#x10DA;</span>
+ <span>&#x10DB;</span>
+ <span>&#x10DC;</span>
+ <span>&#x10F2;</span>
+ <span>&#x10DD;</span>
+ <span>&#x10DE;</span>
+ <span>&#x10DF;</span>
+ <span>&#x10E0;</span>
+ <span>&#x10E1;</span>
+ <span>&#x10E2;</span>
+ <span>&#x10F3;</span>
+ <span>&#x10E4;</span>
+ <span>&#x10E5;</span>
+ <span>&#x10E6;</span>
+ <span>&#x10E7;</span>
+ <span>&#x10E8;</span>
+ <span>&#x10E9;</span>
+ <span>&#x10EA;</span>
+ <span>&#x10EB;</span>
+ <span>&#x10EC;</span>
+ <span>&#x10ED;</span>
+ <span>&#x10EE;</span>
+ <span>&#x10F4;</span>
+ <span>&#x10EF;</span>
+ <span>&#x10F0;</span>
+ <span>&#x10F5;</span>
+ <span>&#x10F5;&#x10F0;&#x10E8;&#x10DF;&#x10D7;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-09-b-test.html b/layout/reftests/counters/t1202-counter-09-b-test.html
new file mode 100644
index 000000000..dff904b2e
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-09-b-test.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, georgian)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, georgian); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 19"></span>
+ <span style="counter-reset: c 29"></span>
+ <span style="counter-reset: c 39"></span>
+ <span style="counter-reset: c 49"></span>
+ <span style="counter-reset: c 59"></span>
+ <span style="counter-reset: c 69"></span>
+ <span style="counter-reset: c 79"></span>
+ <span style="counter-reset: c 89"></span>
+ <span style="counter-reset: c 99"></span>
+ <span style="counter-reset: c 199"></span>
+ <span style="counter-reset: c 299"></span>
+ <span style="counter-reset: c 399"></span>
+ <span style="counter-reset: c 499"></span>
+ <span style="counter-reset: c 599"></span>
+ <span style="counter-reset: c 699"></span>
+ <span style="counter-reset: c 799"></span>
+ <span style="counter-reset: c 899"></span>
+ <span style="counter-reset: c 999"></span>
+ <span style="counter-reset: c 1999"></span>
+ <span style="counter-reset: c 2999"></span>
+ <span style="counter-reset: c 3999"></span>
+ <span style="counter-reset: c 4999"></span>
+ <span style="counter-reset: c 5999"></span>
+ <span style="counter-reset: c 6999"></span>
+ <span style="counter-reset: c 7999"></span>
+ <span style="counter-reset: c 8999"></span>
+ <span style="counter-reset: c 9999"></span>
+ <span style="counter-reset: c 19998"></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-10-b-reference.html b/layout/reftests/counters/t1202-counter-10-b-reference.html
new file mode 100644
index 000000000..02965401e
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-10-b-reference.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, armenian)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>&#x531;</span>
+ <span>&#x532;</span>
+ <span>&#x533;</span>
+ <span>&#x534;</span>
+ <span>&#x535;</span>
+ <span>&#x536;</span>
+ <span>&#x537;</span>
+ <span>&#x538;</span>
+ <span>&#x539;</span>
+ <span>&#x53A;</span>
+ <span>&#x53A;&#x531;</span>
+ <span>&#x53A;&#x532;</span>
+ <span>&#x53B;</span>
+ <span>&#x53C;</span>
+ <span>&#x53D;</span>
+ <span>&#x53E;</span>
+ <span>&#x53F;</span>
+ <span>&#x540;</span>
+ <span>&#x541;</span>
+ <span>&#x542;</span>
+ <span>&#x543;</span>
+ <span>&#x544;</span>
+ <span>&#x545;</span>
+ <span>&#x546;</span>
+ <span>&#x547;</span>
+ <span>&#x548;</span>
+ <span>&#x549;</span>
+ <span>&#x54A;</span>
+ <span>&#x54B;</span>
+ <span>&#x54C;</span>
+ <span>&#x54D;</span>
+ <span>&#x54E;</span>
+ <span>&#x54F;</span>
+ <span>&#x550;</span>
+ <span>&#x551;</span>
+ <span>&#x552;</span>
+ <span>&#x553;</span>
+ <span>&#x554;</span>
+ <span>&#x554;&#x54B;&#x542;&#x539;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-10-b-test.html b/layout/reftests/counters/t1202-counter-10-b-test.html
new file mode 100644
index 000000000..7eeabdd15
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-10-b-test.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, armenian)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, armenian); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 19"></span>
+ <span style="counter-reset: c 29"></span>
+ <span style="counter-reset: c 39"></span>
+ <span style="counter-reset: c 49"></span>
+ <span style="counter-reset: c 59"></span>
+ <span style="counter-reset: c 69"></span>
+ <span style="counter-reset: c 79"></span>
+ <span style="counter-reset: c 89"></span>
+ <span style="counter-reset: c 99"></span>
+ <span style="counter-reset: c 199"></span>
+ <span style="counter-reset: c 299"></span>
+ <span style="counter-reset: c 399"></span>
+ <span style="counter-reset: c 499"></span>
+ <span style="counter-reset: c 599"></span>
+ <span style="counter-reset: c 699"></span>
+ <span style="counter-reset: c 799"></span>
+ <span style="counter-reset: c 899"></span>
+ <span style="counter-reset: c 999"></span>
+ <span style="counter-reset: c 1999"></span>
+ <span style="counter-reset: c 2999"></span>
+ <span style="counter-reset: c 3999"></span>
+ <span style="counter-reset: c 4999"></span>
+ <span style="counter-reset: c 5999"></span>
+ <span style="counter-reset: c 6999"></span>
+ <span style="counter-reset: c 7999"></span>
+ <span style="counter-reset: c 8999"></span>
+ <span style="counter-reset: c 9998"></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-11-b-reference.html b/layout/reftests/counters/t1202-counter-11-b-reference.html
new file mode 100644
index 000000000..beff97224
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-11-b-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, lower-latin)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>a</span>
+ <span>b</span>
+ <span>c</span>
+ <span>d</span>
+ <span>e</span>
+ <span>f</span>
+ <span>g</span>
+ <span>h</span>
+ <span>i</span>
+ <span>j</span>
+ <span>k</span>
+ <span>l</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-11-b-test.html b/layout/reftests/counters/t1202-counter-11-b-test.html
new file mode 100644
index 000000000..0fec0f849
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-11-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, lower-latin)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, lower-latin); }
+
+ </style>
+ </head>
+ <body>
+
+<div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-12-b-reference.html b/layout/reftests/counters/t1202-counter-12-b-reference.html
new file mode 100644
index 000000000..375dffee9
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-12-b-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, lower-alpha)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>a</span>
+ <span>b</span>
+ <span>c</span>
+ <span>d</span>
+ <span>e</span>
+ <span>f</span>
+ <span>g</span>
+ <span>h</span>
+ <span>i</span>
+ <span>j</span>
+ <span>k</span>
+ <span>l</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-12-b-test.html b/layout/reftests/counters/t1202-counter-12-b-test.html
new file mode 100644
index 000000000..3de16e478
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-12-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, lower-alpha)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, lower-alpha); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-13-b-reference.html b/layout/reftests/counters/t1202-counter-13-b-reference.html
new file mode 100644
index 000000000..c613674a9
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-13-b-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, upper-latin)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>A</span>
+ <span>B</span>
+ <span>C</span>
+ <span>D</span>
+ <span>E</span>
+ <span>F</span>
+ <span>G</span>
+ <span>H</span>
+ <span>I</span>
+ <span>J</span>
+ <span>K</span>
+ <span>L</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-13-b-test.html b/layout/reftests/counters/t1202-counter-13-b-test.html
new file mode 100644
index 000000000..21ec67b31
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-13-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, upper-latin)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, upper-latin); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-14-b-reference.html b/layout/reftests/counters/t1202-counter-14-b-reference.html
new file mode 100644
index 000000000..cd9f1a32c
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-14-b-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, upper-alpha)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>A</span>
+ <span>B</span>
+ <span>C</span>
+ <span>D</span>
+ <span>E</span>
+ <span>F</span>
+ <span>G</span>
+ <span>H</span>
+ <span>I</span>
+ <span>J</span>
+ <span>K</span>
+ <span>L</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-14-b-test.html b/layout/reftests/counters/t1202-counter-14-b-test.html
new file mode 100644
index 000000000..187ca1679
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-14-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, upper-alpha)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, upper-alpha); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-15-b-reference.html b/layout/reftests/counters/t1202-counter-15-b-reference.html
new file mode 100644
index 000000000..491c06b2e
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-15-b-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, lower-greek)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>&#x3B1;</span>
+ <span>&#x3B2;</span>
+ <span>&#x3B3;</span>
+ <span>&#x3B4;</span>
+ <span>&#x3B5;</span>
+ <span>&#x3B6;</span>
+ <span>&#x3B7;</span>
+ <span>&#x3B8;</span>
+ <span>&#x3B9;</span>
+ <span>&#x3BA;</span>
+ <span>&#x3BB;</span>
+ <span>&#x3BC;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-15-b-test.html b/layout/reftests/counters/t1202-counter-15-b-test.html
new file mode 100644
index 000000000..0321b124b
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-15-b-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter(c, lower-greek)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c; }
+ #test span { counter-increment: c; }
+ #test span:before { content: counter(c, lower-greek); }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-16-f-reference.html b/layout/reftests/counters/t1202-counter-16-f-reference.html
new file mode 100644
index 000000000..6f26a0198
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-16-f-reference.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter() error cases</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+
+ </head>
+ <body>
+
+ <div>
+ <span>1</span>
+ <span>2</span>
+ <span>3</span>
+ <span>4</span>
+ <span>5</span>
+ <span>6</span>
+ <span>7</span>
+ <span>8</span>
+ <span>9</span>
+ <span>10</span>
+ <span>11</span>
+ <span>12</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counter-16-f-test.html b/layout/reftests/counters/t1202-counter-16-f-test.html
new file mode 100644
index 000000000..c0954d58e
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-16-f-test.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counter() error cases</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ #test { counter-reset: c 0 f 1000; }
+ #test span { counter-increment: c; }
+ #test span:before {
+ content: counter(c);
+ content: counter(f, ".");
+ content: counter(f, ".", decimal);
+ content: counter(f, decimal, ".");
+ content: counter(f, decimal, decimal);
+ }
+
+ </style>
+ </head>
+ <body>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-00-b-reference.html b/layout/reftests/counters/t1202-counters-00-b-reference.html
new file mode 100644
index 000000000..61198bbc1
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-00-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".")</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>1.1</span>
+ <span>1.2</span>
+ <span>1.3</span>
+ <span>1.4</span>
+ <span>1.5</span>
+ <span>1.6</span>
+ <span>1.7</span>
+ <span>1.8</span>
+ <span>1.9</span>
+ <span>1.10</span>
+ <span>1.11</span>
+ <span>1.12</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-00-b-test.html b/layout/reftests/counters/t1202-counters-00-b-test.html
new file mode 100644
index 000000000..c355b02eb
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-00-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".")</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, "."); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-01-b-reference.html b/layout/reftests/counters/t1202-counters-01-b-reference.html
new file mode 100644
index 000000000..e28d0b4bb
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-01-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", none)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>.z</span>
+ <span>.z</span>
+ <span>.z</span>
+ <span>.z</span>
+ <span>.z</span>
+ <span>.z</span>
+ <span>.z</span>
+ <span>.z</span>
+ <span>.z</span>
+ <span>.z</span>
+ <span>.z</span>
+ <span>.z</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-01-b-test.html b/layout/reftests/counters/t1202-counters-01-b-test.html
new file mode 100644
index 000000000..f4a227fa7
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-01-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", none)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", none) "z"; }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-02-b-reference.html b/layout/reftests/counters/t1202-counters-02-b-reference.html
new file mode 100644
index 000000000..38bb3b654
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-02-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", disc)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ <span>&#x2022;.&#x2022;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-02-b-test.html b/layout/reftests/counters/t1202-counters-02-b-test.html
new file mode 100644
index 000000000..9ee45c216
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-02-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", disc)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", disc); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-03-b-reference.html b/layout/reftests/counters/t1202-counters-03-b-reference.html
new file mode 100644
index 000000000..3c9758ef2
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-03-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", circle)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ <span>&#x25E6;.&#x25E6;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-03-b-test.html b/layout/reftests/counters/t1202-counters-03-b-test.html
new file mode 100644
index 000000000..102e53864
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-03-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", circle)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", circle); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-04-b-reference.html b/layout/reftests/counters/t1202-counters-04-b-reference.html
new file mode 100644
index 000000000..463c268ef
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-04-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", square)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ <span>&#x25FE;.&#x25FE;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-04-b-test.html b/layout/reftests/counters/t1202-counters-04-b-test.html
new file mode 100644
index 000000000..6fd5e6d1d
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-04-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", square)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", square); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-05-b-reference.html b/layout/reftests/counters/t1202-counters-05-b-reference.html
new file mode 100644
index 000000000..68911cde3
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-05-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", decimal)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>1.1</span>
+ <span>1.2</span>
+ <span>1.3</span>
+ <span>1.4</span>
+ <span>1.5</span>
+ <span>1.6</span>
+ <span>1.7</span>
+ <span>1.8</span>
+ <span>1.9</span>
+ <span>1.10</span>
+ <span>1.11</span>
+ <span>1.12</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-05-b-test.html b/layout/reftests/counters/t1202-counters-05-b-test.html
new file mode 100644
index 000000000..335e898a2
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-05-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", decimal)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", decimal); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-06-b-reference.html b/layout/reftests/counters/t1202-counters-06-b-reference.html
new file mode 100644
index 000000000..b2b5ca1a0
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-06-b-reference.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", decimal-leading-zero)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>01.01</span>
+ <span>01.02</span>
+ <span>01.03</span>
+ <span>01.04</span>
+ <span>01.05</span>
+ <span>01.06</span>
+ <span>01.07</span>
+ <span>01.08</span>
+ <span>01.09</span>
+ <span>01.10</span>
+ <span>01.11</span>
+ <span>01.12</span>
+ <span>01.99</span>
+ <span>01.100</span>
+ <span>01.101</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-06-b-test.html b/layout/reftests/counters/t1202-counters-06-b-test.html
new file mode 100644
index 000000000..55f5ba628
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-06-b-test.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", decimal-leading-zero)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ body, #test span:first-child { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", decimal-leading-zero); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 98"></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-07-b-reference.html b/layout/reftests/counters/t1202-counters-07-b-reference.html
new file mode 100644
index 000000000..ef08cfbef
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-07-b-reference.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", lower-roman)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>i.i</span>
+ <span>i.ii</span>
+ <span>i.iii</span>
+ <span>i.iv</span>
+ <span>i.v</span>
+ <span>i.vi</span>
+ <span>i.vii</span>
+ <span>i.viii</span>
+ <span>i.ix</span>
+ <span>i.x</span>
+ <span>i.xi</span>
+ <span>i.xii</span>
+ <span>i.xlix</span>
+ <span>i.l</span>
+ <span>i.ccclxxxix</span>
+ <span>i.cccxc</span>
+ <span>i.mmmcdlxxxix</span>
+ <span>i.mmmcdxc</span>
+ <span>i.mmmcdxci</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-07-b-test.html b/layout/reftests/counters/t1202-counters-07-b-test.html
new file mode 100644
index 000000000..1213eebec
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-07-b-test.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", lower-roman)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ body, #test span:first-child { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", lower-roman); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 48"></span>
+ <span></span>
+ <span style="counter-reset: c 388"></span>
+ <span></span>
+ <span style="counter-reset: c 3488"></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-08-b-reference.html b/layout/reftests/counters/t1202-counters-08-b-reference.html
new file mode 100644
index 000000000..7838d10fb
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-08-b-reference.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", upper-roman)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>I.I</span>
+ <span>I.II</span>
+ <span>I.III</span>
+ <span>I.IV</span>
+ <span>I.V</span>
+ <span>I.VI</span>
+ <span>I.VII</span>
+ <span>I.VIII</span>
+ <span>I.IX</span>
+ <span>I.X</span>
+ <span>I.XI</span>
+ <span>I.XII</span>
+ <span>I.XLIX</span>
+ <span>I.L</span>
+ <span>I.CCCLXXXIX</span>
+ <span>I.CCCXC</span>
+ <span>I.MMMCDLXXXIX</span>
+ <span>I.MMMCDXC</span>
+ <span>I.MMMCDXCI</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-08-b-test.html b/layout/reftests/counters/t1202-counters-08-b-test.html
new file mode 100644
index 000000000..1bbcb2873
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-08-b-test.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", upper-roman)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ body, #test span:first-child { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", upper-roman); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 48"></span>
+ <span></span>
+ <span style="counter-reset: c 388"></span>
+ <span></span>
+ <span style="counter-reset: c 3488"></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-09-b-reference.html b/layout/reftests/counters/t1202-counters-09-b-reference.html
new file mode 100644
index 000000000..0511df55e
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-09-b-reference.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", georgian)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>&#x10D0;.&#x10D0;</span>
+ <span>&#x10D0;.&#x10D1;</span>
+ <span>&#x10D0;.&#x10D2;</span>
+ <span>&#x10D0;.&#x10D3;</span>
+ <span>&#x10D0;.&#x10D4;</span>
+ <span>&#x10D0;.&#x10D5;</span>
+ <span>&#x10D0;.&#x10D6;</span>
+ <span>&#x10D0;.&#x10F1;</span>
+ <span>&#x10D0;.&#x10D7;</span>
+ <span>&#x10D0;.&#x10D8;</span>
+ <span>&#x10D0;.&#x10D8;&#x10D0;</span>
+ <span>&#x10D0;.&#x10D8;&#x10D1;</span>
+ <span>&#x10D0;.&#x10D9;</span>
+ <span>&#x10D0;.&#x10DA;</span>
+ <span>&#x10D0;.&#x10DB;</span>
+ <span>&#x10D0;.&#x10DC;</span>
+ <span>&#x10D0;.&#x10F2;</span>
+ <span>&#x10D0;.&#x10DD;</span>
+ <span>&#x10D0;.&#x10DE;</span>
+ <span>&#x10D0;.&#x10DF;</span>
+ <span>&#x10D0;.&#x10E0;</span>
+ <span>&#x10D0;.&#x10E1;</span>
+ <span>&#x10D0;.&#x10E2;</span>
+ <span>&#x10D0;.&#x10F3;</span>
+ <span>&#x10D0;.&#x10E4;</span>
+ <span>&#x10D0;.&#x10E5;</span>
+ <span>&#x10D0;.&#x10E6;</span>
+ <span>&#x10D0;.&#x10E7;</span>
+ <span>&#x10D0;.&#x10E8;</span>
+ <span>&#x10D0;.&#x10E9;</span>
+ <span>&#x10D0;.&#x10EA;</span>
+ <span>&#x10D0;.&#x10EB;</span>
+ <span>&#x10D0;.&#x10EC;</span>
+ <span>&#x10D0;.&#x10ED;</span>
+ <span>&#x10D0;.&#x10EE;</span>
+ <span>&#x10D0;.&#x10F4;</span>
+ <span>&#x10D0;.&#x10EF;</span>
+ <span>&#x10D0;.&#x10F0;</span>
+ <span>&#x10D0;.&#x10F5;</span>
+ <span>&#x10D0;.&#x10F5;&#x10F0;&#x10E8;&#x10DF;&#x10D7;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-09-b-test.html b/layout/reftests/counters/t1202-counters-09-b-test.html
new file mode 100644
index 000000000..fb242b53a
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-09-b-test.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", georgian)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ body, #test span:first-child { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", georgian); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 19"></span>
+ <span style="counter-reset: c 29"></span>
+ <span style="counter-reset: c 39"></span>
+ <span style="counter-reset: c 49"></span>
+ <span style="counter-reset: c 59"></span>
+ <span style="counter-reset: c 69"></span>
+ <span style="counter-reset: c 79"></span>
+ <span style="counter-reset: c 89"></span>
+ <span style="counter-reset: c 99"></span>
+ <span style="counter-reset: c 199"></span>
+ <span style="counter-reset: c 299"></span>
+ <span style="counter-reset: c 399"></span>
+ <span style="counter-reset: c 499"></span>
+ <span style="counter-reset: c 599"></span>
+ <span style="counter-reset: c 699"></span>
+ <span style="counter-reset: c 799"></span>
+ <span style="counter-reset: c 899"></span>
+ <span style="counter-reset: c 999"></span>
+ <span style="counter-reset: c 1999"></span>
+ <span style="counter-reset: c 2999"></span>
+ <span style="counter-reset: c 3999"></span>
+ <span style="counter-reset: c 4999"></span>
+ <span style="counter-reset: c 5999"></span>
+ <span style="counter-reset: c 6999"></span>
+ <span style="counter-reset: c 7999"></span>
+ <span style="counter-reset: c 8999"></span>
+ <span style="counter-reset: c 9999"></span>
+ <span style="counter-reset: c 19998"></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-10-b-reference.html b/layout/reftests/counters/t1202-counters-10-b-reference.html
new file mode 100644
index 000000000..af593dab5
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-10-b-reference.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", armenian)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>&#x531;.&#x531;</span>
+ <span>&#x531;.&#x532;</span>
+ <span>&#x531;.&#x533;</span>
+ <span>&#x531;.&#x534;</span>
+ <span>&#x531;.&#x535;</span>
+ <span>&#x531;.&#x536;</span>
+ <span>&#x531;.&#x537;</span>
+ <span>&#x531;.&#x538;</span>
+ <span>&#x531;.&#x539;</span>
+ <span>&#x531;.&#x53A;</span>
+ <span>&#x531;.&#x53A;&#x531;</span>
+ <span>&#x531;.&#x53A;&#x532;</span>
+ <span>&#x531;.&#x53B;</span>
+ <span>&#x531;.&#x53C;</span>
+ <span>&#x531;.&#x53D;</span>
+ <span>&#x531;.&#x53E;</span>
+ <span>&#x531;.&#x53F;</span>
+ <span>&#x531;.&#x540;</span>
+ <span>&#x531;.&#x541;</span>
+ <span>&#x531;.&#x542;</span>
+ <span>&#x531;.&#x543;</span>
+ <span>&#x531;.&#x544;</span>
+ <span>&#x531;.&#x545;</span>
+ <span>&#x531;.&#x546;</span>
+ <span>&#x531;.&#x547;</span>
+ <span>&#x531;.&#x548;</span>
+ <span>&#x531;.&#x549;</span>
+ <span>&#x531;.&#x54A;</span>
+ <span>&#x531;.&#x54B;</span>
+ <span>&#x531;.&#x54C;</span>
+ <span>&#x531;.&#x54D;</span>
+ <span>&#x531;.&#x54E;</span>
+ <span>&#x531;.&#x54F;</span>
+ <span>&#x531;.&#x550;</span>
+ <span>&#x531;.&#x551;</span>
+ <span>&#x531;.&#x552;</span>
+ <span>&#x531;.&#x553;</span>
+ <span>&#x531;.&#x554;</span>
+ <span>&#x531;.&#x554;&#x54B;&#x542;&#x539;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-10-b-test.html b/layout/reftests/counters/t1202-counters-10-b-test.html
new file mode 100644
index 000000000..5139812fc
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-10-b-test.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", armenian)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <style type="text/css">
+
+ body, #test span:first-child { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", armenian); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span style="counter-reset: c 19"></span>
+ <span style="counter-reset: c 29"></span>
+ <span style="counter-reset: c 39"></span>
+ <span style="counter-reset: c 49"></span>
+ <span style="counter-reset: c 59"></span>
+ <span style="counter-reset: c 69"></span>
+ <span style="counter-reset: c 79"></span>
+ <span style="counter-reset: c 89"></span>
+ <span style="counter-reset: c 99"></span>
+ <span style="counter-reset: c 199"></span>
+ <span style="counter-reset: c 299"></span>
+ <span style="counter-reset: c 399"></span>
+ <span style="counter-reset: c 499"></span>
+ <span style="counter-reset: c 599"></span>
+ <span style="counter-reset: c 699"></span>
+ <span style="counter-reset: c 799"></span>
+ <span style="counter-reset: c 899"></span>
+ <span style="counter-reset: c 999"></span>
+ <span style="counter-reset: c 1999"></span>
+ <span style="counter-reset: c 2999"></span>
+ <span style="counter-reset: c 3999"></span>
+ <span style="counter-reset: c 4999"></span>
+ <span style="counter-reset: c 5999"></span>
+ <span style="counter-reset: c 6999"></span>
+ <span style="counter-reset: c 7999"></span>
+ <span style="counter-reset: c 8999"></span>
+ <span style="counter-reset: c 9998"></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-11-b-reference.html b/layout/reftests/counters/t1202-counters-11-b-reference.html
new file mode 100644
index 000000000..b46d605f1
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-11-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", lower-latin)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>a.a</span>
+ <span>a.b</span>
+ <span>a.c</span>
+ <span>a.d</span>
+ <span>a.e</span>
+ <span>a.f</span>
+ <span>a.g</span>
+ <span>a.h</span>
+ <span>a.i</span>
+ <span>a.j</span>
+ <span>a.k</span>
+ <span>a.l</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-11-b-test.html b/layout/reftests/counters/t1202-counters-11-b-test.html
new file mode 100644
index 000000000..b1c8ecb25
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-11-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", lower-latin)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", lower-latin); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-12-b-reference.html b/layout/reftests/counters/t1202-counters-12-b-reference.html
new file mode 100644
index 000000000..14103e0a2
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-12-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", lower-alpha)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>a.a</span>
+ <span>a.b</span>
+ <span>a.c</span>
+ <span>a.d</span>
+ <span>a.e</span>
+ <span>a.f</span>
+ <span>a.g</span>
+ <span>a.h</span>
+ <span>a.i</span>
+ <span>a.j</span>
+ <span>a.k</span>
+ <span>a.l</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-12-b-test.html b/layout/reftests/counters/t1202-counters-12-b-test.html
new file mode 100644
index 000000000..78895530a
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-12-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", lower-alpha)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", lower-alpha); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-13-b-reference.html b/layout/reftests/counters/t1202-counters-13-b-reference.html
new file mode 100644
index 000000000..cd6acb978
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-13-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", upper-latin)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>A.A</span>
+ <span>A.B</span>
+ <span>A.C</span>
+ <span>A.D</span>
+ <span>A.E</span>
+ <span>A.F</span>
+ <span>A.G</span>
+ <span>A.H</span>
+ <span>A.I</span>
+ <span>A.J</span>
+ <span>A.K</span>
+ <span>A.L</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-13-b-test.html b/layout/reftests/counters/t1202-counters-13-b-test.html
new file mode 100644
index 000000000..13205b3d1
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-13-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", upper-latin)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", upper-latin); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-14-b-reference.html b/layout/reftests/counters/t1202-counters-14-b-reference.html
new file mode 100644
index 000000000..325bb481b
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-14-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", upper-alpha)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>A.A</span>
+ <span>A.B</span>
+ <span>A.C</span>
+ <span>A.D</span>
+ <span>A.E</span>
+ <span>A.F</span>
+ <span>A.G</span>
+ <span>A.H</span>
+ <span>A.I</span>
+ <span>A.J</span>
+ <span>A.K</span>
+ <span>A.L</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-14-b-test.html b/layout/reftests/counters/t1202-counters-14-b-test.html
new file mode 100644
index 000000000..2760d0cf5
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-14-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", upper-alpha)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", upper-alpha); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-15-b-reference.html b/layout/reftests/counters/t1202-counters-15-b-reference.html
new file mode 100644
index 000000000..29b8ddc5f
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-15-b-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", lower-greek)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>&#x3B1;.&#x3B1;</span>
+ <span>&#x3B1;.&#x3B2;</span>
+ <span>&#x3B1;.&#x3B3;</span>
+ <span>&#x3B1;.&#x3B4;</span>
+ <span>&#x3B1;.&#x3B5;</span>
+ <span>&#x3B1;.&#x3B6;</span>
+ <span>&#x3B1;.&#x3B7;</span>
+ <span>&#x3B1;.&#x3B8;</span>
+ <span>&#x3B1;.&#x3B9;</span>
+ <span>&#x3B1;.&#x3BA;</span>
+ <span>&#x3B1;.&#x3BB;</span>
+ <span>&#x3B1;.&#x3BC;</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-15-b-test.html b/layout/reftests/counters/t1202-counters-15-b-test.html
new file mode 100644
index 000000000..e7ed9d35c
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-15-b-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters(c, ".", lower-greek)</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+ #test span:before { content: counters(c, ".", lower-greek); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-16-c-reference.html b/layout/reftests/counters/t1202-counters-16-c-reference.html
new file mode 100644
index 000000000..5e325375b
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-16-c-reference.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters() string argument</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div><span>1.1</span><span> - </span><span>12</span><span> - </span><span>1.3</span><span>-- --</span><span>1-------3</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-16-c-test.html b/layout/reftests/counters/t1202-counters-16-c-test.html
new file mode 100644
index 000000000..9e8f5d818
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-16-c-test.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters() string argument</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ p, #test span { counter-increment: c; }
+
+ span#one:before { content: counters(c, ".") " - "; }
+ span#two:before { content: counters(c, "") " - "; }
+ span#three:before { content: counters(c, ".", decimal) "-- --" counters(c, "-------", decimal); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test"><span id="one"></span><span id="two"></span><span id="three"></span></div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-17-d-reference.html b/layout/reftests/counters/t1202-counters-17-d-reference.html
new file mode 100644
index 000000000..0fb990778
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-17-d-reference.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters() string argument</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ div { white-space: pre; }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div><span>1.1 - </span><span>12 - </span><span>1.3-- --1-------3</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-17-d-test.html b/layout/reftests/counters/t1202-counters-17-d-test.html
new file mode 100644
index 000000000..d7d02bcd4
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-17-d-test.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters() string argument</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c; }
+ div { white-space: pre; }
+ p, #test span { counter-increment: c; }
+
+ span#one:before { content: counters(c, ".") " - "; }
+ span#two:before { content: counters(c, "") " - "; }
+ span#three:before { content: counters(c, ".", decimal) "-- --" counters(c, "-------", decimal); }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test"><span id="one"></span><span id="two"></span><span id="three"></span></div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-18-f-reference.html b/layout/reftests/counters/t1202-counters-18-f-reference.html
new file mode 100644
index 000000000..8bd74796f
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-18-f-reference.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters() error cases</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+ <span>1.1</span>
+ <span>1.2</span>
+ <span>1.3</span>
+ <span>1.4</span>
+ <span>1.5</span>
+ <span>1.6</span>
+ <span>1.7</span>
+ <span>1.8</span>
+ <span>1.9</span>
+ <span>1.10</span>
+ <span>1.11</span>
+ <span>1.12</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1202-counters-18-f-test.html b/layout/reftests/counters/t1202-counters-18-f-test.html
new file mode 100644
index 000000000..58d3f24e7
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-18-f-test.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: content: counters() error cases</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles"/>
+ <style type="text/css">
+
+ body, #test { counter-reset: c 0 f 1000; }
+ p, #test span { counter-increment: c; }
+ #test span:before {
+ content: counters(c, ".");
+ content: counters(f);
+ content: counters(f, decimal);
+ content: counters(f, decimal, ".");
+ content: counters(f, ".", decimal, decimal);
+ content: counters(f, ".", decimal, ".");
+ }
+
+ </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div id="test">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-implied-00-b-reference.html b/layout/reftests/counters/t1204-implied-00-b-reference.html
new file mode 100644
index 000000000..0aa1d0bf3
--- /dev/null
+++ b/layout/reftests/counters/t1204-implied-00-b-reference.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Implied counter scopes with no 'counter-increment' or 'counter-reset'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+ <div><span>0</span><span>0</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-implied-00-b-test.html b/layout/reftests/counters/t1204-implied-00-b-test.html
new file mode 100644
index 000000000..9f2d8a875
--- /dev/null
+++ b/layout/reftests/counters/t1204-implied-00-b-test.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Implied counter scopes with no 'counter-increment' or 'counter-reset'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ #one:before { content: counter(one) }
+ #two:before { content: counter(two) }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span id="one"></span><span id="two"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-implied-01-c-reference.html b/layout/reftests/counters/t1204-implied-01-c-reference.html
new file mode 100644
index 000000000..92f7b8502
--- /dev/null
+++ b/layout/reftests/counters/t1204-implied-01-c-reference.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Implied counter scopes by counter use</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+
+ <div><span>0 </span><span>1 </span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-implied-01-c-test.html b/layout/reftests/counters/t1204-implied-01-c-test.html
new file mode 100644
index 000000000..810436da0
--- /dev/null
+++ b/layout/reftests/counters/t1204-implied-01-c-test.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Implied counter scopes by counter use</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ .i { counter-increment: c 1; }
+ .r { counter-reset: c 0; }
+ .u:before { content: counters(c, ".") " "; }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span class="u"></span><span class="r"><span class="i u"></span></span></div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-implied-02-d-reference.html b/layout/reftests/counters/t1204-implied-02-d-reference.html
new file mode 100644
index 000000000..8bb4bfccd
--- /dev/null
+++ b/layout/reftests/counters/t1204-implied-02-d-reference.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Implied counter scopes by 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+
+ <div><span>B</span><span>1 </span><span>0 </span><span>1 </span><span>1.0</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-implied-02-d-test.html b/layout/reftests/counters/t1204-implied-02-d-test.html
new file mode 100644
index 000000000..fda0f50af
--- /dev/null
+++ b/layout/reftests/counters/t1204-implied-02-d-test.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Implied counter scopes by 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ .i { counter-increment: c 1; }
+ .ib:before { counter-increment: c 1; content: "B" }
+ .r { counter-reset: c 0; }
+ .u:before { content: counters(c, ".") " "; }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span class="ib"><span class="u"></span><span class="r"><span class="u"></span></span></span><span class="i"><span class="u"></span><span class="r"><span class="u"></span></span></span></div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-increment-00-c-o-reference.html b/layout/reftests/counters/t1204-increment-00-c-o-reference.html
new file mode 100644
index 000000000..8676b8c82
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-00-c-o-reference.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ </head>
+ <body>
+
+ <div id="reference"><span>1-</span><span>2-new-</span><span>3-</span><span>4-</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-increment-00-c-o-test.html b/layout/reftests/counters/t1204-increment-00-c-o-test.html
new file mode 100644
index 000000000..2483f5eab
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-00-c-o-test.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ <style type="text/css">
+
+ #test, .reset { counter-reset: c; }
+ .increment:before { content: counters(c, ".") "-"; }
+ .increment { counter-increment: c; }
+
+ </style>
+ <script type="text/javascript">
+
+ function run() {
+ var t = document.getElementById("test");
+ var s = document.createElement("span");
+ s.setAttribute("class", "increment");
+ s.appendChild(document.createTextNode("new-"));
+ t.insertBefore(s, t.childNodes.item(1));
+ document.documentElement.removeAttribute('class');
+ }
+
+ document.addEventListener("MozReftestInvalidate", run, false);
+ </script>
+ </head>
+ <body>
+
+ <div id="test"><span class="increment"></span><span class="increment"></span><span class="increment"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-increment-01-c-o-reference.html b/layout/reftests/counters/t1204-increment-01-c-o-reference.html
new file mode 100644
index 000000000..3be209b7e
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-01-c-o-reference.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ </head>
+ <body>
+
+ <div id="reference"><span>1-</span><span>2-</span><span>3-</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-increment-01-c-o-test.html b/layout/reftests/counters/t1204-increment-01-c-o-test.html
new file mode 100644
index 000000000..891b68fc1
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-01-c-o-test.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ <style type="text/css">
+
+ #test, .reset { counter-reset: c; }
+ .increment:before { content: counters(c, ".") "-"; }
+ .increment { counter-increment: c; }
+
+ </style>
+ <script type="text/javascript">
+
+ function run() {
+ var t = document.getElementById("test");
+ t.removeChild(t.childNodes.item(1));
+ document.documentElement.removeAttribute('class');
+ }
+
+ document.addEventListener("MozReftestInvalidate", run, false);
+ </script>
+ </head>
+ <body>
+
+ <div id="test"><span class="increment"></span><span class="increment">FAIL-</span><span class="increment"></span><span class="increment"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-increment-02-c-o-reference.html b/layout/reftests/counters/t1204-increment-02-c-o-reference.html
new file mode 100644
index 000000000..348c3267c
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-02-c-o-reference.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ </head>
+ <body>
+
+ <div id="reference"><span>0.1</span><span>-</span><span>0.2</span><span>-</span><span>1</span><span>-</span><span>2</span><span>-</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-increment-02-c-o-test.html b/layout/reftests/counters/t1204-increment-02-c-o-test.html
new file mode 100644
index 000000000..a7e72034c
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-02-c-o-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ <style type="text/css">
+
+ #test, .reset { counter-reset: c; }
+ .increment:before, .use:before { content: counters(c, ".") "-"; }
+ .increment { counter-increment: c; }
+
+ </style>
+ <script type="text/javascript">
+
+ function run() {
+ document.getElementById("one").removeAttribute("class");
+ document.getElementById("two").setAttribute("class", "increment");
+ document.getElementById("three").setAttribute("style", "counter-increment: c");
+ document.documentElement.removeAttribute('class');
+ }
+
+ document.addEventListener("MozReftestInvalidate", run, false);
+ </script>
+ </head>
+ <body>
+
+ <div id="test"><span id="one" class="increment"></span><span><span class="reset"><span class="increment"></span><span id="two" class="increment"></span></span></span><span id="three" class="use"></span><span class="increment"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-multiple-00-c-reference.html b/layout/reftests/counters/t1204-multiple-00-c-reference.html
new file mode 100644
index 000000000..b878c754b
--- /dev/null
+++ b/layout/reftests/counters/t1204-multiple-00-c-reference.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Multiple resets for same counter</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+ <div><span>1</span><span>2</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-multiple-00-c-test.html b/layout/reftests/counters/t1204-multiple-00-c-test.html
new file mode 100644
index 000000000..3415bf92b
--- /dev/null
+++ b/layout/reftests/counters/t1204-multiple-00-c-test.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Multiple resets for same counter</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ #one:before { counter-reset: one 1; content: counter(one) }
+ #two:before { counter-reset: two 7 two 2; content: counter(two) }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span id="one"></span><span id="two"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-multiple-01-c-reference.html b/layout/reftests/counters/t1204-multiple-01-c-reference.html
new file mode 100644
index 000000000..e4bc1285f
--- /dev/null
+++ b/layout/reftests/counters/t1204-multiple-01-c-reference.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Multiple increments and resets</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+ <div><span>1</span><span>2</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-multiple-01-c-test.html b/layout/reftests/counters/t1204-multiple-01-c-test.html
new file mode 100644
index 000000000..c10c5b4d8
--- /dev/null
+++ b/layout/reftests/counters/t1204-multiple-01-c-test.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Multiple increments and resets</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ body { counter-reset: one 7 two -2; }
+ #one:before { counter-increment: one -6; content: counter(one) }
+ #two:before { counter-increment: dummy two 7 two two -4 silly 7; content: counter(two) }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span id="one"></span><span id="two"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-order-00-c-reference.html b/layout/reftests/counters/t1204-order-00-c-reference.html
new file mode 100644
index 000000000..6478f6ecc
--- /dev/null
+++ b/layout/reftests/counters/t1204-order-00-c-reference.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Order of 'counter-reset', 'counter-increment', and counter use, including pseudo-elements</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+
+ <div>
+ <span>0</span>
+ <span>1</span>
+ <span>2</span>
+ <span>3</span>
+ <span>4</span>
+ <span>4</span>
+ <span>4</span>
+ <span>4</span>
+ <span>8</span>
+ <span>9</span>
+ <span>10</span>
+ <span>11</span>
+ <span>12</span>
+ <span>12</span>
+ <span>12</span>
+ <span>12</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-order-00-c-test.html b/layout/reftests/counters/t1204-order-00-c-test.html
new file mode 100644
index 000000000..814545900
--- /dev/null
+++ b/layout/reftests/counters/t1204-order-00-c-test.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Order of 'counter-reset', 'counter-increment', and counter use, including pseudo-elements</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ span.c span:before { content: counter(c); }
+ span.c { counter-reset: c 0; }
+ span.one { counter-reset: c 1; }
+ span.two { counter-increment: c 2; }
+ span.four:before { counter-reset: c 4; }
+ span.eight:before { counter-increment: c 8; }
+ span.c span:after { counter-increment: c 100; counter-reset: c 200; }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div>
+ <span class="c"><span class=""></span></span>
+ <span class="c"><span class="one"></span></span>
+ <span class="c"><span class="two"></span></span>
+ <span class="c"><span class="two one"></span></span>
+ <span class="c"><span class="four"></span></span>
+ <span class="c"><span class="four one"></span></span>
+ <span class="c"><span class="four two"></span></span>
+ <span class="c"><span class="four two one"></span></span>
+ <span class="c"><span class="eight"></span></span>
+ <span class="c"><span class="eight one"></span></span>
+ <span class="c"><span class="eight two"></span></span>
+ <span class="c"><span class="eight two one"></span></span>
+ <span class="c"><span class="eight four"></span></span>
+ <span class="c"><span class="eight four one"></span></span>
+ <span class="c"><span class="eight four two"></span></span>
+ <span class="c"><span class="eight four two one"></span></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-order-01-d-reference.html b/layout/reftests/counters/t1204-order-01-d-reference.html
new file mode 100644
index 000000000..bd0b5a2d8
--- /dev/null
+++ b/layout/reftests/counters/t1204-order-01-d-reference.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Order of counters in out-of-flow content</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ ul { display: block; margin: 0; padding: 0; }
+ li, div { display: block; margin: 0; padding: 0;
+ width: 3em; border: thin solid; }
+
+ #four { border: none; }
+
+ #two { float: left; }
+ #three { position: relative; }
+ #four { position: relative; }
+ #four div { position: absolute; left: 8em; }
+ #six { position: absolute; top: 5em; left: 12em; }
+ #eight { position: fixed; top: 8em; left: 4em; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>The number pairs (same digit repeated twice) "11" through "44"
+ should appear on this page.</p>
+
+ <ul>
+ <li id="one"><span>1</span>1</li>
+ <li id="two"><span>2</span>2</li>
+ <li id="three"><span>3</span>3</li>
+ <li id="four"><div><span>4</span>4</div></li>
+ <li id="five"><span>5</span>5</li>
+ <li id="six"><span>6</span>6</li>
+ <li id="seven"><span>7</span>7</li>
+ <li id="eight"><span>8</span>8</li>
+ <li id="nine"><span>9</span>9</li>
+ </ul>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-order-01-d-test.html b/layout/reftests/counters/t1204-order-01-d-test.html
new file mode 100644
index 000000000..9b3f2a82b
--- /dev/null
+++ b/layout/reftests/counters/t1204-order-01-d-test.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Order of counters in out-of-flow content</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ ul { display: block; margin: 0; padding: 0; counter-reset: c; }
+ li { counter-increment: c; }
+ li, div { display: block; margin: 0; padding: 0;
+ width: 3em; border: thin solid; }
+ li:before, div:before { content: counter(c); }
+
+ #four { border: none; }
+ #four:before { content: ""; content: none; }
+
+ #two { float: left; }
+ #three { position: relative; }
+ #four { position: relative; }
+ #four div { position: absolute; left: 8em; }
+ #six { position: absolute; top: 5em; left: 12em; }
+ #eight { position: fixed; top: 8em; left: 4em; }
+
+ </style>
+ </head>
+ <body>
+
+ <p>The number pairs (same digit repeated twice) "11" through "44"
+ should appear on this page.</p>
+
+ <ul>
+ <li id="one">1</li>
+ <li id="two">2</li>
+ <li id="three">3</li>
+ <li id="four"><div>4</div></li>
+ <li id="five">5</li>
+ <li id="six">6</li>
+ <li id="seven">7</li>
+ <li id="eight">8</li>
+ <li id="nine">9</li>
+ </ul>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-reset-00-c-o-reference.html b/layout/reftests/counters/t1204-reset-00-c-o-reference.html
new file mode 100644
index 000000000..e9afee0b6
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-00-c-o-reference.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ </head>
+ <body>
+
+ <div id="reference"><span>1-</span><span>1.1-</span><span>1.2-</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-reset-00-c-o-test.html b/layout/reftests/counters/t1204-reset-00-c-o-test.html
new file mode 100644
index 000000000..9a90a256a
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-00-c-o-test.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ <style type="text/css">
+
+ #test, .reset { counter-reset: c; }
+ .increment:before { content: counters(c, ".") "-"; }
+ .increment { counter-increment: c; }
+
+ </style>
+ <script type="text/javascript">
+
+ function run() {
+ var t = document.getElementById("test");
+ var s = document.createElement("span");
+ s.setAttribute("class", "reset");
+ t.insertBefore(s, t.childNodes.item(1));
+ document.documentElement.removeAttribute('class');
+ }
+
+ document.addEventListener("MozReftestInvalidate", run, false);
+ </script>
+ </head>
+ <body>
+
+ <div id="test"><span class="increment"></span><span class="increment"></span><span class="increment"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-reset-01-c-o-reference.html b/layout/reftests/counters/t1204-reset-01-c-o-reference.html
new file mode 100644
index 000000000..3be209b7e
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-01-c-o-reference.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ </head>
+ <body>
+
+ <div id="reference"><span>1-</span><span>2-</span><span>3-</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-reset-01-c-o-test.html b/layout/reftests/counters/t1204-reset-01-c-o-test.html
new file mode 100644
index 000000000..ecd7d18eb
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-01-c-o-test.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ <style type="text/css">
+
+ #test, .reset { counter-reset: c; }
+ .increment:before { content: counters(c, ".") "-"; }
+ .increment { counter-increment: c; }
+
+ </style>
+ <script type="text/javascript">
+
+ function run() {
+ var t = document.getElementById("test");
+ t.removeChild(t.childNodes.item(1));
+ document.documentElement.removeAttribute('class');
+ }
+
+ document.addEventListener("MozReftestInvalidate", run, false);
+ </script>
+ </head>
+ <body>
+
+ <div id="test"><span class="increment"></span><span class="reset"></span><span class="increment"></span><span class="increment"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-reset-02-c-o-reference.html b/layout/reftests/counters/t1204-reset-02-c-o-reference.html
new file mode 100644
index 000000000..a154f7022
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-02-c-o-reference.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ </head>
+ <body>
+
+ <div id="reference"><span>1</span><span>-</span><span>1.1</span><span>-</span><span>2</span><span>-</span><span>3</span><span>-</span><span>4</span><span>-</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-reset-02-c-o-test.html b/layout/reftests/counters/t1204-reset-02-c-o-test.html
new file mode 100644
index 000000000..4615eebb8
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-02-c-o-test.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+ <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <meta http-equiv="Content-Script-Type" content="text/javascript"/>
+ <style type="text/css">
+
+ #test, .reset { counter-reset: c; }
+ .increment:before { content: counters(c, ".") "-"; }
+ .increment { counter-increment: c; }
+
+ </style>
+ <script type="text/javascript">
+
+ function run() {
+ document.getElementById("one").setAttribute("class", "reset");
+ document.getElementById("two").removeAttribute("class");
+ document.documentElement.removeAttribute('class');
+ }
+
+ document.addEventListener("MozReftestInvalidate", run, false);
+ </script>
+ </head>
+ <body>
+
+ <div id="test"><span class="increment"></span><span><span id="one"><span class="increment"></span></span></span><span class="increment"></span><span><span id="two" class="reset"><span class="increment"></span></span></span><span class="increment"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-root-e-reference.html b/layout/reftests/counters/t1204-root-e-reference.html
new file mode 100644
index 000000000..3efe27018
--- /dev/null
+++ b/layout/reftests/counters/t1204-root-e-reference.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: counters on the root element</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+
+ <div>
+ <span>4.8</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t1204-root-e-test.html b/layout/reftests/counters/t1204-root-e-test.html
new file mode 100644
index 000000000..3e7286db6
--- /dev/null
+++ b/layout/reftests/counters/t1204-root-e-test.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: counters on the root element</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ html { counter-reset: c 0 c 4 c 0; counter-increment: c 1 c 3; }
+ html:before { content: " "; counter-reset: c 9999; counter-increment: c 9999; }
+ body { counter-reset: c 3; counter-increment: c 5; }
+
+ span.c:before { content: counters(c, "."); }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div>
+ <span class="c"></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120401-scope-00-b-reference.html b/layout/reftests/counters/t120401-scope-00-b-reference.html
new file mode 100644
index 000000000..e1b9eedad
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-00-b-reference.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter scope</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+ <div>
+ <span>1</span><span>2</span><span>2</span><span>1</span><span>1</span><span>1</span>
+ <span>1</span><span>3</span><span>3</span><span>3</span><span>3</span><span>1</span>
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120401-scope-00-b-test.html b/layout/reftests/counters/t120401-scope-00-b-test.html
new file mode 100644
index 000000000..da7a6ae1a
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-00-b-test.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter scope</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ .scope { counter-reset: c 1; }
+ .scope:before, .scope:after { content: counter(c); }
+ .c:before { content: counter(c); }
+
+ .one:before { counter-reset: c 2; }
+ .two { counter-reset: c 3; }
+
+ </style>
+ </head>
+ <body>
+
+ <div>
+ <span class="scope"><span class="one c"><span class="c"></span></span><span class="c"></span></span><span class="c"></span>
+ <span class="scope"><span class="two c"><span class="c"></span></span><span class="c"></span></span><span class="c"></span>
+ </div>
+
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120401-scope-01-c-reference.html b/layout/reftests/counters/t120401-scope-01-c-reference.html
new file mode 100644
index 000000000..c7488ce4b
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-01-c-reference.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter scope and nesting on elements</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+ <div><span>B</span><span>1</span><span>-</span><span>B</span><span>2</span><span>-</span><span>B</span><span>2.1</span><span>-</span><span>B</span><span>2.2</span><span>-</span><span>A</span><span>2.3</span><span>-</span><span>B</span><span>2.4</span><span>-</span><span>A</span><span>2.5</span><span>-</span><span>A</span><span>2.6</span><span>-</span><span>B</span><span>2.7</span><span>-</span><span>B</span><span>2.8</span><span>-</span><span>A</span><span>2.9</span><span>-</span><span>A</span><span>2.10</span><span>-</span><span>A</span><span>2.11</span><span>-</span><span>A</span><span>3</span><span>-</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120401-scope-01-c-test.html b/layout/reftests/counters/t120401-scope-01-c-test.html
new file mode 100644
index 000000000..1f75f74fb
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-01-c-test.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter scope and nesting on elements</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ span:before { counter-increment: c 1; content: "B" counters(c,".") "-" }
+ span:after { counter-increment: c 1; content: "A" counters(c,".") "-" }
+
+ body, span#reset { counter-reset: c 0; }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span><span><span id="reset"><span></span><span></span></span><span><span></span></span></span></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120401-scope-02-c-reference.html b/layout/reftests/counters/t120401-scope-02-c-reference.html
new file mode 100644
index 000000000..ff2281a8c
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-02-c-reference.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter scope and nesting on :before</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+ <div><span>B</span><span>1</span><span>-</span><span>B</span><span>1.1</span><span>-</span><span>B</span><span>1.2</span><span>-</span><span>A</span><span>1.3</span><span>-</span><span>A</span><span>1.4</span><span>-</span><span>A</span><span>2</span><span>-</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120401-scope-02-c-test.html b/layout/reftests/counters/t120401-scope-02-c-test.html
new file mode 100644
index 000000000..40bc787f2
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-02-c-test.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter scope and nesting on :before</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ span:before { counter-increment: c 1; content: "B" counters(c,".") "-" }
+ span:after { counter-increment: c 1; content: "A" counters(c,".") "-" }
+
+ body, span#reset:before { counter-reset: c 0; }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span><span id="reset"><span></span></span></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120401-scope-03-c-reference.html b/layout/reftests/counters/t120401-scope-03-c-reference.html
new file mode 100644
index 000000000..e1da0eb56
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-03-c-reference.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter scope and nesting on :after</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+ <div><span>B</span><span>1</span><span>-</span><span>B</span><span>2</span><span>-</span><span>B</span><span>3</span><span>-</span><span>A</span><span>4</span><span>-</span><span>A</span><span>4.1</span><span>-</span><span>A</span><span>5</span><span>-</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120401-scope-03-c-test.html b/layout/reftests/counters/t120401-scope-03-c-test.html
new file mode 100644
index 000000000..553207287
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-03-c-test.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter scope and nesting on :after</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ span:before { counter-increment: c 1; content: "B" counters(c,".") "-" }
+ span:after { counter-increment: c 1; content: "A" counters(c,".") "-" }
+
+ body, span#reset:after { counter-reset: c 0; }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span><span id="reset"><span></span></span></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120401-scope-04-d-reference.html b/layout/reftests/counters/t120401-scope-04-d-reference.html
new file mode 100644
index 000000000..ff1dba44c
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-04-d-reference.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter scope and nesting</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+ <div><span>1 </span><span>1 </span><span>R</span><span>1.1 </span><span>1.1 </span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120401-scope-04-d-test.html b/layout/reftests/counters/t120401-scope-04-d-test.html
new file mode 100644
index 000000000..214137ef6
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-04-d-test.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter scope and nesting</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ .reset { counter-reset: c; }
+ .rb:before { counter-reset: c; content: "R"; }
+ .use { counter-increment: c; }
+ .use:before { content: counters(c, ".") " "; }
+
+ </style>
+ </head>
+ <body>
+
+ <div><span class="reset"></span><span class="use"></span><span class="reset"></span><span class="use"></span><span class="rb"><span class="use"></span><span class="reset"></span><span class="use"></span></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120403-content-none-00-c-reference.html b/layout/reftests/counters/t120403-content-none-00-c-reference.html
new file mode 100644
index 000000000..78053a971
--- /dev/null
+++ b/layout/reftests/counters/t120403-content-none-00-c-reference.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter properties on 'content: none' pseudo-elements</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#q9"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+ <div><span>0</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120403-content-none-00-c-test.html b/layout/reftests/counters/t120403-content-none-00-c-test.html
new file mode 100644
index 000000000..6ea67aa07
--- /dev/null
+++ b/layout/reftests/counters/t120403-content-none-00-c-test.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter properties on 'content: none' pseudo-elements</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#q9"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ div { counter-reset: c }
+ #one:before { counter-increment: c }
+ #two:before { content: counter(c) }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span id="one"></span><span id="two"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120403-display-none-00-c-reference.html b/layout/reftests/counters/t120403-display-none-00-c-reference.html
new file mode 100644
index 000000000..a7ae167c0
--- /dev/null
+++ b/layout/reftests/counters/t120403-display-none-00-c-reference.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter properties on 'display: none' elements</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#q9"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+ <div><span>0</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120403-display-none-00-c-test.html b/layout/reftests/counters/t120403-display-none-00-c-test.html
new file mode 100644
index 000000000..33180006d
--- /dev/null
+++ b/layout/reftests/counters/t120403-display-none-00-c-test.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter properties on 'display: none' elements</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#q9"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ div { counter-reset: c }
+ #one { display: none; counter-increment: c }
+ #two:before { content: counter(c) }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span id="one"></span><span id="two"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120403-visibility-00-c-reference.html b/layout/reftests/counters/t120403-visibility-00-c-reference.html
new file mode 100644
index 000000000..99470c1de
--- /dev/null
+++ b/layout/reftests/counters/t120403-visibility-00-c-reference.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter properties on 'visibility: hidden' elements</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#q9"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ </head>
+ <body>
+
+
+ <div><span>1</span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/t120403-visibility-00-c-test.html b/layout/reftests/counters/t120403-visibility-00-c-test.html
new file mode 100644
index 000000000..9246519d8
--- /dev/null
+++ b/layout/reftests/counters/t120403-visibility-00-c-test.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS 2.1 Test Suite: Counter properties on 'visibility: hidden' elements</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#q9"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
+ <style type="text/css">
+
+ div { counter-reset: c }
+ #one { visibility: hidden; counter-increment: c }
+ #two:before { content: counter(c) }
+
+ </style>
+ </head>
+ <body>
+
+
+ <div><span id="one"></span><span id="two"></span></div>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/text-boundaries-subpixel-ref.html b/layout/reftests/counters/text-boundaries-subpixel-ref.html
new file mode 100644
index 000000000..6c24c588b
--- /dev/null
+++ b/layout/reftests/counters/text-boundaries-subpixel-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Test that inline boundaries don't change subpixel positioning of text</title>
+ </head>
+ <body>
+
+ <!--
+ Since we changed all the other counters tests to NOT test this, we
+ should make sure we still test it.
+ -->
+
+ <p>This is some text with inline elements in it.</p>
+ <p>This-is-some-text-with-inline-elements-in-it.</p>
+
+ </body>
+</html>
diff --git a/layout/reftests/counters/text-boundaries-subpixel.html b/layout/reftests/counters/text-boundaries-subpixel.html
new file mode 100644
index 000000000..7117569aa
--- /dev/null
+++ b/layout/reftests/counters/text-boundaries-subpixel.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Test that inline boundaries don't change subpixel positioning of text</title>
+ </head>
+ <body>
+
+ <!--
+ Since we changed all the other counters tests to NOT test this, we
+ should make sure we still test it.
+ -->
+
+ <p>This <span>is </span>some text<span> with </span>inline <span>elements</span> in<span> it</span>.</p>
+ <p>This-<span>is-</span>some-text<span>-with-</span>inline-<span>elements</span>-in<span>-it</span>.</p>
+
+ </body>
+</html>