Bug 482889 Part 1. Tests for table anonymous object construction. r=bernd, r+sr=roc
authorBoris Zbarsky <bzbarsky@mit.edu>
Sun, 15 Mar 2009 15:57:46 -0400
changeset 26206 da61aad96bf9c491f9fcbbde7f5b203d18bb11e5
parent 26205 dbdf1401b7e135134d78dc33664ea51c5dfb6408
child 26207 523942ee51c838a08bf9342fdb2550f8ce3dd1e4
push idunknown
push userunknown
push dateunknown
reviewersbernd, r
bugs482889
milestone1.9.2a1pre
Bug 482889 Part 1. Tests for table anonymous object construction. r=bernd, r+sr=roc
layout/reftests/reftest.list
layout/reftests/table-anonymous-boxes/3-tables-ref.html
layout/reftests/table-anonymous-boxes/3x3-cols-ref.html
layout/reftests/table-anonymous-boxes/3x3-ref.html
layout/reftests/table-anonymous-boxes/blocks-divide-tables-1.html
layout/reftests/table-anonymous-boxes/blocks-divide-tables-2.html
layout/reftests/table-anonymous-boxes/cols-test-1.html
layout/reftests/table-anonymous-boxes/cols-test-2.html
layout/reftests/table-anonymous-boxes/cols-test-3.html
layout/reftests/table-anonymous-boxes/infer-cells-1.html
layout/reftests/table-anonymous-boxes/infer-cells-2.html
layout/reftests/table-anonymous-boxes/infer-cells-3.html
layout/reftests/table-anonymous-boxes/infer-cells-4.html
layout/reftests/table-anonymous-boxes/infer-first-row-and-table.html
layout/reftests/table-anonymous-boxes/infer-first-row.html
layout/reftests/table-anonymous-boxes/infer-rows-inside-rowgroups.html
layout/reftests/table-anonymous-boxes/infer-second-row-and-table.html
layout/reftests/table-anonymous-boxes/infer-second-row.html
layout/reftests/table-anonymous-boxes/infer-table-around-headers-footers-1.html
layout/reftests/table-anonymous-boxes/infer-table-around-headers-footers-2.html
layout/reftests/table-anonymous-boxes/infer-table-around-headers-footers-3.html
layout/reftests/table-anonymous-boxes/infer-table-row-cell.html
layout/reftests/table-anonymous-boxes/infer-table.html
layout/reftests/table-anonymous-boxes/reftest.list
layout/reftests/table-anonymous-boxes/white-space-1-ref.html
layout/reftests/table-anonymous-boxes/white-space-1.html
--- a/layout/reftests/reftest.list
+++ b/layout/reftests/reftest.list
@@ -115,16 +115,19 @@ include printing/reftest.list
 include pagination/reftest.list
 
 # svg/
 include svg/reftest.list
 
 # svg-integration/
 include svg-integration/reftest.list
 
+# table-anonymous-boxes/
+include table-anonymous-boxes/reftest.list
+
 # table-background/
 include table-background/reftest.list
 
 # table-bordercollapse/
 include table-bordercollapse/reftest.list
 
 # table-dom/
 include table-dom/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/3-tables-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <table cellpadding="0" cellspacing="0">
