diff --git a/layout/reftests/reftest.list b/layout/reftests/reftest.list
index 22834114d1c..16c5383ef1c 100644
--- a/layout/reftests/reftest.list
+++ b/layout/reftests/reftest.list
@@ -93,6 +93,9 @@ include svg-integration/reftest.list
# table-background/
include table-background/reftest.list
+# table-bordercollapse/
+include table-bordercollapse/reftest.list
+
# table-dom/
include table-dom/reftest.list
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cell1.html b/layout/reftests/table-bordercollapse/bc_dyn_cell1.html
new file mode 100644
index 00000000000..81f6a928cb8
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cell1.html
@@ -0,0 +1,20 @@
+
+
border collapse dynamical change cell style
+
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c22 | c23 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cell1_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_cell1_ref.html
new file mode 100644
index 00000000000..d3737fe6a1e
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cell1_ref.html
@@ -0,0 +1,14 @@
+
+border collapse dynamical change cell style
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c22 | c23 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cell2.html b/layout/reftests/table-bordercollapse/bc_dyn_cell2.html
new file mode 100644
index 00000000000..56190f8625b
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cell2.html
@@ -0,0 +1,20 @@
+
+border collapse dynamical change cell color
+
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c22 | c23 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cell2_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_cell2_ref.html
new file mode 100644
index 00000000000..bd050f9c4f2
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cell2_ref.html
@@ -0,0 +1,15 @@
+
+border collapse dynamical change cell color
+
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c22 | c23 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cell3.html b/layout/reftests/table-bordercollapse/bc_dyn_cell3.html
new file mode 100644
index 00000000000..c43ffdab073
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cell3.html
@@ -0,0 +1,20 @@
+
+border collapse dynamical change cell border width
+
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c22 | c23 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cell3_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_cell3_ref.html
new file mode 100644
index 00000000000..4a7ff30155f
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cell3_ref.html
@@ -0,0 +1,14 @@
+
+border collapse dynamical change cell border width
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c22 | c23 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cell4.html b/layout/reftests/table-bordercollapse/bc_dyn_cell4.html
new file mode 100644
index 00000000000..8babe88d1e8
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cell4.html
@@ -0,0 +1,20 @@
+
+border collapse dynamical change colspan cell style
+
+
+
+
+
+ c11 | c12 | c13 |
+ c21 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cell4_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_cell4_ref.html
new file mode 100644
index 00000000000..4f0c47726b9
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cell4_ref.html
@@ -0,0 +1,14 @@
+
+border collapse dynamical change colspan cell style
+
+
+
+
+ c11 | c12 | c13 |
+ c21 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cell5.html b/layout/reftests/table-bordercollapse/bc_dyn_cell5.html
new file mode 100644
index 00000000000..b955e23b05e
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cell5.html
@@ -0,0 +1,20 @@
+
+border collapse dynamical change rowspan cell style
+
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c23 |
+ c31 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cell5_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_cell5_ref.html
new file mode 100644
index 00000000000..7b4cc903121
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cell5_ref.html
@@ -0,0 +1,14 @@
+
+border collapse dynamical change rowspan cell style
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c23 |
+ c31 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cg1.html b/layout/reftests/table-bordercollapse/bc_dyn_cg1.html
new file mode 100644
index 00000000000..fb6bf41cf59
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cg1.html
@@ -0,0 +1,27 @@
+
+border collapse dynamical change colgroup border color
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cg1_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_cg1_ref.html
new file mode 100644
index 00000000000..cceca5a6eea
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cg1_ref.html
@@ -0,0 +1,21 @@
+
+border collapse dynamical change colgroup border color
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cg2.html b/layout/reftests/table-bordercollapse/bc_dyn_cg2.html
new file mode 100644
index 00000000000..7206b5255f4
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cg2.html
@@ -0,0 +1,27 @@
+
+border collapse dynamical change colgroup border width
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cg2_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_cg2_ref.html
new file mode 100644
index 00000000000..21c5171289e
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cg2_ref.html
@@ -0,0 +1,21 @@
+
+border collapse dynamical change colgroup border width
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cg3.html b/layout/reftests/table-bordercollapse/bc_dyn_cg3.html
new file mode 100644
index 00000000000..e17c0986526
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cg3.html
@@ -0,0 +1,27 @@
+
+border collapse dynamical change colgroup border style
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_cg3_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_cg3_ref.html
new file mode 100644
index 00000000000..0949a427fb9
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_cg3_ref.html
@@ -0,0 +1,21 @@
+
+border collapse dynamical change colgroup border style
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_col1.html b/layout/reftests/table-bordercollapse/bc_dyn_col1.html
new file mode 100644
index 00000000000..9269c5c1b7d
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_col1.html
@@ -0,0 +1,27 @@
+
+border collapse dynamical change col border color
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_col2.html b/layout/reftests/table-bordercollapse/bc_dyn_col2.html
new file mode 100644
index 00000000000..9f83bf311ba
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_col2.html
@@ -0,0 +1,27 @@
+
+border collapse dynamical change col border width
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_col3.html b/layout/reftests/table-bordercollapse/bc_dyn_col3.html
new file mode 100644
index 00000000000..6bd634ecf11
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_col3.html
@@ -0,0 +1,27 @@
+
+border collapse dynamical change col border style
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_rg1.html b/layout/reftests/table-bordercollapse/bc_dyn_rg1.html
new file mode 100644
index 00000000000..083cbf2e632
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_rg1.html
@@ -0,0 +1,24 @@
+
+border collapse dynamical change rowgroup border color
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_rg1_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_rg1_ref.html
new file mode 100644
index 00000000000..6f094f1e762
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_rg1_ref.html
@@ -0,0 +1,18 @@
+
+border collapse dynamical change rowgroup border color
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_rg2.html b/layout/reftests/table-bordercollapse/bc_dyn_rg2.html
new file mode 100644
index 00000000000..18caf38991e
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_rg2.html
@@ -0,0 +1,24 @@
+
+border collapse dynamical change rowgroup border width
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_rg2_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_rg2_ref.html
new file mode 100644
index 00000000000..4218a6b1bc7
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_rg2_ref.html
@@ -0,0 +1,19 @@
+
+border collapse dynamical change rowgroup border width
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_rg3.html b/layout/reftests/table-bordercollapse/bc_dyn_rg3.html
new file mode 100644
index 00000000000..dccbfea0fc7
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_rg3.html
@@ -0,0 +1,24 @@
+
+border collapse dynamical change rowgroup border style
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_rg3_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_rg3_ref.html
new file mode 100644
index 00000000000..b479b684279
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_rg3_ref.html
@@ -0,0 +1,19 @@
+
+border collapse dynamical change rowgroup border style
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_row1.html b/layout/reftests/table-bordercollapse/bc_dyn_row1.html
new file mode 100644
index 00000000000..2c246b92d7f
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_row1.html
@@ -0,0 +1,20 @@
+
+border collapse dynamical change row border color
+
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c22 | c23 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_row2.html b/layout/reftests/table-bordercollapse/bc_dyn_row2.html
new file mode 100644
index 00000000000..e623a5f57e5
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_row2.html
@@ -0,0 +1,20 @@
+
+border collapse dynamical change row border width
+
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c22 | c23 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_row3.html b/layout/reftests/table-bordercollapse/bc_dyn_row3.html
new file mode 100644
index 00000000000..0714e6404be
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_row3.html
@@ -0,0 +1,20 @@
+
+border collapse dynamical change row border style
+
+
+
+
+
+ c11 | c12 | c13 |
+ c21 | c22 | c23 |
+ c31 | c32 | c33 |
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_table1.html b/layout/reftests/table-bordercollapse/bc_dyn_table1.html
new file mode 100644
index 00000000000..77e08f2e21a
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_table1.html
@@ -0,0 +1,27 @@
+
+border collapse dynamical change table border color
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_table1_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_table1_ref.html
new file mode 100644
index 00000000000..4627a6c3e75
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_table1_ref.html
@@ -0,0 +1,22 @@
+
+border collapse dynamical change table border color
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_table2.html b/layout/reftests/table-bordercollapse/bc_dyn_table2.html
new file mode 100644
index 00000000000..b74d3a8917e
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_table2.html
@@ -0,0 +1,27 @@
+
+border collapse dynamical change table border width
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_table2_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_table2_ref.html
new file mode 100644
index 00000000000..aee3993ef2a
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_table2_ref.html
@@ -0,0 +1,21 @@
+
+border collapse dynamical change table border width
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_table3.html b/layout/reftests/table-bordercollapse/bc_dyn_table3.html
new file mode 100644
index 00000000000..ff1cb3e0123
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_table3.html
@@ -0,0 +1,27 @@
+
+border collapse dynamical change table border style
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/bc_dyn_table3_ref.html b/layout/reftests/table-bordercollapse/bc_dyn_table3_ref.html
new file mode 100644
index 00000000000..e846a5d8962
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bc_dyn_table3_ref.html
@@ -0,0 +1,22 @@
+
+border collapse dynamical change table border style
+
+
+
+
+
+
+
+
+c11 | c12 | c13 |
+
+ c21 | c22 | c23 |
+
+
+ c31 | c32 | c33 |
+
+
+
diff --git a/layout/reftests/table-bordercollapse/reftest.list b/layout/reftests/table-bordercollapse/reftest.list
new file mode 100644
index 00000000000..93c43472bb6
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/reftest.list
@@ -0,0 +1,20 @@
+== bc_dyn_cell1.html bc_dyn_cell1_ref.html
+== bc_dyn_cell2.html bc_dyn_cell2_ref.html
+== bc_dyn_cell3.html bc_dyn_cell3_ref.html
+== bc_dyn_cell4.html bc_dyn_cell4_ref.html
+== bc_dyn_cell5.html bc_dyn_cell5_ref.html
+== bc_dyn_row1.html bc_dyn_rg1_ref.html
+== bc_dyn_row2.html bc_dyn_rg2_ref.html
+== bc_dyn_row3.html bc_dyn_rg3_ref.html
+== bc_dyn_rg1.html bc_dyn_rg1_ref.html
+== bc_dyn_rg2.html bc_dyn_rg2_ref.html
+== bc_dyn_rg3.html bc_dyn_rg3_ref.html
+== bc_dyn_col1.html bc_dyn_cg1_ref.html
+== bc_dyn_col2.html bc_dyn_cg2_ref.html
+== bc_dyn_col3.html bc_dyn_cg3_ref.html
+== bc_dyn_cg1.html bc_dyn_cg1_ref.html
+== bc_dyn_cg2.html bc_dyn_cg2_ref.html
+== bc_dyn_cg3.html bc_dyn_cg3_ref.html
+== bc_dyn_table1.html bc_dyn_table1_ref.html
+== bc_dyn_table2.html bc_dyn_table2_ref.html
+== bc_dyn_table3.html bc_dyn_table3_ref.html