Add counter tests that I wrote for bug 3247, converted to reftest format by Rob Campbell <rcampbell@mozilla.com>.
authordbaron@dbaron.org
Thu, 22 Mar 2007 23:28:24 -0700
changeset 26 6b8dccd5afac01049cbd8f28f5a8cf7d3cb99732
parent 25 e18bce582158609740085471529b677c4175c57f
child 27 4ecc9ca8bf3d08d8b1fccfc8efbe6d51f44be4b4
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
bugs3247
milestone1.9a3pre
Add counter tests that I wrote for bug 3247, converted to reftest format by Rob Campbell <rcampbell@mozilla.com>.
layout/reftests/counters/reftest.list
layout/reftests/counters/t1202-counter-00-b-reference.html
layout/reftests/counters/t1202-counter-00-b-test.html
layout/reftests/counters/t1202-counter-01-b-reference.html
layout/reftests/counters/t1202-counter-01-b-test.html
layout/reftests/counters/t1202-counter-02-b-reference.html
layout/reftests/counters/t1202-counter-02-b-test.html
layout/reftests/counters/t1202-counter-03-b-reference.html
layout/reftests/counters/t1202-counter-03-b-test.html
layout/reftests/counters/t1202-counter-04-b-reference.html
layout/reftests/counters/t1202-counter-04-b-test.html
layout/reftests/counters/t1202-counter-05-b-reference.html
layout/reftests/counters/t1202-counter-05-b-test.html
layout/reftests/counters/t1202-counter-06-b-reference.html
layout/reftests/counters/t1202-counter-06-b-test.html
layout/reftests/counters/t1202-counter-07-b-reference.html
layout/reftests/counters/t1202-counter-07-b-test.html
layout/reftests/counters/t1202-counter-08-b-reference.html
layout/reftests/counters/t1202-counter-08-b-test.html
layout/reftests/counters/t1202-counter-09-b-reference.html
layout/reftests/counters/t1202-counter-09-b-test.html
layout/reftests/counters/t1202-counter-10-b-reference.html
layout/reftests/counters/t1202-counter-10-b-test.html
layout/reftests/counters/t1202-counter-11-b-reference.html
layout/reftests/counters/t1202-counter-11-b-test.html
layout/reftests/counters/t1202-counter-12-b-reference.html
layout/reftests/counters/t1202-counter-12-b-test.html
layout/reftests/counters/t1202-counter-13-b-reference.html
layout/reftests/counters/t1202-counter-13-b-test.html
layout/reftests/counters/t1202-counter-14-b-reference.html
layout/reftests/counters/t1202-counter-14-b-test.html
layout/reftests/counters/t1202-counter-15-b-reference.html
layout/reftests/counters/t1202-counter-15-b-test.html
layout/reftests/counters/t1202-counter-16-f-reference.html
layout/reftests/counters/t1202-counter-16-f-test.html
layout/reftests/counters/t1202-counters-00-b-reference.html
layout/reftests/counters/t1202-counters-00-b-test.html
layout/reftests/counters/t1202-counters-01-b-reference.html
layout/reftests/counters/t1202-counters-01-b-test.html
layout/reftests/counters/t1202-counters-02-b-reference.html
layout/reftests/counters/t1202-counters-02-b-test.html
layout/reftests/counters/t1202-counters-03-b-reference.html
layout/reftests/counters/t1202-counters-03-b-test.html
layout/reftests/counters/t1202-counters-04-b-reference.html
layout/reftests/counters/t1202-counters-04-b-test.html
layout/reftests/counters/t1202-counters-05-b-reference.html
layout/reftests/counters/t1202-counters-05-b-test.html
layout/reftests/counters/t1202-counters-06-b-reference.html
layout/reftests/counters/t1202-counters-06-b-test.html
layout/reftests/counters/t1202-counters-07-b-reference.html
layout/reftests/counters/t1202-counters-07-b-test.html
layout/reftests/counters/t1202-counters-08-b-reference.html
layout/reftests/counters/t1202-counters-08-b-test.html
layout/reftests/counters/t1202-counters-09-b-reference.html
layout/reftests/counters/t1202-counters-09-b-test.html
layout/reftests/counters/t1202-counters-10-b-reference.html
layout/reftests/counters/t1202-counters-10-b-test.html
layout/reftests/counters/t1202-counters-11-b-reference.html
layout/reftests/counters/t1202-counters-11-b-test.html
layout/reftests/counters/t1202-counters-12-b-reference.html
layout/reftests/counters/t1202-counters-12-b-test.html
layout/reftests/counters/t1202-counters-13-b-reference.html
layout/reftests/counters/t1202-counters-13-b-test.html
layout/reftests/counters/t1202-counters-14-b-reference.html
layout/reftests/counters/t1202-counters-14-b-test.html
layout/reftests/counters/t1202-counters-15-b-reference.html
layout/reftests/counters/t1202-counters-15-b-test.html
layout/reftests/counters/t1202-counters-16-c-reference.html
layout/reftests/counters/t1202-counters-16-c-test.html
layout/reftests/counters/t1202-counters-17-d-reference.html
layout/reftests/counters/t1202-counters-17-d-test.html
layout/reftests/counters/t1202-counters-18-f-reference.html
layout/reftests/counters/t1202-counters-18-f-test.html
layout/reftests/counters/t1204-implied-00-b-reference.html
layout/reftests/counters/t1204-implied-00-b-test.html
layout/reftests/counters/t1204-implied-01-c-reference.html
layout/reftests/counters/t1204-implied-01-c-test.html
layout/reftests/counters/t1204-implied-02-d-reference.html
layout/reftests/counters/t1204-implied-02-d-test.html
layout/reftests/counters/t1204-increment-00-c-o-reference.html
layout/reftests/counters/t1204-increment-00-c-o-test.html
layout/reftests/counters/t1204-increment-01-c-o-reference.html
layout/reftests/counters/t1204-increment-01-c-o-test.html
layout/reftests/counters/t1204-increment-02-c-o-reference.html
layout/reftests/counters/t1204-increment-02-c-o-test.html
layout/reftests/counters/t1204-multiple-00-c-reference.html
layout/reftests/counters/t1204-multiple-00-c-test.html
layout/reftests/counters/t1204-multiple-01-c-reference.html
layout/reftests/counters/t1204-multiple-01-c-test.html
layout/reftests/counters/t1204-order-00-c-reference.html
layout/reftests/counters/t1204-order-00-c-test.html
layout/reftests/counters/t1204-order-01-d-reference.html
layout/reftests/counters/t1204-order-01-d-test.html
layout/reftests/counters/t1204-reset-00-c-o-reference.html
layout/reftests/counters/t1204-reset-00-c-o-test.html
layout/reftests/counters/t1204-reset-01-c-o-reference.html
layout/reftests/counters/t1204-reset-01-c-o-test.html
layout/reftests/counters/t1204-reset-02-c-o-reference.html
layout/reftests/counters/t1204-reset-02-c-o-test.html
layout/reftests/counters/t1204-root-e-reference.html
layout/reftests/counters/t1204-root-e-test.html
layout/reftests/counters/t120401-scope-00-b-reference.html
layout/reftests/counters/t120401-scope-00-b-test.html
layout/reftests/counters/t120401-scope-01-c-reference.html
layout/reftests/counters/t120401-scope-01-c-test.html
layout/reftests/counters/t120401-scope-02-c-reference.html
layout/reftests/counters/t120401-scope-02-c-test.html
layout/reftests/counters/t120401-scope-03-c-reference.html
layout/reftests/counters/t120401-scope-03-c-test.html
layout/reftests/counters/t120401-scope-04-d-reference.html
layout/reftests/counters/t120401-scope-04-d-test.html
layout/reftests/counters/t120403-content-none-00-c-reference.html
layout/reftests/counters/t120403-content-none-00-c-test.html
layout/reftests/counters/t120403-display-none-00-c-reference.html
layout/reftests/counters/t120403-display-none-00-c-test.html
layout/reftests/counters/t120403-visibility-00-c-reference.html
layout/reftests/counters/t120403-visibility-00-c-test.html
layout/reftests/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/reftest.list
@@ -0,0 +1,58 @@
+== t1202-counter-00-b-test.html t1202-counter-00-b-reference.html
+== t1202-counter-01-b-test.html t1202-counter-01-b-reference.html
+random == t1202-counter-02-b-test.html t1202-counter-02-b-reference.html # font selection issues
+== 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
+random == t1202-counter-07-b-test.html t1202-counter-07-b-reference.html # font spacing issues
+random == t1202-counter-08-b-test.html t1202-counter-08-b-reference.html # font spacing issues
+== 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
+random == t1202-counters-07-b-test.html t1202-counters-07-b-reference.html # font spacing issues
+random == t1202-counters-08-b-test.html t1202-counters-08-b-reference.html # font spacing issues
+== 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
+random == t1202-counters-13-b-test.html t1202-counters-13-b-reference.html # font spacing issues
+random == t1202-counters-14-b-test.html t1202-counters-14-b-reference.html # font spacing issues
+== 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
+fails == 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
new file mode 100644
--- /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>
+  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+  10
+  11
+  12
+</div>
+
+ </body>
+</html>
\ No newline at end of file
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   z
+   z
+   z
+   z
+   z
+   z
+   z
+   z
+   z
+   z
+   z
+   z
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-02-b-reference.html
@@ -0,0 +1,26 @@
+<!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">
+
+ <div>
+   &#x2022;
+   &#x2022;
+   &#x2022;
+   &#x2022;
+   &#x2022;
+   &#x2022;
+   &#x2022;
+   &#x2022;
+   &#x2022;
+   &#x2022;
+   &#x2022;
+   &#x2022;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   &#x25E6;
+   &#x25E6;
+   &#x25E6;
+   &#x25E6;
+   &#x25E6;
+   &#x25E6;
+   &#x25E6;
+   &#x25E6;
+   &#x25E6;
+   &#x25E6;
+   &#x25E6;
+   &#x25E6;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   &#x25FE;
+   &#x25FE;
+   &#x25FE;
+   &#x25FE;
+   &#x25FE;
+   &#x25FE;
+   &#x25FE;
+   &#x25FE;
+   &#x25FE;
+   &#x25FE;
+   &#x25FE;
+   &#x25FE;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+   10
+   11
+   12
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   01
+   02
+   03
+   04
+   05
+   06
+   07
+   08
+   09
+   10
+   11
+   12
+   99
+   100
+   101
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   i
+   ii
+   iii
+   iv
+   v
+   vi
+   vii
+   viii
+   ix
+   x
+   xi
+   xii
+   xlix
+   l
+   ccclxxxix
+   cccxc
+   mmmcdlxxxix
+   mmmcdxc
+   mmmcdxci
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   I
+   II
+   III
+   IV
+   V
+   VI
+   VII
+   VIII
+   IX
+   X
+   XI
+   XII
+   XLIX
+   L
+   CCCLXXXIX
+   CCCXC
+   MMMCDLXXXIX
+   MMMCDXC
+   MMMCDXCI
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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
new file mode 100644
--- /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>
+   &#x10D0;
+   &#x10D1;
+   &#x10D2;
+   &#x10D3;
+   &#x10D4;
+   &#x10D5;
+   &#x10D6;
+   &#x10F1;
+   &#x10D7;
+   &#x10D8;
+   &#x10D8;&#x10D0;
+   &#x10D8;&#x10D1;
+   &#x10D9;
+   &#x10DA;
+   &#x10DB;
+   &#x10DC;
+   &#x10F2;
+   &#x10DD;
+   &#x10DE;
+   &#x10DF;
+   &#x10E0;
+   &#x10E1;
+   &#x10E2;
+   &#x10F3;
+   &#x10E4;
+   &#x10E5;
+   &#x10E6;
+   &#x10E7;
+   &#x10E8;
+   &#x10E9;
+   &#x10EA;
+   &#x10EB;
+   &#x10EC;
+   &#x10ED;
+   &#x10EE;
+   &#x10F4;
+   &#x10EF;
+   &#x10F0;
+   &#x10F5;
+   &#x10F5;&#x10F0;&#x10E8;&#x10DF;&#x10D7;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   &#x531;
+   &#x532;
+   &#x533;
+   &#x534;
+   &#x535;
+   &#x536;
+   &#x537;
+   &#x538;
+   &#x539;
+   &#x53A;
+   &#x53A;&#x531;
+   &#x53A;&#x532;
+   &#x53B;
+   &#x53C;
+   &#x53D;
+   &#x53E;
+   &#x53F;
+   &#x540;
+   &#x541;
+   &#x542;
+   &#x543;
+   &#x544;
+   &#x545;
+   &#x546;
+   &#x547;
+   &#x548;
+   &#x549;
+   &#x54A;
+   &#x54B;
+   &#x54C;
+   &#x54D;
+   &#x54E;
+   &#x54F;
+   &#x550;
+   &#x551;
+   &#x548;&#x552;
+   &#x553;
+   &#x554;
+   &#x554;&#x54B;&#x542;&#x539;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   a
+   b
+   c
+   d
+   e
+   f
+   g
+   h
+   i
+   j
+   k
+   l
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   a
+   b
+   c
+   d
+   e
+   f
+   g
+   h
+   i
+   j
+   k
+   l
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   A
+   B
+   C
+   D
+   E
+   F
+   G
+   H
+   I
+   J
+   K
+   L
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   A
+   B
+   C
+   D
+   E
+   F
+   G
+   H
+   I
+   J
+   K
+   L
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   &#x3B1;
+   &#x3B2;
+   &#x3B3;
+   &#x3B4;
+   &#x3B5;
+   &#x3B6;
+   &#x3B7;
+   &#x3B8;
+   &#x3B9;
+   &#x3BA;
+   &#x3BB;
+   &#x3BC;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /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>
+   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+   10
+   11
+   12
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counter-16-f-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: 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);
+    content: counter(f, unknowntype);
+  }
+
+  </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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-00-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   1.1
+   1.2
+   1.3
+   1.4
+   1.5
+   1.6
+   1.7
+   1.8
+   1.9
+   1.10
+   1.11
+   1.12
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-01-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   .z
+   .z
+   .z
+   .z
+   .z
+   .z
+   .z
+   .z
+   .z
+   .z
+   .z
+   .z
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-02-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+   &#x2022;.&#x2022;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-03-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+   &#x25E6;.&#x25E6;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-04-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+   &#x25FE;.&#x25FE;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-05-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   1.1
+   1.2
+   1.3
+   1.4
+   1.5
+   1.6
+   1.7
+   1.8
+   1.9
+   1.10
+   1.11
+   1.12
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-06-b-reference.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: 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>
+   01.01
+   01.02
+   01.03
+   01.04
+   01.05
+   01.06
+   01.07
+   01.08
+   01.09
+   01.10
+   01.11
+   01.12
+   01.99
+   01.100
+   01.101
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-07-b-reference.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(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>
+   i.i
+   i.ii
+   i.iii
+   i.iv
+   i.v
+   i.vi
+   i.vii
+   i.viii
+   i.ix
+   i.x
+   i.xi
+   i.xii
+   i.xlix
+   i.l
+   i.ccclxxxix
+   i.cccxc
+   i.mmmcdlxxxix
+   i.mmmcdxc
+   i.mmmcdxci
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-08-b-reference.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(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>
+   I.I
+   I.II
+   I.III
+   I.IV
+   I.V
+   I.VI
+   I.VII
+   I.VIII
+   I.IX
+   I.X
+   I.XI
+   I.XII
+   I.XLIX
+   I.L
+   I.CCCLXXXIX
+   I.CCCXC
+   I.MMMCDLXXXIX
+   I.MMMCDXC
+   I.MMMCDXCI
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-09-b-reference.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, ".", 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>
+   &#x10D0;.&#x10D0;
+   &#x10D0;.&#x10D1;
+   &#x10D0;.&#x10D2;
+   &#x10D0;.&#x10D3;
+   &#x10D0;.&#x10D4;
+   &#x10D0;.&#x10D5;
+   &#x10D0;.&#x10D6;
+   &#x10D0;.&#x10F1;
+   &#x10D0;.&#x10D7;
+   &#x10D0;.&#x10D8;
+   &#x10D0;.&#x10D8;&#x10D0;
+   &#x10D0;.&#x10D8;&#x10D1;
+   &#x10D0;.&#x10D9;
+   &#x10D0;.&#x10DA;
+   &#x10D0;.&#x10DB;
+   &#x10D0;.&#x10DC;
+   &#x10D0;.&#x10F2;
+   &#x10D0;.&#x10DD;
+   &#x10D0;.&#x10DE;
+   &#x10D0;.&#x10DF;
+   &#x10D0;.&#x10E0;
+   &#x10D0;.&#x10E1;
+   &#x10D0;.&#x10E2;
+   &#x10D0;.&#x10F3;
+   &#x10D0;.&#x10E4;
+   &#x10D0;.&#x10E5;
+   &#x10D0;.&#x10E6;
+   &#x10D0;.&#x10E7;
+   &#x10D0;.&#x10E8;
+   &#x10D0;.&#x10E9;
+   &#x10D0;.&#x10EA;
+   &#x10D0;.&#x10EB;
+   &#x10D0;.&#x10EC;
+   &#x10D0;.&#x10ED;
+   &#x10D0;.&#x10EE;
+   &#x10D0;.&#x10F4;
+   &#x10D0;.&#x10EF;
+   &#x10D0;.&#x10F0;
+   &#x10D0;.&#x10F5;
+   &#x10D0;.&#x10F5;&#x10F0;&#x10E8;&#x10DF;&#x10D7;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-10-b-reference.html
@@ -0,0 +1,64 @@
+<!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>
+   &#x531;.&#x531;
+   &#x531;.&#x532;
+   &#x531;.&#x533;
+   &#x531;.&#x534;
+   &#x531;.&#x535;
+   &#x531;.&#x536;
+   &#x531;.&#x537;
+   &#x531;.&#x538;
+   &#x531;.&#x539;
+   &#x531;.&#x53A;
+   &#x531;.&#x53A;&#x531;
+   &#x531;.&#x53A;&#x532;
+   &#x531;.&#x53B;
+   &#x531;.&#x53C;
+   &#x531;.&#x53D;
+   &#x531;.&#x53E;
+   &#x531;.&#x53F;
+   &#x531;.&#x540;
+   &#x531;.&#x541;
+   &#x531;.&#x542;
+   &#x531;.&#x543;
+   &#x531;.&#x544;
+   &#x531;.&#x545;
+   &#x531;.&#x546;
+   &#x531;.&#x547;
+   &#x531;.&#x548;
+   &#x531;.&#x549;
+   &#x531;.&#x54A;
+   &#x531;.&#x54B;
+   &#x531;.&#x54C;
+   &#x531;.&#x54D;
+   &#x531;.&#x54E;
+   &#x531;.&#x54F;
+   &#x531;.&#x550;
+   &#x531;.&#x551;
+   &#x531;.&#x548;&#x552;
+   &#x531;.&#x553;
+   &#x531;.&#x554;
+   &#x531;.&#x554;&#x54B;&#x542;&#x539;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-11-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   a.a
+   a.b
+   a.c
+   a.d
+   a.e
+   a.f
+   a.g
+   a.h
+   a.i
+   a.j
+   a.k
+   a.l
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-12-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   a.a
+   a.b
+   a.c
+   a.d
+   a.e
+   a.f
+   a.g
+   a.h
+   a.i
+   a.j
+   a.k
+   a.l
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-13-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   A.A
+   A.B
+   A.C
+   A.D
+   A.E
+   A.F
+   A.G
+   A.H
+   A.I
+   A.J
+   A.K
+   A.L
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-14-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   A.A
+   A.B
+   A.C
+   A.D
+   A.E
+   A.F
+   A.G
+   A.H
+   A.I
+   A.J
+   A.K
+   A.L
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-15-b-reference.html
@@ -0,0 +1,36 @@
+<!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>
+   &#x3B1;.&#x3B1;
+   &#x3B1;.&#x3B2;
+   &#x3B1;.&#x3B3;
+   &#x3B1;.&#x3B4;
+   &#x3B1;.&#x3B5;
+   &#x3B1;.&#x3B6;
+   &#x3B1;.&#x3B7;
+   &#x3B1;.&#x3B8;
+   &#x3B1;.&#x3B9;
+   &#x3B1;.&#x3BA;
+   &#x3B1;.&#x3BB;
+   &#x3B1;.&#x3BC;
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-16-c-reference.html
@@ -0,0 +1,26 @@
+<!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>1.1 - 12 - 1.3--    --1-------3</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-17-d-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: 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>1.1 - 12 - 1.3--       --1-------3</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-18-f-reference.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, ".");
+    content: counters(f, ".", unknowntype);
+  }
+
+  </style>
+ </head>
+ <body>
+
+ <p></p>
+
+ <div>
+   1.1
+   1.2
+   1.3
+   1.4
+   1.5
+   1.6
+   1.7
+   1.8
+   1.9
+   1.10
+   1.11
+   1.12
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1202-counters-18-f-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() 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, ".");
+    content: counters(f, ".", unknowntype);
+  }
+
+  </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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-implied-00-b-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: 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>00</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-implied-01-c-reference.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>0 1</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-implied-02-d-reference.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>B1 0 1 1.0</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-00-c-o-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: 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));
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <div id="reference">1-2-new-3-4-</div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-00-c-o-test.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: 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));
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <div id="test"><span class="increment"></span><span class="increment"></span><span class="increment"></span></div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-01-c-o-reference.html
@@ -0,0 +1,30 @@
+<!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"/>
+  <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));
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <div id="test"><span class="increment"></span><span class="increment">FAIL-</span><span class="increment"></span><span class="increment"></span></div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-01-c-o-test.html
@@ -0,0 +1,30 @@
+<!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"/>
+  <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));
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <div id="test"><span class="increment"></span><span class="increment">FAIL-</span><span class="increment"></span><span class="increment"></span></div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-02-c-o-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: 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");
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <div id="reference">0.1-0.2-1-2-</div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-increment-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">
+ <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");
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-multiple-00-c-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: 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>12</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-multiple-01-c-reference.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>12</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-order-00-c-reference.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>
+   0
+   1
+   2
+   3
+   4
+   4
+   4
+   4
+   8
+   9
+   10
+   11
+   12
+   12
+   12
+   12
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-order-01-d-reference.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: 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>
new file mode 100644
--- /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: 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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-00-c-o-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: 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));
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <div id="reference">1-1.1-1.2-</div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-00-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">
+ <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));
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <div id="test"><span class="increment"></span><span class="increment"></span><span class="increment"></span></div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-01-c-o-reference.html
@@ -0,0 +1,30 @@
+<!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"/>
+  <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));
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <div id="reference">1-2-3-</div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-01-c-o-test.html
@@ -0,0 +1,30 @@
+<!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"/>
+  <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));
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <div id="test"><span class="increment"></span><span class="reset"></span><span class="increment"></span><span class="increment"></span></div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-02-c-o-reference.html
@@ -0,0 +1,30 @@
+<!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"/>
+  <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");
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <div id="reference">1-1.1-2-3-4-</div>
+
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-reset-02-c-o-test.html
@@ -0,0 +1,30 @@
+<!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"/>
+  <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");
+  }
+
+  </script>
+ </head>
+ <body onload="setTimeout('run()', 0)">
+
+ <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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t1204-root-e-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: 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>
+   4.8
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-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: 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>
+   122111
+   133331
+ </div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-01-c-reference.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>B1-B2-B2.1-B2.2-A2.3-B2.4-A2.5-A2.6-B2.7-B2.8-A2.9-A2.10-A2.11-A3-</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-02-c-reference.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>B1-B1.1-B1.2-A1.3-A1.4-A2-</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-03-c-reference.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>B1-B2-B3-A4-A4.1-A5-</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t120401-scope-04-d-reference.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>1 1 R1.1 1.1</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t120403-content-none-00-c-reference.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>0</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t120403-display-none-00-c-reference.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>0</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/counters/t120403-visibility-00-c-reference.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>1</div>
+
+ </body>
+</html>
new file mode 100644
--- /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>
--- a/layout/reftests/reftest.list
+++ b/layout/reftests/reftest.list
@@ -73,13 +73,16 @@ include table-dom/reftest.list
 include table-width/reftest.list
 
 # xul-document-load/
 include xul-document-load/reftest.list
 
 # box-properties/
 include box-properties/reftest.list
 
+# counters/
+include counters/reftest.list
+
 # first-letter/
 include first-letter/reftest.list
 
 # text-transform/
 include text-transform/reftest.list