+      <tr>
+        <td>Row 1, Col 1</td>
+        <td>Row 1, Col 2</td>
+        <td>Row 1, Col 3</td>
+      </tr>
+    </table>
+    <table cellpadding="0" cellspacing="0">
+      <tr>
+        <td>Row 22, Col 1</td>
+        <td>Row 22, Col 2</td>
+        <td>Row 22, Col 3</td>
+      </tr>
+    </table>
+    <table cellpadding="0" cellspacing="0">
+      <tr>
+        <td>Row 333, Col 1</td>
+        <td>Row 333, Col 2</td>
+        <td>Row 333, Col 3</td>
+      </tr>
+    </table>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/3x3-cols-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <table cellpadding="0" cellspacing="0">
+      <colgroup><col style="background: yellow"><col style="background: cyan"><col style="background: lime"></colgroup>
+      <tr>
+        <td>Row 1, Col 1</td>
+        <td>Row 1, Col 2</td>
+        <td>Row 1, Col 3</td>
+      </tr>
+      <tr>
+        <td>Row 22, Col 1</td>
+        <td>Row 22, Col 2</td>
+        <td>Row 22, Col 3</td>
+      </tr>
+      <tr>
+        <td>Row 333, Col 1</td>
+        <td>Row 333, Col 2</td>
+        <td>Row 333, Col 3</td>
+      </tr>
+    </table>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/3x3-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <table cellpadding="0" cellspacing="0">
+      <tr>
+        <td>Row 1, Col 1</td>
+        <td>Row 1, Col 2</td>
+        <td>Row 1, Col 3</td>
+      </tr>
+      <tr>
+        <td>Row 22, Col 1</td>
+        <td>Row 22, Col 2</td>
+        <td>Row 22, Col 3</td>
+      </tr>
+      <tr>
+        <td>Row 333, Col 1</td>
+        <td>Row 333, Col 2</td>
+        <td>Row 333, Col 3</td>
+      </tr>
+    </table>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/blocks-divide-tables-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: block"> 
+      <div style="display: table-cell">Row 1, Col 1</div>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div style="display: table-cell">Row 1, Col 3</div>
+    </div>
+    <div style="display: block"> 
+      <div style="display: table-cell">Row 22, Col 1</div>
+      <div style="display: table-cell">Row 22, Col 2</div>
+      <div style="display: table-cell">Row 22, Col 3</div>
+    </div>
+    <div style="display: block"> 
+      <div style="display: table-cell">Row 333, Col 1</div>
+      <div style="display: table-cell">Row 333, Col 2</div>
+      <div style="display: table-cell">Row 333, Col 3</div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/blocks-divide-tables-2.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-row"> 
+      <div style="display: table-cell">Row 1, Col 1</div>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div style="display: table-cell">Row 1, Col 3</div>
+    </div>
+    <div style="display: block"> 
+      <div style="display: table-cell">Row 22, Col 1</div>
+      <div style="display: table-cell">Row 22, Col 2</div>
+      <div style="display: table-cell">Row 22, Col 3</div>
+    </div>
+    <div style="display: table-row"> 
+      <div style="display: table-cell">Row 333, Col 1</div>
+      <div style="display: table-cell">Row 333, Col 2</div>
+      <div style="display: table-cell">Row 333, Col 3</div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/cols-test-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display:table">
+      <div style="display: table-column; background: yellow"></div>
+      <div style="display: table-cell">Row 1, Col 1</div>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div style="display: table-cell">Row 1, Col 3</div>
+      <div style="display: table-column; background: cyan"></div>
+      <div style="display: table-row-group"> 
+        <div style="display: table-row">
+          <div style="display: table-cell">Row 22, Col 1</div>
+          <div style="display: table-cell">Row 22, Col 2</div>
+          <div style="display: table-cell">Row 22, Col 3</div>
+        </div>
+        <div style="display: table-row">
+          <div style="display: table-cell">Row 333, Col 1</div>
+          <div style="display: table-cell">Row 333, Col 2</div>
+          <div style="display: table-cell">Row 333, Col 3</div>
+        </div>
+      </div>
+      <div style="display: table-column; background: lime"></div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/cols-test-2.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display:table">
+      <div style="display: table-column; background: yellow"></div>
+      <div style="display: table-column; background: cyan"></div>
+      <div style="display: table-column; background: lime"></div>
+      <div style="display: table-cell">Row 1, Col 1</div>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div style="display: table-cell">Row 1, Col 3</div>
+      <div style="display: table-row-group"> 
+        <div style="display: table-row">
+          <div style="display: table-cell">Row 22, Col 1</div>
+          <div style="display: table-cell">Row 22, Col 2</div>
+          <div style="display: table-cell">Row 22, Col 3</div>
+        </div>
+        <div style="display: table-row">
+          <div style="display: table-cell">Row 333, Col 1</div>
+          <div style="display: table-cell">Row 333, Col 2</div>
+          <div style="display: table-cell">Row 333, Col 3</div>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/cols-test-3.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display:table">
+      <div style="display: table-cell">Row 1, Col 1</div>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div style="display: table-cell">Row 1, Col 3</div>
+      <div style="display: table-row-group"> 
+        <div style="display: table-row">
+          <div style="display: table-cell">Row 22, Col 1</div>
+          <div style="display: table-cell">Row 22, Col 2</div>
+          <div style="display: table-cell">Row 22, Col 3</div>
+        </div>
+        <div style="display: table-row">
+          <div style="display: table-cell">Row 333, Col 1</div>
+          <div style="display: table-cell">Row 333, Col 2</div>
+          <div style="display: table-cell">Row 333, Col 3</div>
+        </div>
+      </div>
+      <div style="display: table-column; background: yellow"></div>
+      <div style="display: table-column; background: cyan"></div>
+      <div style="display: table-column; background: lime"></div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-cells-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <!-- The test in the first row might not be correct, depending on spec
+         clarifications -->
+    <div style="display: table-row"> 
+      <span>Row 1, Col 1</span>
+      <span>Row 1, Col 2</span>
+      <span>Row 1, Col 3</span>
+    </div>
+    <div style="display: table-row"> 
+      <div style="display: block">Row 22, Col 1Row 22, Col 2Row 22, Col 3</div>
+    </div>
+    <div style="display: table-row">
+      <span>Row 333, Col 1</span><span>Row 333, Col 2</span><span>Row 333, Col 3</span>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-cells-2.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-row"> 
+      <!-- Trailing spaces in the spans needed only if the first test in
+           infer-cells-1.html is valid -->
+      <span>Row 1, </span>
+      <span>Col 1</span>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div>Row 1, Col 3</div>
+    </div>
+    <div style="display: table-row"> 
+      <div style="display: table-cell">Row 22, Col 1</div>
+      <span>Row </span>
+      <span>22, </span>
+      <span>Col </span>
+      <span>2</span>
+      <div style="display: table-cell">Row 22, Col 3</div>
+    </div>
+    <div style="display: table-row">
+      <div style="display: table-cell">Row 333, Col 1</div>
+      <div style="display: table-cell">Row 333, Col 2</div>
+      <span>Row </span>
+      <span>333, </span>
+      <span>Col </span>
+      <span>3</span>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-cells-3.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-row"> 
+      <!-- Trailing spaces in the spans needed only if the first test in
+           infer-cells-1.html is valid -->
+      <span>Row 1, </span>
+      <span>Col 1</span>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div style="display: table-row">Row 1, Col 3</div>
+    </div>
+    <div style="display: table-row"> 
+      <div style="display: table-cell">Row 22, Col 1</div>
+      <span>Row </span>
+      <span>22, </span>
+      <span>Col </span>
+      <span>2</span>
+      <div style="display: table-cell">Row 22, Col 3</div>
+    </div>
+    <div style="display: table-row">
+      <div style="display: table-row-group">Row 333, Col 1</div>
+      <div style="display: table-cell">Row 333, Col 2</div>
+      <span>Row </span>
+      <span>333, </span>
+      <span>Col </span>
+      <span>3</span>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-cells-4.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-row"> 
+      <!-- Trailing spaces in the spans needed only if the first test in
+           infer-cells-1.html is valid -->
+      <span>Row 1, </span>
+      <span>Col 1</span>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div style="display: table">Row 1, Col 3</div>
+    </div>
+    <div style="display: table-row"> 
+      <div style="display: table-cell">Row 22, Col 1</div>
+      <span>Row </span>
+      <span>22, </span>
+      <span>Col </span>
+      <span>2</span>
+      <div style="display: table-cell">Row 22, Col 3</div>
+    </div>
+    <div style="display: table-row">
+      <div style="display: inline-table">Row 333, Col 1</div>
+      <div style="display: table-cell">Row 333, Col 2</div>
+      <span>Row </span>
+      <span>333, </span>
+      <span>Col </span>
+      <span>3</span>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-first-row-and-table.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-cell">Row 1, Col 1</div>
+    <div style="display: table-cell">Row 1, Col 2</div>
+    <div style="display: table-cell">Row 1, Col 3</div>
+    <div style="display: table-row-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 22, Col 1</div>
+        <div style="display: table-cell">Row 22, Col 2</div>
+        <div style="display: table-cell">Row 22, Col 3</div>
+      </div>
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 333, Col 1</div>
+        <div style="display: table-cell">Row 333, Col 2</div>
+        <div style="display: table-cell">Row 333, Col 3</div>
+      </div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-first-row.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display:table">
+      <div style="display: table-cell">Row 1, Col 1</div>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div style="display: table-cell">Row 1, Col 3</div>
+      <div style="display: table-row-group"> 
+        <div style="display: table-row">
+          <div style="display: table-cell">Row 22, Col 1</div>
+          <div style="display: table-cell">Row 22, Col 2</div>
+          <div style="display: table-cell">Row 22, Col 3</div>
+        </div>
+        <div style="display: table-row">
+          <div style="display: table-cell">Row 333, Col 1</div>
+          <div style="display: table-cell">Row 333, Col 2</div>
+          <div style="display: table-cell">Row 333, Col 3</div>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-rows-inside-rowgroups.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-footer-group"> 
+      <div style="display: table-cell">Row 333, Col 1</div>
+      <div style="display: table-cell">Row 333, Col 2</div>
+      <div style="display: table-cell">Row 333, Col 3</div>
+    </div>
+    <div style="display: table-row-group"> 
+      <div style="display: table-cell">Row 22, Col 1</div>
+      <div style="display: table-cell">Row 22, Col 2</div>
+      <div style="display: table-cell">Row 22, Col 3</div>
+    </div>
+    <div style="display: table-header-group"> 
+      <div style="display: table-cell">Row 1, Col 1</div>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div style="display: table-cell">Row 1, Col 3</div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-second-row-and-table.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-row-group">
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 1, Col 1</div>
+        <div style="display: table-cell">Row 1, Col 2</div>
+        <div style="display: table-cell">Row 1, Col 3</div>
+      </div>
+    </div>
+    <div style="display: table-cell">Row 22, Col 1</div>
+    <div style="display: table-cell">Row 22, Col 2</div>
+    <div style="display: table-cell">Row 22, Col 3</div>
+    <div style="display: table-row-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 333, Col 1</div>
+        <div style="display: table-cell">Row 333, Col 2</div>
+        <div style="display: table-cell">Row 333, Col 3</div>
+      </div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-second-row.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display:table">
+      <div style="display: table-row-group">
+        <div style="display: table-row">
+          <div style="display: table-cell">Row 1, Col 1</div>
+          <div style="display: table-cell">Row 1, Col 2</div>
+          <div style="display: table-cell">Row 1, Col 3</div>
+        </div>
+      </div>
+      <div style="display: table-cell">Row 22, Col 1</div>
+      <div style="display: table-cell">Row 22, Col 2</div>
+      <div style="display: table-cell">Row 22, Col 3</div>
+      <div style="display: table-row-group"> 
+        <div style="display: table-row">
+          <div style="display: table-cell">Row 333, Col 1</div>
+          <div style="display: table-cell">Row 333, Col 2</div>
+          <div style="display: table-cell">Row 333, Col 3</div>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-table-around-headers-footers-1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-header-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 1, Col 1</div>
+        <div style="display: table-cell">Row 1, Col 2</div>
+        <div style="display: table-cell">Row 1, Col 3</div>
+      </div>
+    </div>
+    <div style="display: table-row-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 22, Col 1</div>
+        <div style="display: table-cell">Row 22, Col 2</div>
+        <div style="display: table-cell">Row 22, Col 3</div>
+      </div>
+    </div>
+    <div style="display: table-footer-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 333, Col 1</div>
+        <div style="display: table-cell">Row 333, Col 2</div>
+        <div style="display: table-cell">Row 333, Col 3</div>
+      </div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-table-around-headers-footers-2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-row-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 22, Col 1</div>
+        <div style="display: table-cell">Row 22, Col 2</div>
+        <div style="display: table-cell">Row 22, Col 3</div>
+      </div>
+    </div>
+    <div style="display: table-header-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 1, Col 1</div>
+        <div style="display: table-cell">Row 1, Col 2</div>
+        <div style="display: table-cell">Row 1, Col 3</div>
+      </div>
+    </div>
+    <div style="display: table-footer-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 333, Col 1</div>
+        <div style="display: table-cell">Row 333, Col 2</div>
+        <div style="display: table-cell">Row 333, Col 3</div>
+      </div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-table-around-headers-footers-3.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-footer-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 333, Col 1</div>
+        <div style="display: table-cell">Row 333, Col 2</div>
+        <div style="display: table-cell">Row 333, Col 3</div>
+      </div>
+    </div>
+    <div style="display: table-row-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 22, Col 1</div>
+        <div style="display: table-cell">Row 22, Col 2</div>
+        <div style="display: table-cell">Row 22, Col 3</div>
+      </div>
+    </div>
+    <div style="display: table-header-group"> 
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 1, Col 1</div>
+        <div style="display: table-cell">Row 1, Col 2</div>
+        <div style="display: table-cell">Row 1, Col 3</div>
+      </div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-table-row-cell.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-row-group">
+      <div style="display: table-cell">Row 1, Col 1</div>
+      <div style="display: block">Row 1, Col 2</div>
+      <div style="display: table-cell">Row 1, Col 3</div>
+    </div>
+    <div style="display: table-row-group">
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 22, Col 1</div>
+        <div style="display: table-cell">Row 22, Col 2</div>
+        <div style="display: table-cell">Row 22, Col 3</div>
+      </div>
+    </div>
+    <div style="display: table-row-group">
+      <div style="display: table-row">
+        <div style="display: table-cell">Row 333, Col 1</div>
+        <div style="display: table-cell">Row 333, Col 2</div>
+        <div style="display: table-cell">Row 333, Col 3</div>
+      </div>
+    </div>
+  </body>
+</html>
+
+
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/infer-table.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+  <body style="font-family: monospace">
+    <div style="display: table-row"> 
+      <div style="display: table-cell">Row 1, Col 1</div>
+      <div style="display: table-cell">Row 1, Col 2</div>
+      <div style="display: table-cell">Row 1, Col 3</div>
+    </div>
+    <div style="display: table-row"> 
+      <div style="display: table-cell">Row 22, Col 1</div>
+      <div style="display: table-cell">Row 22, Col 2</div>
+      <div style="display: table-cell">Row 22, Col 3</div>
+    </div>
+    <div style="display: table-row"> 
+      <div style="display: table-cell">Row 333, Col 1</div>
+      <div style="display: table-cell">Row 333, Col 2</div>
+      <div style="display: table-cell">Row 333, Col 3</div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/reftest.list
@@ -0,0 +1,21 @@
+== infer-first-row.html 3x3-ref.html
+== infer-first-row-and-table.html 3x3-ref.html
+== infer-second-row.html 3x3-ref.html
+== infer-second-row-and-table.html 3x3-ref.html
+== infer-table-around-headers-footers-1.html 3x3-ref.html
+== infer-table-around-headers-footers-2.html 3x3-ref.html
+== infer-table-around-headers-footers-3.html 3x3-ref.html
+== infer-rows-inside-rowgroups.html 3x3-ref.html
+== infer-table-row-cell.html 3x3-ref.html # Or should it be?  Spec is unclear.
+== infer-table.html 3x3-ref.html
+!= 3-tables-ref.html 3x3-ref.html
+== blocks-divide-tables-1.html 3-tables-ref.html
+== blocks-divide-tables-2.html 3-tables-ref.html
+== infer-cells-1.html 3-tables-ref.html
+== infer-cells-2.html 3x3-ref.html
+== infer-cells-3.html 3x3-ref.html
+== infer-cells-4.html 3x3-ref.html
+== cols-test-1.html 3x3-cols-ref.html
+== cols-test-2.html 3x3-cols-ref.html
+== cols-test-3.html 3x3-cols-ref.html
+== white-space-1.html white-space-1-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/white-space-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+  <body>
+    a bc d
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-anonymous-boxes/white-space-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html>
+  <body>
+    <div style="display: inline;">
+      <span>a</span>
+      <span style="display: table-cell">b</span>
+      <span style="display: table-cell">c</span>
+      <span>d</span>
+    </div>
+  </body>
+</html>