summaryrefslogtreecommitdiffstats
path: root/layout/reftests/counter-style
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/counter-style
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/counter-style')
-rw-r--r--layout/reftests/counter-style/dependent-builtin-ref.html12
-rw-r--r--layout/reftests/counter-style/dependent-builtin.html12
-rw-r--r--layout/reftests/counter-style/descriptor-fallback-invalid-ref.html7
-rw-r--r--layout/reftests/counter-style/descriptor-fallback-invalid.html13
-rw-r--r--layout/reftests/counter-style/descriptor-fallback-ref.html32
-rw-r--r--layout/reftests/counter-style/descriptor-fallback.html34
-rw-r--r--layout/reftests/counter-style/descriptor-negative-invalid-ref.html7
-rw-r--r--layout/reftests/counter-style/descriptor-negative-invalid.html14
-rw-r--r--layout/reftests/counter-style/descriptor-negative-ref.html14
-rw-r--r--layout/reftests/counter-style/descriptor-negative.html18
-rw-r--r--layout/reftests/counter-style/descriptor-pad-invalid-ref.html7
-rw-r--r--layout/reftests/counter-style/descriptor-pad-invalid.html14
-rw-r--r--layout/reftests/counter-style/descriptor-pad-ref.html28
-rw-r--r--layout/reftests/counter-style/descriptor-pad.html39
-rw-r--r--layout/reftests/counter-style/descriptor-prefix-invalid-ref.html7
-rw-r--r--layout/reftests/counter-style/descriptor-prefix-invalid.html14
-rw-r--r--layout/reftests/counter-style/descriptor-prefix-ref.html14
-rw-r--r--layout/reftests/counter-style/descriptor-prefix.html23
-rw-r--r--layout/reftests/counter-style/descriptor-range-invalid-ref.html7
-rw-r--r--layout/reftests/counter-style/descriptor-range-invalid.html14
-rw-r--r--layout/reftests/counter-style/descriptor-range-ref.html19
-rw-r--r--layout/reftests/counter-style/descriptor-range.html14
-rw-r--r--layout/reftests/counter-style/descriptor-suffix-invalid-ref.html7
-rw-r--r--layout/reftests/counter-style/descriptor-suffix-invalid.html14
-rw-r--r--layout/reftests/counter-style/descriptor-suffix-ref.html25
-rw-r--r--layout/reftests/counter-style/descriptor-suffix.html36
-rw-r--r--layout/reftests/counter-style/descriptor-symbols-invalid-ref.html14
-rw-r--r--layout/reftests/counter-style/descriptor-symbols-invalid.html22
-rw-r--r--layout/reftests/counter-style/descriptor-symbols-ref.html13
-rw-r--r--layout/reftests/counter-style/descriptor-symbols.html18
-rw-r--r--layout/reftests/counter-style/disclosure-styles-ref.html34
-rw-r--r--layout/reftests/counter-style/disclosure-styles.html27
-rw-r--r--layout/reftests/counter-style/name-case-sensitivity-ref.html74
-rw-r--r--layout/reftests/counter-style/name-case-sensitivity.html74
-rw-r--r--layout/reftests/counter-style/redefine-attr-mapping-ref.html52
-rw-r--r--layout/reftests/counter-style/redefine-attr-mapping.html68
-rw-r--r--layout/reftests/counter-style/redefine-builtin-ref.html7
-rw-r--r--layout/reftests/counter-style/redefine-builtin.html18
-rw-r--r--layout/reftests/counter-style/ref-common.css12
-rw-r--r--layout/reftests/counter-style/reftest-stylo.list38
-rw-r--r--layout/reftests/counter-style/reftest.list35
-rw-r--r--layout/reftests/counter-style/symbols-function-invalid-ref.html11
-rw-r--r--layout/reftests/counter-style/symbols-function-invalid.html18
-rw-r--r--layout/reftests/counter-style/symbols-function-ref.html86
-rw-r--r--layout/reftests/counter-style/symbols-function.html67
-rw-r--r--layout/reftests/counter-style/system-additive-invalid.html11
-rw-r--r--layout/reftests/counter-style/system-additive-ref.html38
-rw-r--r--layout/reftests/counter-style/system-additive.html39
-rw-r--r--layout/reftests/counter-style/system-alphabetic-invalid.html19
-rw-r--r--layout/reftests/counter-style/system-alphabetic-ref.html12
-rw-r--r--layout/reftests/counter-style/system-alphabetic.html13
-rw-r--r--layout/reftests/counter-style/system-common-invalid-ref.html5
-rw-r--r--layout/reftests/counter-style/system-common-invalid2-ref.html8
-rw-r--r--layout/reftests/counter-style/system-cyclic-invalid.html11
-rw-r--r--layout/reftests/counter-style/system-cyclic-ref.html14
-rw-r--r--layout/reftests/counter-style/system-cyclic.html20
-rw-r--r--layout/reftests/counter-style/system-extends-invalid-ref.html16
-rw-r--r--layout/reftests/counter-style/system-extends-invalid.html41
-rw-r--r--layout/reftests/counter-style/system-extends-ref.html24
-rw-r--r--layout/reftests/counter-style/system-extends.html22
-rw-r--r--layout/reftests/counter-style/system-fixed-invalid.html18
-rw-r--r--layout/reftests/counter-style/system-fixed-ref.html24
-rw-r--r--layout/reftests/counter-style/system-fixed.html22
-rw-r--r--layout/reftests/counter-style/system-numeric-invalid.html19
-rw-r--r--layout/reftests/counter-style/system-numeric-ref.html13
-rw-r--r--layout/reftests/counter-style/system-numeric.html13
-rw-r--r--layout/reftests/counter-style/system-symbolic-invalid.html11
-rw-r--r--layout/reftests/counter-style/system-symbolic-ref.html22
-rw-r--r--layout/reftests/counter-style/system-symbolic.html22
-rw-r--r--layout/reftests/counter-style/test-common.css18
70 files changed, 1608 insertions, 0 deletions
diff --git a/layout/reftests/counter-style/dependent-builtin-ref.html b/layout/reftests/counter-style/dependent-builtin-ref.html
new file mode 100644
index 000000000..5ec305c52
--- /dev/null
+++ b/layout/reftests/counter-style/dependent-builtin-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<div>&#x4e00;&#x5343;&#x3001;</div>
+<div>&#x4e00;&#x5343;&#x96f6;&#x4e00;&#x3001;</div>
+<div>&#x4e00;&#x5343;&#x96f6;&#x4e8c;&#x3001;</div>
+<div>&#x4e00;&#x5343;&#x96f6;&#x4e09;&#x3001;</div>
+<div>&#x4e00;&#x5343;&#x96f6;&#x56db;&#x3001;</div>
+<div>&#x4e00;&#x3007;&#x3007;&#x4e94;&#x3001;</div>
+<div>&#x4e00;&#x3007;&#x3007;&#x516d;&#x3001;</div>
+<div>&#x4e00;&#x3007;&#x3007;&#x4e03;&#x3001;</div>
+<div>&#x4e00;&#x3007;&#x3007;&#x516b;&#x3001;</div>
+<div>&#x4e00;&#x3007;&#x3007;&#x4e5d;&#x3001;</div>
diff --git a/layout/reftests/counter-style/dependent-builtin.html b/layout/reftests/counter-style/dependent-builtin.html
new file mode 100644
index 000000000..999bfc33b
--- /dev/null
+++ b/layout/reftests/counter-style/dependent-builtin.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends simp-chinese-informal;
+ range: 1000 1004;
+ }
+</style>
+<ol start="1000" style="list-style-type: a">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-fallback-invalid-ref.html b/layout/reftests/counter-style/descriptor-fallback-invalid-ref.html
new file mode 100644
index 000000000..e739bd08d
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-fallback-invalid-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<div>00.&nbsp;</div>
+<div>A.&nbsp;</div>
+<div>B.&nbsp;</div>
+<div>C.&nbsp;</div>
+<div>D.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-fallback-invalid.html b/layout/reftests/counter-style/descriptor-fallback-invalid.html
new file mode 100644
index 000000000..e75cf1906
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-fallback-invalid.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends upper-alpha;
+ fallback: decimal-leading-zero;
+ fallback: decimal cjk-decimal;
+ fallback: "*";
+ }
+</style>
+<ol start="0" style="list-style-type: a">
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-fallback-ref.html b/layout/reftests/counter-style/descriptor-fallback-ref.html
new file mode 100644
index 000000000..090afcb8e
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-fallback-ref.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>a.&nbsp;</div>
+<div>b.&nbsp;</div>
+<div>c.&nbsp;</div>
+<div>d.&nbsp;</div>
+<div>e.&nbsp;</div>
+<div>f.&nbsp;</div>
+<div>7.&nbsp;</div>
+<div>8.&nbsp;</div>
+<div>9.&nbsp;</div>
+<!-- list-style-type: b -->
+<div>a.&nbsp;</div>
+<div>b.&nbsp;</div>
+<div>c.&nbsp;</div>
+<div>d.&nbsp;</div>
+<div>e.&nbsp;</div>
+<div>f.&nbsp;</div>
+<div>7.&nbsp;</div>
+<div>8.&nbsp;</div>
+<div>9.&nbsp;</div>
+<!-- list-style-type: c -->
+<div>a.&nbsp;</div>
+<div>b.&nbsp;</div>
+<div>c.&nbsp;</div>
+<div>d.&nbsp;</div>
+<div>e.&nbsp;</div>
+<div>f.&nbsp;</div>
+<div>g.&nbsp;</div>
+<div>h.&nbsp;</div>
+<div>i.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-fallback.html b/layout/reftests/counter-style/descriptor-fallback.html
new file mode 100644
index 000000000..deeccd316
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-fallback.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: fixed;
+ symbols: a b c;
+ fallback: b;
+ }
+ @counter-style b {
+ system: fixed 4;
+ symbols: d e f;
+ fallback: a;
+ }
+ @counter-style c {
+ system: fixed 7;
+ symbols: g h i;
+ fallback: a;
+ }
+</style>
+<ol style="list-style-type: a">
+ <li><li><li>
+ <li><li><li>
+ <li><li><li>
+</ol>
+<ol style="list-style-type: b">
+ <li><li><li>
+ <li><li><li>
+ <li><li><li>
+</ol>
+<ol style="list-style-type: c">
+ <li><li><li>
+ <li><li><li>
+ <li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-negative-invalid-ref.html b/layout/reftests/counter-style/descriptor-negative-invalid-ref.html
new file mode 100644
index 000000000..1f9a17eaa
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-negative-invalid-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<div>!2.&nbsp;</div>
+<div>!1.&nbsp;</div>
+<div>0.&nbsp;</div>
+<div>1.&nbsp;</div>
+<div>2.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-negative-invalid.html b/layout/reftests/counter-style/descriptor-negative-invalid.html
new file mode 100644
index 000000000..e7f93ff08
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-negative-invalid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends decimal;
+ negative: '!';
+ negative: 0;
+ negative: ~;
+ negative: '(' 'x' ')';
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-negative-ref.html b/layout/reftests/counter-style/descriptor-negative-ref.html
new file mode 100644
index 000000000..447e9c4bc
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-negative-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>&#x207B;2.&nbsp;</div>
+<div>&#x207B;1.&nbsp;</div>
+<div>0.&nbsp;</div>
+<div>1.&nbsp;</div>
+<div>2.&nbsp;</div>
+<!-- list-style-type: b -->
+<div>(2).&nbsp;</div>
+<div>(1).&nbsp;</div>
+<div>0.&nbsp;</div>
+<div>1.&nbsp;</div>
+<div>2.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-negative.html b/layout/reftests/counter-style/descriptor-negative.html
new file mode 100644
index 000000000..f55f5699f
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-negative.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends decimal;
+ negative: \207B;
+ }
+ @counter-style b {
+ system: extends decimal;
+ negative: '(' ')';
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" style="list-style-type: b">
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-pad-invalid-ref.html b/layout/reftests/counter-style/descriptor-pad-invalid-ref.html
new file mode 100644
index 000000000..d54cd8723
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-pad-invalid-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<div>001.&nbsp;</div>
+<div>002.&nbsp;</div>
+<div>003.&nbsp;</div>
+<div>004.&nbsp;</div>
+<div>005.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-pad-invalid.html b/layout/reftests/counter-style/descriptor-pad-invalid.html
new file mode 100644
index 000000000..45ccf9e79
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-pad-invalid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends decimal;
+ pad: 3 "0";
+ pad: -1 "X";
+ pad: "#";
+ pad: 2 0;
+ }
+</style>
+<ol style="list-style-type: a">
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-pad-ref.html b/layout/reftests/counter-style/descriptor-pad-ref.html
new file mode 100644
index 000000000..e817f71c2
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-pad-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>-III.&nbsp;</div>
+<div>-*II.&nbsp;</div>
+<div>-**I.&nbsp;</div>
+<div>0.&nbsp;</div>
+<div>**I.&nbsp;</div>
+<div>*II.&nbsp;</div>
+<div>III.&nbsp;</div>
+<div>*IV.&nbsp;</div>
+<div>**V.&nbsp;</div>
+<div>6.&nbsp;</div>
+<!-- list-style-type: b -->
+<div>(002).&nbsp;</div>
+<div>(001).&nbsp;</div>
+<div>000.&nbsp;</div>
+<div>001.&nbsp;</div>
+<div>002.&nbsp;</div>
+<!-- list-style-type: c -->
+<div>ooa&#x0304;</div>
+<div>ooa&#x0301;</div>
+<div>oa&#x0304;a&#x0301;</div>
+<div>oa&#x030c;a&#x0300;</div>
+<div>a&#x0304;a&#x0301;a&#x030c;</div>
+<div>a&#x0300;a&#x0304;a&#x0301;</div>
+<!-- list-style-type: d -->
+<div>001.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-pad.html b/layout/reftests/counter-style/descriptor-pad.html
new file mode 100644
index 000000000..62b6a1ca1
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-pad.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends upper-roman;
+ range: infinite 5;
+ pad: 3 '*';
+ }
+ @counter-style b {
+ system: extends decimal;
+ negative: '(' ')';
+ pad: 3 '0';
+ }
+ @counter-style c {
+ system: alphabetic;
+ symbols: a\0304 a\0301 a\030c a\0300;
+ pad: 3 o;
+ suffix: '';
+ }
+ @counter-style d {
+ system: extends decimal;
+ pad: '0' 3;
+ }
+</style>
+<ol start="-3" style="list-style-type: a">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" style="list-style-type: b">
+ <li><li><li><li><li>
+</ol>
+<ol style="list-style-type: c">
+ <li><li>
+ <li value="6"><li value="16">
+ <li value="27"><li value="70">
+</ol>
+<ol style="list-style-type: d">
+ <li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-prefix-invalid-ref.html b/layout/reftests/counter-style/descriptor-prefix-invalid-ref.html
new file mode 100644
index 000000000..abd4f70ab
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-prefix-invalid-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<div>#-2.&nbsp;</div>
+<div>#-1.&nbsp;</div>
+<div>#0.&nbsp;</div>
+<div>#1.&nbsp;</div>
+<div>#2.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-prefix-invalid.html b/layout/reftests/counter-style/descriptor-prefix-invalid.html
new file mode 100644
index 000000000..2e4b32372
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-prefix-invalid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends decimal;
+ prefix: "#";
+ prefix: *;
+ prefix: 0;
+ prefix: '$' '$';
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-prefix-ref.html b/layout/reftests/counter-style/descriptor-prefix-ref.html
new file mode 100644
index 000000000..b1e4a37ce
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-prefix-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- ol -->
+<div>Appendix -2.&nbsp;</div>
+<div>Appendix -1.&nbsp;</div>
+<div>Appendix 0.&nbsp;</div>
+<div>Appendix I.&nbsp;</div>
+<div>Appendix II.&nbsp;</div>
+<!-- section -->
+<p>-2</p>
+<p>-1</p>
+<p>0</p>
+<p>I</p>
+<p>II</p>
diff --git a/layout/reftests/counter-style/descriptor-prefix.html b/layout/reftests/counter-style/descriptor-prefix.html
new file mode 100644
index 000000000..805115498
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-prefix.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends upper-roman;
+ prefix: "Appendix ";
+ }
+ section {
+ counter-reset: p -3;
+ }
+ p {
+ counter-increment: p;
+ }
+ p::before {
+ content: counter(p, a);
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+</ol>
+<section>
+ <p><p><p><p><p>
+</section>
diff --git a/layout/reftests/counter-style/descriptor-range-invalid-ref.html b/layout/reftests/counter-style/descriptor-range-invalid-ref.html
new file mode 100644
index 000000000..13cb14c6f
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-range-invalid-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<div>a.&nbsp;</div>
+<div>b.&nbsp;</div>
+<div>3.&nbsp;</div>
+<div>4.&nbsp;</div>
+<div>5.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-range-invalid.html b/layout/reftests/counter-style/descriptor-range-invalid.html
new file mode 100644
index 000000000..34a21998a
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-range-invalid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends lower-alpha;
+ range: 1 2;
+ range: 1;
+ range: 3 1;
+ range: xx yy;
+ }
+</style>
+<ol style="list-style-type: a">
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-range-ref.html b/layout/reftests/counter-style/descriptor-range-ref.html
new file mode 100644
index 000000000..10dc59215
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-range-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<div>-III.&nbsp;</div>
+<div>-2.&nbsp;</div>
+<div>-I.&nbsp;</div>
+<div>0.&nbsp;</div>
+<div>I.&nbsp;</div>
+<div>II.&nbsp;</div>
+<div>3.&nbsp;</div>
+<div>IV.&nbsp;</div>
+<div>5.&nbsp;</div>
+<div>6.&nbsp;</div>
+<div>VII.&nbsp;</div>
+<div>VIII.&nbsp;</div>
+<div>IX.&nbsp;</div>
+<div>10.&nbsp;</div>
+<div>XI.&nbsp;</div>
+<div>MMMCMXCIX.&nbsp;</div>
+<div>MMMM.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-range.html b/layout/reftests/counter-style/descriptor-range.html
new file mode 100644
index 000000000..9d57f5d1a
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-range.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends upper-roman;
+ range: infinite -3, -1 2, 4 4, 7 9, 11 infinite;
+ }
+</style>
+<ol start="-3" style="list-style-type: a">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+ <li value="3999"><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-suffix-invalid-ref.html b/layout/reftests/counter-style/descriptor-suffix-invalid-ref.html
new file mode 100644
index 000000000..5213feedd
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-suffix-invalid-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<div>-2,</div>
+<div>-1,</div>
+<div>0,</div>
+<div>1,</div>
+<div>2,</div>
diff --git a/layout/reftests/counter-style/descriptor-suffix-invalid.html b/layout/reftests/counter-style/descriptor-suffix-invalid.html
new file mode 100644
index 000000000..4918226ca
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-suffix-invalid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends decimal;
+ suffix: ',';
+ suffix: *;
+ suffix: 0;
+ suffix: '$' '$';
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-suffix-ref.html b/layout/reftests/counter-style/descriptor-suffix-ref.html
new file mode 100644
index 000000000..1fc40a371
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-suffix-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<style type="text/css">
+ div {
+ padding: 0; margin: 0;
+ line-height: 150%;
+ }
+</style>
+<!-- list-style-type: a -->
+<div>-2,-2</div>
+<div>-1,-1</div>
+<div>0,0</div>
+<div>1,1</div>
+<div>2,2</div>
+<!-- list-style-type: b -->
+<div>-2&#x3001;-2</div>
+<div>-1&#x3001;-1</div>
+<div>0&#x3001;0</div>
+<div>1&#x3001;1</div>
+<div>2&#x3001;2</div>
+<!-- section -->
+<div>-2</div>
+<div>-1</div>
+<div>0</div>
+<div>1</div>
+<div>2</div>
diff --git a/layout/reftests/counter-style/descriptor-suffix.html b/layout/reftests/counter-style/descriptor-suffix.html
new file mode 100644
index 000000000..6b01c7cbe
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-suffix.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<style type="text/css">
+ @counter-style a {
+ system: extends decimal;
+ suffix: ",";
+ }
+ @counter-style b {
+ system: extends decimal;
+ suffix: \3001;
+ }
+ ol {
+ list-style-position: inside;
+ }
+ ol, section, p {
+ padding: 0; margin: 0;
+ line-height: 150%;
+ }
+ section {
+ counter-reset: p -3;
+ }
+ p {
+ counter-increment: p;
+ }
+ p::before {
+ content: counter(p, a);
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li>-2<li>-1<li>0<li>1<li>2
+</ol>
+<ol start="-2" style="list-style-type: b">
+ <li>-2<li>-1<li>0<li>1<li>2
+</ol>
+<section>
+ <p><p><p><p><p>
+</section>
diff --git a/layout/reftests/counter-style/descriptor-symbols-invalid-ref.html b/layout/reftests/counter-style/descriptor-symbols-invalid-ref.html
new file mode 100644
index 000000000..fc485c5d4
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-symbols-invalid-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>a.&nbsp;</div>
+<div>b.&nbsp;</div>
+<div>c.&nbsp;</div>
+<div>4.&nbsp;</div>
+<div>5.&nbsp;</div>
+<!-- list-style-type: b -->
+<div>a.&nbsp;</div>
+<div>b.&nbsp;</div>
+<div>c.&nbsp;</div>
+<div>ca.&nbsp;</div>
+<div>cb.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-symbols-invalid.html b/layout/reftests/counter-style/descriptor-symbols-invalid.html
new file mode 100644
index 000000000..d1482145e
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-symbols-invalid.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: fixed;
+ symbols: a b c;
+ symbols: 0 1 2;
+ }
+ @counter-style b {
+ system: additive;
+ additive-symbols: 3 c, 2 b, 1 a;
+ additive-symbols: 1 x, 2 y, 3 z;
+ additive-symbols: x, y, z;
+ additive-symbols: 1, 2, 3;
+ }
+</style>
+<ol style="list-style-type: a">
+ <li><li><li><li><li>
+</ol>
+<ol style="list-style-type: b">
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/descriptor-symbols-ref.html b/layout/reftests/counter-style/descriptor-symbols-ref.html
new file mode 100644
index 000000000..914faba60
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-symbols-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>a.&nbsp;</div>
+<div>b.&nbsp;</div>
+<div>c.&nbsp;</div>
+<!-- list-style-type: b -->
+<div>a.&nbsp;</div>
+<div>b.&nbsp;</div>
+<div>c.&nbsp;</div>
+<div>d.&nbsp;</div>
+<div>e.&nbsp;</div>
+<div>f.&nbsp;</div>
diff --git a/layout/reftests/counter-style/descriptor-symbols.html b/layout/reftests/counter-style/descriptor-symbols.html
new file mode 100644
index 000000000..a1028285e
--- /dev/null
+++ b/layout/reftests/counter-style/descriptor-symbols.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: fixed;
+ symbols: a "b" \63;
+ }
+ @counter-style b {
+ system: additive;
+ additive-symbols: \66 6, 'e' 5, d 4, 3 \63, 2 "b", 1 a;
+ }
+</style>
+<ol style="list-style-type: a">
+ <li><li><li>
+</ol>
+<ol style="list-style-type: b">
+ <li><li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/disclosure-styles-ref.html b/layout/reftests/counter-style/disclosure-styles-ref.html
new file mode 100644
index 000000000..0abaff534
--- /dev/null
+++ b/layout/reftests/counter-style/disclosure-styles-ref.html
@@ -0,0 +1,34 @@
+<style type="text/css">
+ @counter-style disclosure-closed2-ltr {
+ system: cyclic;
+ symbols: \25b8;
+ suffix: ' ';
+ }
+ @counter-style disclosure-closed2-rtl {
+ system: cyclic;
+ symbols: \25c2;
+ suffix: ' ';
+ }
+ @counter-style disclosure-open2 {
+ system: cyclic;
+ symbols: \25be;
+ suffix: ' ';
+ }
+ .open { list-style-type: disclosure-open2; }
+ .closed:dir(ltr) { list-style-type: disclosure-closed2-ltr; }
+ .closed:dir(rtl) { list-style-type: disclosure-closed2-rtl; }
+ ul {
+ padding: 0;
+ list-style-position: inside;
+ }
+</style>
+<ul dir="ltr">
+ <li class="closed">closed ltr
+ <li class="open">open ltr
+</ul>
+<ul dir="rtl">
+ <li class="closed">closed rtl
+ <li class="open">open rtl
+</ul>
+<p dir="ltr">&#x25b8;&nbsp;closed ltr
+<p dir="rtl">&#x25c2;&nbsp;closed rtl
diff --git a/layout/reftests/counter-style/disclosure-styles.html b/layout/reftests/counter-style/disclosure-styles.html
new file mode 100644
index 000000000..86908da14
--- /dev/null
+++ b/layout/reftests/counter-style/disclosure-styles.html
@@ -0,0 +1,27 @@
+<style type="text/css">
+ @counter-style disclosure-closed2 {
+ system: extends disclosure-closed;
+ }
+ @counter-style disclosure-open2 {
+ system: extends disclosure-open;
+ }
+ ul {
+ padding: 0;
+ list-style-position: inside;
+ }
+ .closed { list-style-type: disclosure-closed2; }
+ .open { list-style-type: disclosure-open2; }
+ p::before {
+ content: counter(a, disclosure-closed) " ";
+ }
+</style>
+<ul dir="ltr">
+ <li class="closed">closed ltr
+ <li class="open">open ltr
+</ul>
+<ul dir="rtl">
+ <li class="closed">closed rtl
+ <li class="open">open rtl
+</ul>
+<p dir="ltr">closed ltr
+<p dir="rtl">closed rtl
diff --git a/layout/reftests/counter-style/name-case-sensitivity-ref.html b/layout/reftests/counter-style/name-case-sensitivity-ref.html
new file mode 100644
index 000000000..72b1ffde0
--- /dev/null
+++ b/layout/reftests/counter-style/name-case-sensitivity-ref.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<style type="text/css">
+ ol, div, p {
+ padding: 0; margin: 0;
+ line-height: 150%;
+ }
+ ol {
+ list-style-position: inside;
+ }
+ li, div, p {
+ float: left;
+ }
+ @counter-style decimal-leading-zero {
+ system: extends decimal;
+ pad: 3 '0';
+ }
+ @counter-style custom-style {
+ system: cyclic;
+ symbols: \2023;
+ }
+</style>
+
+<!-- list-style -->
+<ol><li style="list-style: hiragana inside;"></li></ol>
+<ol><li style="list-style: decimal-leading-zero inside;"></li></ol>
+<ol><li style="list-style: custom-style inside;"></li></ol>
+<ol><li style="list-style: decimal inside;"></li></ol>
+
+<!-- list-style-type -->
+<ol><li style="list-style-type: hiragana;"></li></ol>
+<ol><li style="list-style-type: decimal-leading-zero;"></li></ol>
+<ol><li style="list-style-type: custom-style;"></li></ol>
+<ol><li style="list-style-type: decimal;"></li></ol>
+
+<!-- counter() -->
+<style type="text/css">
+ #counter { counter-reset: a 1; }
+ #counter-a::before { content: counter(a, hiragana); }
+ #counter-b::before { content: counter(a, decimal-leading-zero); }
+ #counter-c::before { content: counter(a, custom-style); }
+ #counter-d::before { content: counter(a, decimal); }
+</style>
+<div id="counter">
+ <p id="counter-a"></p>
+ <p id="counter-b"></p>
+ <p id="counter-c"></p>
+ <p id="counter-d"></p>
+</div>
+
+<!-- counters() -->
+<style type="text/css">
+ #counters { counter-reset: a 1; }
+ #counters-a::before { content: counters(a, '', hiragana); }
+ #counters-b::before { content: counters(a, '', decimal-leading-zero); }
+ #counters-c::before { content: counters(a, '', custom-style); }
+ #counters-d::before { content: counters(a, '', decimal); }
+</style>
+<div id="counters">
+ <p id="counters-a"></p>
+ <p id="counters-b"></p>
+ <p id="counters-c"></p>
+ <p id="counters-d"></p>
+</div>
+
+<style type="text/css">
+ @counter-style a { system: extends hiragana; }
+ @counter-style b { system: extends decimal-leading-zero; }
+ @counter-style c { system: extends custom-style; }
+ @counter-style d { system: extends decimal; }
+</style>
+<ol><li style="list-style-type: a;"></li></ol>
+<ol><li style="list-style-type: b;"></li></ol>
+<ol><li style="list-style-type: c;"></li></ol>
+<ol><li style="list-style-type: d;"></li></ol>
diff --git a/layout/reftests/counter-style/name-case-sensitivity.html b/layout/reftests/counter-style/name-case-sensitivity.html
new file mode 100644
index 000000000..d9703b1ae
--- /dev/null
+++ b/layout/reftests/counter-style/name-case-sensitivity.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<style type="text/css">
+ ol, div, p {
+ padding: 0; margin: 0;
+ line-height: 150%;
+ }
+ ol {
+ list-style-position: inside;
+ }
+ li, div, p {
+ float: left;
+ }
+ @counter-style decimal-leading-zero {
+ system: extends decimal;
+ pad: 3 '0';
+ }
+ @counter-style custom-style {
+ system: cyclic;
+ symbols: \2023;
+ }
+</style>
+
+<!-- list-style -->
+<ol><li style="list-style: Hiragana inside;"></li></ol>
+<ol><li style="list-style: Decimal-Leading-Zero inside;"></li></ol>
+<ol><li style="list-style: custom-style inside;"></li></ol>
+<ol><li style="list-style: Custom-Style inside;"></li></ol>
+
+<!-- list-style-type -->
+<ol><li style="list-style-type: Hiragana;"></li></ol>
+<ol><li style="list-style-type: Decimal-Leading-Zero;"></li></ol>
+<ol><li style="list-style-type: custom-style;"></li></ol>
+<ol><li style="list-style-type: Custom-Style;"></li></ol>
+
+<!-- counter() -->
+<style type="text/css">
+ #counter { counter-reset: a 1; }
+ #counter-a::before { content: counter(a, Hiragana); }
+ #counter-b::before { content: counter(a, Decimal-leading-Zero); }
+ #counter-c::before { content: counter(a, custom-style); }
+ #counter-d::before { content: counter(a, Custom-Style); }
+</style>
+<div id="counter">
+ <p id="counter-a"></p>
+ <p id="counter-b"></p>
+ <p id="counter-c"></p>
+ <p id="counter-d"></p>
+</div>
+
+<!-- counters() -->
+<style type="text/css">
+ #counters { counter-reset: a 1; }
+ #counters-a::before { content: counters(a, '', Hiragana); }
+ #counters-b::before { content: counters(a, '', Decimal-leading-Zero); }
+ #counters-c::before { content: counters(a, '', custom-style); }
+ #counters-d::before { content: counters(a, '', Custom-Style); }
+</style>
+<div id="counters">
+ <p id="counters-a"></p>
+ <p id="counters-b"></p>
+ <p id="counters-c"></p>
+ <p id="counters-d"></p>
+</div>
+
+<style type="text/css">
+ @counter-style a { system: extends HiRaGaNa; }
+ @counter-style b { system: extends Decimal-leading-ZERO; }
+ @counter-style c { system: extends custom-style; }
+ @counter-style d { system: extends Custom-Style; }
+</style>
+<ol><li style="list-style-type: a;"></li></ol>
+<ol><li style="list-style-type: b;"></li></ol>
+<ol><li style="list-style-type: c;"></li></ol>
+<ol><li style="list-style-type: d;"></li></ol>
diff --git a/layout/reftests/counter-style/redefine-attr-mapping-ref.html b/layout/reftests/counter-style/redefine-attr-mapping-ref.html
new file mode 100644
index 000000000..00da621e7
--- /dev/null
+++ b/layout/reftests/counter-style/redefine-attr-mapping-ref.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style triangle {
+ system: cyclic;
+ symbols: \2023;
+ suffix: "";
+ }
+ .triangle { list-style-type: triangle; }
+ .hiragana { list-style-type: hiragana; }
+ .katakana { list-style-type: katakana; }
+ .hiragana-iroha { list-style-type: hiragana-iroha; }
+ .katakana-iroha { list-style-type: katakana-iroha; }
+</style>
+<ul class="triangle"><li></ul>
+<ul class="triangle"><li></ul>
+<ul class="triangle"><li></ul>
+<ul class="triangle"><li></ul>
+<ul class="triangle"><li></ul>
+<ul class="hiragana"><li></ul>
+<ul class="katakana"><li></ul>
+<ul class="hiragana-iroha"><li></ul>
+<ul class="katakana-iroha"><li></ul>
+<ul class="hiragana"><li></ul>
+<ul class="katakana"><li></ul>
+<ul class="hiragana-iroha"><li></ul>
+<ul class="katakana-iroha"><li></ul>
+
+<ol><li></ol>
+<ol class="triangle"><li></ol>
+<ol class="triangle"><li></ol>
+<ol class="triangle"><li></ol>
+<ol class="triangle"><li></ol>
+<ol class="hiragana"><li></ol>
+<ol class="katakana"><li></ol>
+<ol class="hiragana-iroha"><li></ol>
+<ol class="katakana-iroha"><li></ol>
+<ol class="hiragana"><li></ol>
+<ol class="katakana"><li></ol>
+<ol class="hiragana-iroha"><li></ol>
+<ol class="katakana-iroha"><li></ol>
+
+<ul>
+ <li class="triangle">
+ <li class="triangle">
+ <li class="triangle">
+ <li class="triangle">
+ <li class="hiragana">
+ <li class="katakana">
+ <li class="hiragana-iroha">
+ <li class="katakana-iroha">
+</ul>
diff --git a/layout/reftests/counter-style/redefine-attr-mapping.html b/layout/reftests/counter-style/redefine-attr-mapping.html
new file mode 100644
index 000000000..9bf262ecc
--- /dev/null
+++ b/layout/reftests/counter-style/redefine-attr-mapping.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style triangle {
+ system: cyclic;
+ symbols: \2023;
+ suffix: "";
+ }
+ @counter-style disc {
+ system: extends triangle;
+ }
+ @counter-style circle {
+ system: extends triangle;
+ }
+ @counter-style square {
+ system: extends triangle;
+ }
+ @counter-style lower-roman {
+ system: extends hiragana;
+ }
+ @counter-style upper-roman {
+ system: extends katakana;
+ }
+ @counter-style lower-alpha {
+ system: extends hiragana-iroha;
+ }
+ @counter-style upper-alpha {
+ system: extends katakana-iroha;
+ }
+</style>
+<ul><li></ul>
+<ul type="disc"><li></ul>
+<ul type="circle"><li></ul>
+<ul type="round"><li></ul>
+<ul type="square"><li></ul>
+<ul type="i"><li></ul>
+<ul type="I"><li></ul>
+<ul type="a"><li></ul>
+<ul type="A"><li></ul>
+<ul type="lower-roman"><li></ul>
+<ul type="upper-roman"><li></ul>
+<ul type="lower-alpha"><li></ul>
+<ul type="upper-alpha"><li></ul>
+
+<ol><li></ol>
+<ol type="disc"><li></ol>
+<ol type="circle"><li></ol>
+<ol type="round"><li></ol>
+<ol type="square"><li></ol>
+<ol type="i"><li></ol>
+<ol type="I"><li></ol>
+<ol type="a"><li></ol>
+<ol type="A"><li></ol>
+<ol type="lower-roman"><li></ol>
+<ol type="upper-roman"><li></ol>
+<ol type="lower-alpha"><li></ol>
+<ol type="upper-alpha"><li></ol>
+
+<ul>
+ <li type="disc">
+ <li type="circle">
+ <li type="round">
+ <li type="square">
+ <li type="i">
+ <li type="I">
+ <li type="a">
+ <li type="A">
+</ul>
diff --git a/layout/reftests/counter-style/redefine-builtin-ref.html b/layout/reftests/counter-style/redefine-builtin-ref.html
new file mode 100644
index 000000000..419b53d86
--- /dev/null
+++ b/layout/reftests/counter-style/redefine-builtin-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<ol>
+ <li style="list-style-type: none">foo
+ <li style="list-style-type: decimal">bar
+ <li style="list-style-type: cjk-decimal">
+</ol>
diff --git a/layout/reftests/counter-style/redefine-builtin.html b/layout/reftests/counter-style/redefine-builtin.html
new file mode 100644
index 000000000..60117d7a6
--- /dev/null
+++ b/layout/reftests/counter-style/redefine-builtin.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style none {
+ system: extends lower-roman;
+ }
+ @counter-style decimal {
+ system: extends upper-roman;
+ }
+ @counter-style hebrew {
+ system: extends cjk-decimal;
+ }
+</style>
+<ol>
+ <li style="list-style-type: none">foo
+ <li style="list-style-type: decimal">bar
+ <li style="list-style-type: hebrew">
+</ol>
diff --git a/layout/reftests/counter-style/ref-common.css b/layout/reftests/counter-style/ref-common.css
new file mode 100644
index 000000000..92d77de0e
--- /dev/null
+++ b/layout/reftests/counter-style/ref-common.css
@@ -0,0 +1,12 @@
+body {
+ /* to match ua.css, see bug 1020143 */
+ font-variant-numeric: tabular-nums;
+}
+div, p {
+ padding: 0; margin: 0;
+ line-height: 150%;
+ float: left;
+}
+p {
+ padding-right: .5em;
+}
diff --git a/layout/reftests/counter-style/reftest-stylo.list b/layout/reftests/counter-style/reftest-stylo.list
new file mode 100644
index 000000000..d2dfc7820
--- /dev/null
+++ b/layout/reftests/counter-style/reftest-stylo.list
@@ -0,0 +1,38 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== system-cyclic.html system-cyclic.html
+== system-fixed.html system-fixed.html
+== system-symbolic.html system-symbolic.html
+== system-alphabetic.html system-alphabetic.html
+== system-numeric.html system-numeric.html
+== system-additive.html system-additive.html
+== system-extends.html system-extends.html
+== system-cyclic-invalid.html system-cyclic-invalid.html
+== system-fixed-invalid.html system-fixed-invalid.html
+== system-symbolic-invalid.html system-symbolic-invalid.html
+== system-alphabetic-invalid.html system-alphabetic-invalid.html
+== system-numeric-invalid.html system-numeric-invalid.html
+== system-additive-invalid.html system-additive-invalid.html
+== system-extends-invalid.html system-extends-invalid.html
+== descriptor-negative.html descriptor-negative.html
+== descriptor-prefix.html descriptor-prefix.html
+fails-if(B2G||Mulet) == descriptor-suffix.html descriptor-suffix.html
+# B2G kerning
+# Initial mulet triage: parity with B2G/B2G Desktop
+== descriptor-range.html descriptor-range.html
+== descriptor-pad.html descriptor-pad.html
+== descriptor-fallback.html descriptor-fallback.html
+== descriptor-symbols.html descriptor-symbols.html
+== descriptor-negative-invalid.html descriptor-negative-invalid.html
+== descriptor-prefix-invalid.html descriptor-prefix-invalid.html
+== descriptor-suffix-invalid.html descriptor-suffix-invalid.html
+== descriptor-range-invalid.html descriptor-range-invalid.html
+== descriptor-pad-invalid.html descriptor-pad-invalid.html
+== descriptor-fallback.html descriptor-fallback.html
+== descriptor-symbols-invalid.html descriptor-symbols-invalid.html
+== name-case-sensitivity.html name-case-sensitivity.html
+== dependent-builtin.html dependent-builtin.html
+== redefine-builtin.html redefine-builtin.html
+skip == redefine-attr-mapping.html redefine-attr-mapping.html
+== disclosure-styles.html disclosure-styles.html
+== symbols-function.html symbols-function.html
+== symbols-function-invalid.html symbols-function-invalid.html
diff --git a/layout/reftests/counter-style/reftest.list b/layout/reftests/counter-style/reftest.list
new file mode 100644
index 000000000..541cca4fa
--- /dev/null
+++ b/layout/reftests/counter-style/reftest.list
@@ -0,0 +1,35 @@
+== system-cyclic.html system-cyclic-ref.html
+== system-fixed.html system-fixed-ref.html
+== system-symbolic.html system-symbolic-ref.html
+== system-alphabetic.html system-alphabetic-ref.html
+== system-numeric.html system-numeric-ref.html
+== system-additive.html system-additive-ref.html
+== system-extends.html system-extends-ref.html
+== system-cyclic-invalid.html system-common-invalid-ref.html
+== system-fixed-invalid.html system-common-invalid2-ref.html
+== system-symbolic-invalid.html system-common-invalid-ref.html
+== system-alphabetic-invalid.html system-common-invalid2-ref.html
+== system-numeric-invalid.html system-common-invalid2-ref.html
+== system-additive-invalid.html system-common-invalid-ref.html
+== system-extends-invalid.html system-extends-invalid-ref.html
+== descriptor-negative.html descriptor-negative-ref.html
+== descriptor-prefix.html descriptor-prefix-ref.html
+== descriptor-suffix.html descriptor-suffix-ref.html
+== descriptor-range.html descriptor-range-ref.html
+== descriptor-pad.html descriptor-pad-ref.html
+== descriptor-fallback.html descriptor-fallback-ref.html
+== descriptor-symbols.html descriptor-symbols-ref.html
+== descriptor-negative-invalid.html descriptor-negative-invalid-ref.html
+== descriptor-prefix-invalid.html descriptor-prefix-invalid-ref.html
+== descriptor-suffix-invalid.html descriptor-suffix-invalid-ref.html
+== descriptor-range-invalid.html descriptor-range-invalid-ref.html
+== descriptor-pad-invalid.html descriptor-pad-invalid-ref.html
+== descriptor-fallback.html descriptor-fallback-ref.html
+== descriptor-symbols-invalid.html descriptor-symbols-invalid-ref.html
+== name-case-sensitivity.html name-case-sensitivity-ref.html
+== dependent-builtin.html dependent-builtin-ref.html
+== redefine-builtin.html redefine-builtin-ref.html
+== redefine-attr-mapping.html redefine-attr-mapping-ref.html
+== disclosure-styles.html disclosure-styles-ref.html
+== symbols-function.html symbols-function-ref.html
+== symbols-function-invalid.html symbols-function-invalid-ref.html
diff --git a/layout/reftests/counter-style/symbols-function-invalid-ref.html b/layout/reftests/counter-style/symbols-function-invalid-ref.html
new file mode 100644
index 000000000..a2f2f0107
--- /dev/null
+++ b/layout/reftests/counter-style/symbols-function-invalid-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ .invalid {
+ list-style-type: lower-greek;
+ }
+</style>
+<ol start="-2" class="invalid">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/symbols-function-invalid.html b/layout/reftests/counter-style/symbols-function-invalid.html
new file mode 100644
index 000000000..eded7ed91
--- /dev/null
+++ b/layout/reftests/counter-style/symbols-function-invalid.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ .invalid {
+ list-style-type: lower-greek;
+ list-style-type: symbols(a b c);
+ list-style-type: symbols(alphabetic a b c);
+ list-style-type: symbols(numeric 0 1 2);
+ list-style-type: symbols(additive 'a' 'b');
+ list-style-type: symbols(fixed);
+ list-style-type: symbols(alphabetic 'a');
+ list-style-type: symbols(numeric '0');
+ }
+</style>
+<ol start="-2" class="invalid">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/symbols-function-ref.html b/layout/reftests/counter-style/symbols-function-ref.html
new file mode 100644
index 000000000..9383c4310
--- /dev/null
+++ b/layout/reftests/counter-style/symbols-function-ref.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style cyclic {
+ system: cyclic;
+ symbols: '*' '\2020' '\2021' '\A7';
+ suffix: ' ';
+ }
+ @counter-style numeric {
+ system: numeric;
+ symbols: '0' '1' '2';
+ suffix: ' ';
+ }
+ @counter-style alphabetic {
+ system: alphabetic;
+ symbols: '\26AA' '\26AB';
+ suffix: ' ';
+ }
+ @counter-style symbolic {
+ system: symbolic;
+ symbols: '*' '\2020' '\2021' '\A7';
+ suffix: ' ';
+ }
+ @counter-style fixed {
+ system: fixed;
+ symbols: '\25F0' '\25F1' '\25F2' '\25F3';
+ suffix: ' ';
+ }
+ @counter-style counter {
+ symbols: '*';
+ }
+ @counter-style counters {
+ system: numeric;
+ symbols: '0' '1';
+ }
+ .counter { counter-reset: a; }
+ .counter p { counter-increment: a 1; }
+ .counter p::after {
+ content: counter(a, counter);
+ }
+ .counter, .counters {
+ list-style-type: none;
+ counter-reset: a;
+ }
+ .counter li, .counters li {
+ counter-increment: a;
+ padding-right: .5em;
+ }
+ .counter li::after {
+ content: counter(a, counter);
+ }
+ .counters .counters li::after {
+ content: counters(a, '.', counters);
+ }
+</style>
+<ol start="-2" style="list-style-type: symbolic">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" style="list-style-type: cyclic">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" style="list-style-type: numeric">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" style="list-style-type: alphabetic">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" style="list-style-type: symbolic">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" style="list-style-type: fixed">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol class="counter">
+ <li><li><li><li><li>
+</ol>
+<ol class="counters">
+ <li><ol class="counters"><li><li><li><li><li></ol></li>
+ <li><ol class="counters"><li><li><li><li><li></ol></li>
+</ol>
diff --git a/layout/reftests/counter-style/symbols-function.html b/layout/reftests/counter-style/symbols-function.html
new file mode 100644
index 000000000..442e07f90
--- /dev/null
+++ b/layout/reftests/counter-style/symbols-function.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ .default {
+ list-style-type: symbols('*' '\2020' '\2021' '\A7');
+ }
+ .cyclic {
+ list-style-type: symbols(cyclic '*' '\2020' '\2021' '\A7');
+ }
+ .numeric {
+ list-style-type: symbols(numeric '0' '1' '2');
+ }
+ .alphabetic {
+ list-style-type: symbols(alphabetic '\26AA' '\26AB');
+ }
+ .symbolic {
+ list-style-type: symbols(symbolic '*' '\2020' '\2021' '\A7');
+ }
+ .fixed {
+ list-style-type: symbols(fixed '\25F0' '\25F1' '\25F2' '\25F3');
+ }
+ .counter, .counters {
+ list-style-type: none;
+ counter-reset: a;
+ }
+ .counter li, .counters li {
+ counter-increment: a;
+ padding-right: .5em;
+ }
+ .counter li::after {
+ content: counter(a, symbols('*'));
+ }
+ .counters .counters li::after {
+ content: counters(a, '.', symbols(numeric '0' '1'));
+ }
+</style>
+<ol start="-2" class="default">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" class="cyclic">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" class="numeric">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" class="alphabetic">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" class="symbolic">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" class="fixed">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol class="counter">
+ <li><li><li><li><li>
+</ol>
+<ol class="counters">
+ <li><ol class="counters"><li><li><li><li><li></ol></li>
+ <li><ol class="counters"><li><li><li><li><li></ol></li>
+</ol>
diff --git a/layout/reftests/counter-style/system-additive-invalid.html b/layout/reftests/counter-style/system-additive-invalid.html
new file mode 100644
index 000000000..1ed907b1c
--- /dev/null
+++ b/layout/reftests/counter-style/system-additive-invalid.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: additive;
+ suffix: ":";
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
diff --git a/layout/reftests/counter-style/system-additive-ref.html b/layout/reftests/counter-style/system-additive-ref.html
new file mode 100644
index 000000000..bdf05a5e5
--- /dev/null
+++ b/layout/reftests/counter-style/system-additive-ref.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>-2</div>
+<div>-1</div>
+<div>0</div>
+<div>&#x2680;</div>
+<div>&#x2681;</div>
+<div>&#x2682;</div>
+<div>&#x2683;</div>
+<div>&#x2684;</div>
+<div>&#x2685;</div>
+<div>&#x2685;&#x2680;</div>
+<div>&#x2685;&#x2683;</div>
+<div>&#x2685;&#x2684;</div>
+<div>&#x2685;&#x2685;</div>
+<div>&#x2685;&#x2685;&#x2680;</div>
+<div><script type="text/javascript">
+ document.write(Array(61).join('&#x2685;'));
+</script></div>
+<div>1000</div>
+<!-- list-style-type: b -->
+<div>-2</div>
+<div>-1</div>
+<div>&#x2637;</div>
+<div>&#x2636;</div>
+<div>&#x2635;</div>
+<!-- list-style-type: c -->
+<div>1.&nbsp;</div>
+<div>b.&nbsp;</div>
+<div>a.&nbsp;</div>
+<div>4.&nbsp;</div>
+<div>ab.&nbsp;</div>
+<!-- list-style-type: d -->
+<div><script type="text/javascript">
+ document.write(Array(61).join('&#x10300;'));
+</script>.&nbsp;</div>
+<div>100.&nbsp;</div>
diff --git a/layout/reftests/counter-style/system-additive.html b/layout/reftests/counter-style/system-additive.html
new file mode 100644
index 000000000..f3577a93e
--- /dev/null
+++ b/layout/reftests/counter-style/system-additive.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: additive;
+ additive-symbols: 6 \2685, 5 \2684, 4 \2683, 3 \2682, 2 \2681, 1 \2680;
+ suffix: "";
+ }
+ @counter-style b {
+ system: additive;
+ additive-symbols: 7 \2630, 6 \2631, 5 \2632, 4 \2633, 3 \2634, 2 \2635, 1 \2636, 0 \2637;
+ suffix: "";
+ }
+ @counter-style c {
+ system: additive;
+ additive-symbols: 3 "a", 2 "b";
+ }
+ @counter-style d {
+ system: additive;
+ additive-symbols: 1 \10300;
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+ <li value="10"><li><li><li>
+ <li value="360"><!-- 60 code points -->
+ <li value="1000"><!-- too long -->
+</ol>
+<ol start="-2" style="list-style-type: b">
+ <li><li><li><li><li>
+</ol>
+<ol style="list-style-type: c">
+ <li><li><li><li><li>
+</ol>
+<ol style="list-style-type: d">
+ <li value="60"><!-- 60 code points -->
+ <li value="100"><!-- too long -->
+</ol>
diff --git a/layout/reftests/counter-style/system-alphabetic-invalid.html b/layout/reftests/counter-style/system-alphabetic-invalid.html
new file mode 100644
index 000000000..a37eefed3
--- /dev/null
+++ b/layout/reftests/counter-style/system-alphabetic-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: alphabetic;
+ suffix: ":";
+ }
+ @counter-style b {
+ system: alphabetic;
+ symbols: A;
+ suffix: ":";
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
+<ol start="-2" style="list-style-type: b">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
diff --git a/layout/reftests/counter-style/system-alphabetic-ref.html b/layout/reftests/counter-style/system-alphabetic-ref.html
new file mode 100644
index 000000000..9a039cc17
--- /dev/null
+++ b/layout/reftests/counter-style/system-alphabetic-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<div>-2</div>
+<div>-1</div>
+<div>0</div>
+<div>&#x26AA;</div>
+<div>&#x26AB;</div>
+<div>&#x26AA;&#x26AA;</div>
+<div>&#x26AA;&#x26AB;</div>
+<div>&#x26AB;&#x26AA;</div>
+<div>&#x26AB;&#x26AB;</div>
+<div>&#x26AA;&#x26AA;&#x26AA;</div>
diff --git a/layout/reftests/counter-style/system-alphabetic.html b/layout/reftests/counter-style/system-alphabetic.html
new file mode 100644
index 000000000..25b2c49b5
--- /dev/null
+++ b/layout/reftests/counter-style/system-alphabetic.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: alphabetic;
+ symbols: \26AA \26AB;
+ suffix: '';
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/system-common-invalid-ref.html b/layout/reftests/counter-style/system-common-invalid-ref.html
new file mode 100644
index 000000000..b2502514f
--- /dev/null
+++ b/layout/reftests/counter-style/system-common-invalid-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<ol start="-2" style="list-style-type: decimal">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
diff --git a/layout/reftests/counter-style/system-common-invalid2-ref.html b/layout/reftests/counter-style/system-common-invalid2-ref.html
new file mode 100644
index 000000000..aad389e03
--- /dev/null
+++ b/layout/reftests/counter-style/system-common-invalid2-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<ol start="-2" style="list-style-type: decimal">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
+<ol start="-2" style="list-style-type: decimal">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
diff --git a/layout/reftests/counter-style/system-cyclic-invalid.html b/layout/reftests/counter-style/system-cyclic-invalid.html
new file mode 100644
index 000000000..0f0c79355
--- /dev/null
+++ b/layout/reftests/counter-style/system-cyclic-invalid.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: cyclic;
+ suffix: ":";
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
diff --git a/layout/reftests/counter-style/system-cyclic-ref.html b/layout/reftests/counter-style/system-cyclic-ref.html
new file mode 100644
index 000000000..522d93860
--- /dev/null
+++ b/layout/reftests/counter-style/system-cyclic-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>&#x2023;</div>
+<div>&#x2023;</div>
+<div>&#x2023;</div>
+<div>&#x2023;</div>
+<div>&#x2023;</div>
+<!-- list-style-type: b -->
+<div>&#x2021;</div>
+<div>&#x2020;</div>
+<div>&#x2021;</div>
+<div>&#x2020;</div>
+<div>&#x2021;</div>
diff --git a/layout/reftests/counter-style/system-cyclic.html b/layout/reftests/counter-style/system-cyclic.html
new file mode 100644
index 000000000..e7331bd1e
--- /dev/null
+++ b/layout/reftests/counter-style/system-cyclic.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: cyclic;
+ symbols: \2023;
+ suffix: "";
+ }
+ @counter-style b {
+ system: cyclic;
+ symbols: \2020 \2021;
+ suffix: "";
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" style="list-style-type: b">
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/system-extends-invalid-ref.html b/layout/reftests/counter-style/system-extends-invalid-ref.html
new file mode 100644
index 000000000..23c5589f9
--- /dev/null
+++ b/layout/reftests/counter-style/system-extends-invalid-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<link rel="stylesheet" href="ref-common.css">
+<style type="text/css">
+ ol {
+ list-style: decimal inside;
+ }
+</style>
+<div>a1b</div>
+<div>2b</div>
+<div>c3.&nbsp;</div>
+<div>d4.&nbsp;</div>
+<div>e5.&nbsp;</div>
+<ol start="6">
+ <li>foo<li>bar
+</ol>
diff --git a/layout/reftests/counter-style/system-extends-invalid.html b/layout/reftests/counter-style/system-extends-invalid.html
new file mode 100644
index 000000000..ecd4fed03
--- /dev/null
+++ b/layout/reftests/counter-style/system-extends-invalid.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends b;
+ prefix: a;
+ }
+ @counter-style b {
+ system: extends c;
+ suffix: b;
+ }
+ @counter-style c {
+ system: extends b;
+ pad: 2 c;
+ }
+ @counter-style d {
+ system: extends d;
+ prefix: d;
+ }
+ @counter-style e {
+ system: extends unknown;
+ prefix: e;
+ }
+ @counter-style f {
+ system: extends decimal;
+ symbols: a;
+ }
+ @counter-style g {
+ system: extends decimal;
+ additive-symbols: 1 a;
+ }
+</style>
+<ol>
+ <li style="list-style-type: a;">
+ <li style="list-style-type: b;">
+ <li style="list-style-type: c;">
+ <li style="list-style-type: d;">
+ <li style="list-style-type: e;">
+ <li style="list-style-type: f;">foo
+ <li style="list-style-type: g;">bar
+</ol>
diff --git a/layout/reftests/counter-style/system-extends-ref.html b/layout/reftests/counter-style/system-extends-ref.html
new file mode 100644
index 000000000..5eefe70d7
--- /dev/null
+++ b/layout/reftests/counter-style/system-extends-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>Chapter -2.&nbsp;</div>
+<div>Chapter -1.&nbsp;</div>
+<div>Chapter 0.&nbsp;</div>
+<div>Chapter I.&nbsp;</div>
+<div>Chapter II.&nbsp;</div>
+<div>Chapter III.&nbsp;</div>
+<div>Chapter IV.&nbsp;</div>
+<div>Chapter V.&nbsp;</div>
+<div>Chapter 6.&nbsp;</div>
+<div>Chapter 7.&nbsp;</div>
+<!-- list-style-type: b -->
+<div>Section -2.&nbsp;</div>
+<div>Section -1.&nbsp;</div>
+<div>Section 0.&nbsp;</div>
+<div>Section I.&nbsp;</div>
+<div>Section II.&nbsp;</div>
+<div>Section III.&nbsp;</div>
+<div>Section IV.&nbsp;</div>
+<div>Section V.&nbsp;</div>
+<div>Section VI.&nbsp;</div>
+<div>Section 7.&nbsp;</div>
diff --git a/layout/reftests/counter-style/system-extends.html b/layout/reftests/counter-style/system-extends.html
new file mode 100644
index 000000000..cb51626d3
--- /dev/null
+++ b/layout/reftests/counter-style/system-extends.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: extends upper-roman;
+ prefix: "Chapter ";
+ range: 1 5;
+ }
+ @counter-style b {
+ system: extends a;
+ prefix: "Section ";
+ range: 1 6;
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" style="list-style-type: b">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/system-fixed-invalid.html b/layout/reftests/counter-style/system-fixed-invalid.html
new file mode 100644
index 000000000..848e4f9f2
--- /dev/null
+++ b/layout/reftests/counter-style/system-fixed-invalid.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: fixed;
+ suffix: ":";
+ }
+ @counter-style b {
+ system: fixed invalid;
+ suffix: ":";
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
+<ol start="-2" style="list-style-type: b">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
diff --git a/layout/reftests/counter-style/system-fixed-ref.html b/layout/reftests/counter-style/system-fixed-ref.html
new file mode 100644
index 000000000..14cbc53e9
--- /dev/null
+++ b/layout/reftests/counter-style/system-fixed-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>-2:</div>
+<div>-1:</div>
+<div>0:</div>
+<div>&#x25F0;:</div>
+<div>&#x25F1;:</div>
+<div>&#x25F2;:</div>
+<div>&#x25F3;:</div>
+<div>5:</div>
+<div>6:</div>
+<div>7:</div>
+<!-- list-style-type: b -->
+<div>-2:</div>
+<div>&#x25F4;:</div>
+<div>&#x25F5;:</div>
+<div>&#x25F6;:</div>
+<div>&#x25F7;:</div>
+<div>3:</div>
+<div>4:</div>
+<div>5:</div>
+<div>6:</div>
+<div>7:</div>
diff --git a/layout/reftests/counter-style/system-fixed.html b/layout/reftests/counter-style/system-fixed.html
new file mode 100644
index 000000000..d7d55bad8
--- /dev/null
+++ b/layout/reftests/counter-style/system-fixed.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: fixed;
+ symbols: \25F0 \25F1 \25F2 \25F3;
+ suffix: ':';
+ }
+ @counter-style b {
+ system: fixed -1;
+ symbols: \25F4 \25F5 \25F6 \25F7;
+ suffix: ':';
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
+<ol start="-2" style="list-style-type: b">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+</ol>
diff --git a/layout/reftests/counter-style/system-numeric-invalid.html b/layout/reftests/counter-style/system-numeric-invalid.html
new file mode 100644
index 000000000..ea054d102
--- /dev/null
+++ b/layout/reftests/counter-style/system-numeric-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: numeric;
+ suffix: ":";
+ }
+ @counter-style b {
+ system: numeric;
+ symbols: A;
+ suffix: ":";
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
+<ol start="-2" style="list-style-type: b">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
diff --git a/layout/reftests/counter-style/system-numeric-ref.html b/layout/reftests/counter-style/system-numeric-ref.html
new file mode 100644
index 000000000..548ee0f39
--- /dev/null
+++ b/layout/reftests/counter-style/system-numeric-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<div>-11.&nbsp;</div>
+<div>-10.&nbsp;</div>
+<div>-2.&nbsp;</div>
+<div>-1.&nbsp;</div>
+<div>0.&nbsp;</div>
+<div>1.&nbsp;</div>
+<div>2.&nbsp;</div>
+<div>10.&nbsp;</div>
+<div>11.&nbsp;</div>
+<div>12.&nbsp;</div>
+<div>10201.&nbsp;</div>
diff --git a/layout/reftests/counter-style/system-numeric.html b/layout/reftests/counter-style/system-numeric.html
new file mode 100644
index 000000000..51b86b764
--- /dev/null
+++ b/layout/reftests/counter-style/system-numeric.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: numeric;
+ symbols: '0' '1' '2';
+ }
+</style>
+<ol start="-4" style="list-style-type: a">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+ <li value="100">
+</ol>
diff --git a/layout/reftests/counter-style/system-symbolic-invalid.html b/layout/reftests/counter-style/system-symbolic-invalid.html
new file mode 100644
index 000000000..7c9b1a3a3
--- /dev/null
+++ b/layout/reftests/counter-style/system-symbolic-invalid.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ system: symbolic;
+ suffix: ":";
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li>foo<li>bar<li>foo<li>bar
+</ol>
diff --git a/layout/reftests/counter-style/system-symbolic-ref.html b/layout/reftests/counter-style/system-symbolic-ref.html
new file mode 100644
index 000000000..b8e1b22d2
--- /dev/null
+++ b/layout/reftests/counter-style/system-symbolic-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="ref-common.css">
+<!-- list-style-type: a -->
+<div>-2</div>
+<div>-1</div>
+<div>0</div>
+<div>*</div>
+<div>&#x2051;</div>
+<div>&#x2020;</div>
+<div>&#x2021;</div>
+<div>**</div>
+<div>&#x2051;&#x2051;</div>
+<div>&#x2020;&#x2020;</div>
+<div><script type="text/javascript">
+ document.write(Array(61).join('&#x2021;'));
+</script></div>
+<div>1000</div>
+<!-- list-style-type: b -->
+<div><script type="text/javascript">
+ document.write(Array(61).join('&#x10300;'));
+</script>.&nbsp;</div>
+<div>100.&nbsp;</div>
diff --git a/layout/reftests/counter-style/system-symbolic.html b/layout/reftests/counter-style/system-symbolic.html
new file mode 100644
index 000000000..e608ea0bf
--- /dev/null
+++ b/layout/reftests/counter-style/system-symbolic.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<link rel="stylesheet" href="test-common.css">
+<style type="text/css">
+ @counter-style a {
+ /* system: symbolic; */
+ symbols: '*' \2051 \2020 \2021;
+ suffix: '';
+ }
+ @counter-style b {
+ symbols: \10300;
+ }
+</style>
+<ol start="-2" style="list-style-type: a">
+ <li><li><li><li><li>
+ <li><li><li><li><li>
+ <li value="240"><!-- 60 code points -->
+ <li value="1000"><!-- too long -->
+</ol>
+<ol style="list-style-type: b">
+ <li value="60"><!-- 60 code points -->
+ <li value="100"><!-- too long -->
+</ol>
diff --git a/layout/reftests/counter-style/test-common.css b/layout/reftests/counter-style/test-common.css
new file mode 100644
index 000000000..dcbf4e1e0
--- /dev/null
+++ b/layout/reftests/counter-style/test-common.css
@@ -0,0 +1,18 @@
+body {
+ /* to match ua.css, see bug 1020143 */
+ font-variant-numeric: tabular-nums;
+}
+ol, ul, section, p {
+ padding: 0; margin: 0;
+ line-height: 150%;
+}
+ol, ul {
+ list-style-position: inside;
+}
+li, p {
+ float: left;
+ padding: 0;
+}
+p {
+ padding-right: .5em;
+}