Bug 573960 - Make the bordercolor attribute on table elements work again; r=bernd a=blocking-betaN+
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 31 Jan 2011 16:23:01 -0500
changeset 62147 152fe0de3c821983c5e42b9bbdacdff6606e6b9f
parent 62146 791cca7bf97b95accfa1c4c72acb8b68a9c75d4e
child 62148 39959be42c6f52fc3e976d6826ad140896747daf
push id18620
push usereakhgari@mozilla.com
push dateTue, 08 Feb 2011 19:02:33 +0000
treeherdermozilla-central@152fe0de3c82 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbernd, blocking-betaN
bugs573960
milestone2.0b12pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 573960 - Make the bordercolor attribute on table elements work again; r=bernd a=blocking-betaN+
layout/reftests/table-bordercollapse/bordercolor-1.html
layout/reftests/table-bordercollapse/bordercolor-2.html
layout/reftests/table-bordercollapse/bordercolor-3-ref.html
layout/reftests/table-bordercollapse/bordercolor-3.html
layout/reftests/table-bordercollapse/bordercolor-4-ref.html
layout/reftests/table-bordercollapse/bordercolor-4.html
layout/reftests/table-bordercollapse/bordercolor-ref.html
layout/reftests/table-bordercollapse/bordercolor.html
layout/reftests/table-bordercollapse/borderhandling-8.html
layout/reftests/table-bordercollapse/borderhandling-frame-border-ref.html
layout/reftests/table-bordercollapse/borderhandling-frame-border.html
layout/reftests/table-bordercollapse/borderhandling-rules-border-ref.html
layout/reftests/table-bordercollapse/borderhandling-strict-ref.html
layout/reftests/table-bordercollapse/reftest.list
layout/style/html.css
layout/style/quirk.css
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bordercolor-1.html
@@ -0,0 +1,17 @@
+<!doctype html public "-//w3c//dtd html 3.2//en">
+
+<html>
+
+<head>
+<title>bordercolor</title>
+</head>
+
+<body >
+<table border="1" bordercolor="green">
+<tr><td>c1</td></tr>
+</table>
+
+
+</body>
+
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bordercolor-2.html
@@ -0,0 +1,17 @@
+<!doctype html public "-//w3c//dtd html 3.2//en">
+
+<html>
+
+<head>
+<title>bordercolor</title>
+</head>
+
+<body >
+<table border="1" bordercolor="blue">
+<tr><td>c1</td></tr>
+</table>
+
+
+</body>
+
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bordercolor-3-ref.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html >
+ <head>
+  <title>CSS Test: HTML bordercolor Attribute</title>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="RELEVANT_SPEC_SECTION"/>
+  <meta name="assert" content="Figure out which rules are ignored and how."/>
+  <style type="text/css">
+    html { color: blue; }
+    table { margin: 0.5em; }
+    .thin, .elemthin { border-width: thin; border-style: outset; }
+    .thin * { border-width: thin; border-style: inset; }
+    .orange, .orange *, .elemorange { border-color: orange; }
+  </style>
+ </head>
+ <body>
+  <table class="orange thin">
+    <tr><td>A<td>A
+  </table>
+
+  <table class="elemorange elemthin">
+    <tr><td>B<td>B
+  </table>
+
+  <table class=orange style="border-collapse: collapse;">
+    <tr><td style="border-right-width: thin; border-right-style: solid;
+        border-bottom-width: thin; border-bottom-style: solid;">C
+        <td style="border-bottom-width: thin; border-bottom-style: solid;">C
+    <tr><td style="border-right-width: thin; border-right-style: solid;">C<td>C
+  </table>
+
+  <table class=orange style="border-collapse: collapse;">
+    <tr><td style="border-right-width: thin; border-right-style: solid;">D<td>D
+    <tr><td style="border-right-width: thin; border-right-style: solid;">D<td>D
+  </table>
+
+  <table>
+    <tr><td>E<td>E
+    <tr><td>E<td>E
+  </table>
+
+  <table>
+    <tr><td>F<td>F
+  </table>
+
+  <table style="border-collapse: collapse;">
+    <tr class=orange><td style="border-right-width: thin; border-right-style: solid;
+        border-bottom-width: thin; border-bottom-style: solid;">G
+        <td style="border-bottom-width: thin; border-bottom-style: solid;">G
+    <tr class=orange><td style="border-right-width: thin; border-right-style: solid;">G<td>G
+  </table>
+
+  <table class="elemorange thin">
+    <tr><td>H<td>H
+  </table>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bordercolor-3.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html >
+ <head>
+  <title>CSS Test: HTML bordercolor Attribute</title>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="RELEVANT_SPEC_SECTION"/>
+  <meta name="assert" content="Figure out which rules are ignored and how."/>
+  <style type="text/css">
+    html { color: lime; }
+    table { margin: 0.5em; }
+    td { color: blue; }
+  </style>
+ </head>
+ <body>
+  <table bordercolor=orange border>
+    <tr><td>A<td>A
+  </table>
+
+  <table bordercolor=orange frame=border>
+    <tr><td>B<td>B
+  </table>
+
+  <table bordercolor=orange rules=all>
+    <tr><td>C<td>C
+    <tr><td>C<td>C
+  </table>
+
+  <table bordercolor=orange rules=cols>
+    <tr><td>D<td>D
+    <tr><td>D<td>D
+  </table>
+
+  <table bordercolor=orange rules=none>
+    <tr><td>E<td>E
+    <tr><td>E<td>E
+  </table>
+
+  <table bordercolor=orange>
+    <tr><td>F<td>F
+  </table>
+
+  <table bordercolor=orange rules=all frame=none>
+    <tr><td>G<td>G
+    <tr><td>G<td>G
+  </table>
+
+  <table style="border-color: orange;" border>
+    <tr><td>H<td>H
+  </table>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bordercolor-4-ref.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+<head>
+
+<style type="text/css">
+
+/* just to improve vissibility */
+td {
+   border-width: 3px;
+   border-style: solid;
+}
+
+</style>
+
+</head>
+<body>
+    <table border="5" style="border-color:blue;">
+    <caption>TABLE with CSS border-color:blue</caption>
+      <tr>
+        <td style="border-color: black;">Row 1</td>
+      </tr>
+      <tr>
+        <td style="color:red; border-color: red;">Row 2</td>
+      </tr>
+      <tr>
+        <td style="border-color:green">Row 3</td>
+      </tr>
+    </table>
+<br>
+
+    <table border="5" style="border-color: orange;">
+    <caption>TABLE with HTML bordercolor attribute=orange</caption>
+      <tr>
+        <td style="border-color: orange">Row 1</td>
+      </tr>
+      <tr>
+        <td style="color:red; border-color: orange">Row 2</td>
+      </tr>
+      <tr>
+        <td style="border-color:green">Row 3</td>
+      </tr>
+    </table>
+<br>
+
+    <table border="5" style="border-color:blue;">
+    <caption>TABLE with CSS border-color:blue and HTML bordercolor attribute=orange</caption>
+      <tr>
+        <td style="border-color: blue;">Row 1</td>
+      </tr>
+      <tr>
+        <td style="color:red; border-color: blue;">Row 2</td>
+      </tr>
+      <tr>
+        <td style="border-color:green">Row 3</td>
+      </tr>
+    </table>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bordercolor-4.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+<head>
+
+<style type="text/css">
+
+/* just to improve vissibility */
+td {
+   border-width: 3px;
+   border-style: solid;
+}
+
+</style>
+
+</head>
+<body>
+    <table border="5" style="border-color:blue;">
+    <caption>TABLE with CSS border-color:blue</caption>
+      <tr>
+        <td>Row 1</td>
+      </tr>
+      <tr>
+        <td style="color:red">Row 2</td>
+      </tr>
+      <tr>
+        <td style="border-color:green">Row 3</td>
+      </tr>
+    </table>
+<br>
+
+    <table border="5" bordercolor="orange">
+    <caption>TABLE with HTML bordercolor attribute=orange</caption>
+      <tr>
+        <td>Row 1</td>
+      </tr>
+      <tr>
+        <td style="color:red">Row 2</td>
+      </tr>
+      <tr>
+        <td style="border-color:green">Row 3</td>
+      </tr>
+    </table>
+<br>
+
+    <table border="5" bordercolor="orange" style="border-color:blue;">
+    <caption>TABLE with CSS border-color:blue and HTML bordercolor attribute=orange</caption>
+      <tr>
+        <td>Row 1</td>
+      </tr>
+      <tr>
+        <td style="color:red">Row 2</td>
+      </tr>
+      <tr>
+        <td style="border-color:green">Row 3</td>
+      </tr>
+    </table>
+
+</body>
+</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/bordercolor-ref.html
@@ -0,0 +1,22 @@
+<!doctype html public "-//w3c//dtd html 3.2//en">
+
+<html>
+
+<head>
+<title>bordercolor</title>
+<style>
+table, td {
+   border-color: green;
+ }
+</style>
+</head>
+
+<body >
+<table border="1" bordercolor="blue">
+<tr><td>c1</td></tr>
+</table>
+
+
+</body>
+
+</html>
deleted file mode 100644
--- a/layout/reftests/table-bordercollapse/bordercolor.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html public "-//w3c//dtd html 3.2//en">
-
-<html>
-
-<head>
-<title>bordercolor</title>
-</head>
-
-<body >
-<table bordercolor="green">
-<tr><td>c1</td></tr>
-</table>
-
-
-</body>
-
-</html>
--- a/layout/reftests/table-bordercollapse/borderhandling-8.html
+++ b/layout/reftests/table-bordercollapse/borderhandling-8.html
@@ -1,8 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
 <style>
 div {width: 50px; height: 50px;}
 table {border-collapse:separate;
        border: outset 1px  black;
        }
--- a/layout/reftests/table-bordercollapse/borderhandling-frame-border-ref.html
+++ b/layout/reftests/table-bordercollapse/borderhandling-frame-border-ref.html
@@ -1,8 +1,9 @@
+<!DOCTYPE html>
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
 <style>
 div {width: 3px; height: 3px;}
 table.frame {border: outset thin ;}
 table.frameTop {border-top: outset thin ;}
 table.frameBottom {border-bottom: outset thin ;}
--- a/layout/reftests/table-bordercollapse/borderhandling-frame-border.html
+++ b/layout/reftests/table-bordercollapse/borderhandling-frame-border.html
@@ -1,8 +1,9 @@
+<!DOCTYPE html>
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
 <style>
 div {width: 3px; height: 3px;}
 
 
 </style>
@@ -94,9 +95,9 @@ div {width: 3px; height: 3px;}
 <td><table frame="border" border><tr><td><div/></td></tr></table></td>
 <td><table frame="border" border="0"><tr><td><div/></td></tr></table></td>
 <td><table frame="border" border="1"><tr><td><div/></td></tr></table></td>
 <td><table frame="border" border="3"><tr><td><div/></td></tr></table></td>
 </tr>
 </table>
 
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/layout/reftests/table-bordercollapse/borderhandling-rules-border-ref.html
+++ b/layout/reftests/table-bordercollapse/borderhandling-rules-border-ref.html
@@ -1,20 +1,20 @@
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
 <style>
 div {width: 3px; height: 3px;}
 div {width: 3px; height: 3px;}
-table.frame {border: outset thin ;}
+table.frame {border-style: outset; border-width: thin ;}
 
 table.bc{ border-collapse:collapse; border-style: hidden}
-.bcborder {border: 1px solid}
-td.inner {border: inset thin;}
-table.inner td {border: inset thin;}
+.bcborder {border-width: 1px; border-style: solid}
+td.inner {border-style: inset; border-width: thin;}
+table.inner td {border-style: inset; border-width: thin;}
 </style>
 </head>
 <body>
 <table cellpadding="5" rules="all">
 <tr><th>rules/border</th><th>empty</th><th>border</th><th>border="0"</th><th>border="1"</th><th>border="3"</th></tr>
 <tr><th>empty</th>
 <td><table>
    <colgroup><col><col></colgroup>
@@ -132,38 +132,38 @@ table.inner td {border: inset thin;}
 <td>
 <table class="bc">
    <colgroup class="bcborder"><col><col></colgroup>
    <colgroup class="bcborder"><col></colgroup>
    <thead class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr><tr><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table class="bc" style="border: 1px solid">
+<td><table class="bc" style="border-width: 1px; border-style: solid">
    <colgroup class="bcborder"><col><col></colgroup>
    <colgroup class="bcborder"><col></colgroup>
    <thead class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr><tr><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
 <td><table class="bc">
    <colgroup class="bcborder"><col><col></colgroup>
    <colgroup class="bcborder"><col></colgroup>
    <thead class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr><tr><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table class="bc" style="border: 1px solid">
+<td><table class="bc" style="border-width: 1px; border-style: solid">
    <colgroup class="bcborder"><col><col></colgroup>
    <colgroup class="bcborder"><col></colgroup>
    <thead class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr><tr><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table class="bc" style="border: 3px outset">
+<td><table class="bc" style="border-width: 3px; border-style: outset">
    <colgroup class="bcborder"><col><col></colgroup>
    <colgroup class="bcborder"><col></colgroup>
    <thead class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody class="bcborder"><tr><td><div/></td><td><div/></td><td><div/></td></tr><tr><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
 </tr>
 
@@ -175,38 +175,38 @@ table.inner td {border: inset thin;}
 <td>
 <table class="bc">
    <colgroup><col><col></colgroup>
    <colgroup><col></colgroup>
    <thead><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table class="bc" style="border: 1px solid">
+<td><table class="bc" style="border-width: 1px; border-style: solid">
    <colgroup><col><col></colgroup>
    <colgroup><col></colgroup>
    <thead><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
 <td><table class="bc">
   <colgroup><col><col></colgroup>
    <colgroup><col></colgroup>
    <thead><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table class="bc" style="border: 1px solid">
+<td><table class="bc" style="border-width: 1px; border-style: solid">
    <colgroup><col><col></colgroup>
    <colgroup><col></colgroup>
    <thead><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table class="bc" style="border: 3px outset">
+<td><table class="bc" style="border-width: 3px; border-style: outset">
   <colgroup><col><col></colgroup>
    <colgroup><col></colgroup>
    <thead><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
 </tr>
 
@@ -214,38 +214,38 @@ table.inner td {border: inset thin;}
 <td>
 <table table class="bc" >
    <colgroup><col class="bcborder"><col class="bcborder"></colgroup>
    <colgroup><col class="bcborder"></colgroup>
    <thead><tr><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr><td><div/></td><td><div/></td><td><div/></td></tr><tr><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table table class="bc" style="border: 1px solid">
+<td><table table class="bc" style="border-width: 1px; border-style: solid">
    <colgroup><col class="bcborder"><col class="bcborder"></colgroup>
    <colgroup><col class="bcborder"></colgroup>
    <thead><tr><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr><td><div/></td><td><div/></td><td><div/></td></tr><tr><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
 <td><table table class="bc" >
    <colgroup><col class="bcborder"><col class="bcborder"></colgroup>
    <colgroup><col class="bcborder"></colgroup>
    <thead><tr><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr><td><div/></td><td><div/></td><td><div/></td></tr><tr><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table table class="bc" style="border: 1px solid">
+<td><table table class="bc" style="border-width: 1px; border-style: solid">
    <colgroup><col class="bcborder"><col class="bcborder"></colgroup>
    <colgroup><col class="bcborder"></colgroup>
    <thead><tr><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr><td><div/></td><td><div/></td><td><div/></td></tr><tr><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table table class="bc" style="border: 3px outset">
+<td><table table class="bc" style="border-width: 3px; border-style: outset">
    <colgroup><col class="bcborder"><col class="bcborder"></colgroup>
    <colgroup><col class="bcborder"></colgroup>
    <thead><tr><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr><td><div/></td><td><div/></td><td><div/></td></tr><tr><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
 </tr>
 
@@ -253,41 +253,41 @@ table.inner td {border: inset thin;}
 <td>
 <table class="bc">
    <colgroup><col class="bcborder"><col class="bcborder"></colgroup>
    <colgroup><col class="bcborder"></colgroup>
    <thead><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table class="bc" style="border: 1px solid">
+<td><table class="bc" style="border-width: 1px; border-style: solid">
    <colgroup><col class="bcborder"><col class="bcborder"></colgroup>
    <colgroup><col class="bcborder"></colgroup>
    <thead><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
 <td><table class="bc">
   <colgroup><col class="bcborder"><col class="bcborder"></colgroup>
    <colgroup><col class="bcborder"></colgroup>
    <thead><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table class="bc" style="border: 1px solid">
+<td><table class="bc" style="border-width: 1px; border-style: solid">
    <colgroup><col class="bcborder"><col class="bcborder"></colgroup>
    <colgroup><col class="bcborder"></colgroup>
    <thead><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
-<td><table class="bc" style="border: 3px outset">
+<td><table class="bc" style="border-width: 3px; border-style: outset">
   <colgroup><col class="bcborder"><col class="bcborder"></colgroup>
    <colgroup><col class="bcborder"></colgroup>
    <thead><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></thead>
    <tfoot><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tfoot>
    <tbody><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr><tr class="bcborder"><td><div/></td><td><div/></td><td><div/></td></tr></tbody>
 </table></td>
 </tr>
 </table>
 
 </body>
-</html>
\ No newline at end of file
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/table-bordercollapse/borderhandling-strict-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+<style>
+div {width: 50px; height: 50px;}
+</style>
+</head>
+<body>
+<table border=1><tbody><tr><td><div/></td></tr></tbody></table>
+</body>
+</html>
--- a/layout/reftests/table-bordercollapse/reftest.list
+++ b/layout/reftests/table-bordercollapse/reftest.list
@@ -64,14 +64,18 @@ fails-if(cocoaWidget) == bc_borderoffset
 == frame_vsides_rules_cols.html frame_vsides_rules_cols_ref.html
 == frame_vsides_rules_groups.html frame_vsides_rules_groups_ref.html
 == frame_vsides_rules_none.html frame_vsides_rules_none_ref.html
 == frame_vsides_rules_rows.html frame_vsides_rules_rows_ref.html
 == borderhandling-1.html borderhandling-ref.html
 == borderhandling-2.html borderhandling-ref.html
 == borderhandling-3.html borderhandling-ref.html
 == borderhandling-4.html borderhandling-ref.html
-== borderhandling-5.xhtml borderhandling-ref.html
-== borderhandling-6.xhtml borderhandling-ref.html
-== borderhandling-7.xhtml borderhandling-ref.html
-== borderhandling-8.html borderhandling-ref.html
+== borderhandling-5.xhtml borderhandling-strict-ref.html
+== borderhandling-6.xhtml borderhandling-strict-ref.html
+== borderhandling-7.xhtml borderhandling-strict-ref.html
+== borderhandling-8.html borderhandling-strict-ref.html
 == borderhandling-frame-border.html borderhandling-frame-border-ref.html
 random == borderhandling-rules-border.html borderhandling-rules-border-ref.html # bug 540360 (depends on bug 540256)
+== bordercolor-1.html bordercolor-ref.html
+!= bordercolor-2.html bordercolor-ref.html
+== bordercolor-3.html bordercolor-3-ref.html
+== bordercolor-4.html bordercolor-4-ref.html
--- a/layout/style/html.css
+++ b/layout/style/html.css
@@ -282,28 +282,30 @@ table[align="right"] {
 /* border collapse rules */
 
   /* Set hidden if we have 'frame' or 'rules' attribute.
      Set it on all sides when we do so there's more consistency
      in what authors should expect */
 
   /* Put this first so 'border' and 'frame' rules can override it. */
 table[rules] { 
-  border: thin hidden; 
+  border-width: thin;
+  border-style: hidden;
 }
 
   /* 'border' before 'frame' so 'frame' overrides
       A border with a given value should, of course, pass that value
       as the border-width in pixels -> attr mapping */
 
   /* :-moz-table-border-nonzero is like [border]:not([border="0"]) except it
      also checks for other zero-like values according to HTML attribute
      parsing rules */
 table:-moz-table-border-nonzero { 
-  border: thin outset; 
+  border-width: thin;
+  border-style: outset;
 }
 
 table[frame] {
   border: thin hidden;
 }
 
 /* specificity must beat table:-moz-table-border-nonzero rule above */
 table[frame="void"]   { border-style: hidden; }
@@ -323,81 +325,93 @@ table[frame="border"] { border-style: ou
 
 table:-moz-table-border-nonzero > * > tr > td,
 table:-moz-table-border-nonzero > * > tr > th,
 table:-moz-table-border-nonzero > * > td,
 table:-moz-table-border-nonzero > * > th,
 table:-moz-table-border-nonzero > td,
 table:-moz-table-border-nonzero > th
 {
-  border: thin inset;
+  border-width: thin;
+  border-style: inset;
 }
 
 /* collapse only if rules are really specified */
 table[rules]:not([rules="none"]):not([rules=""]) {
   border-collapse: collapse;
 }
 
 /* only specified rules override 'border' settings  
   (increased specificity to achieve this) */
 table[rules]:not([rules=""])> tr > td,
 table[rules]:not([rules=""])> * > tr > td,
 table[rules]:not([rules=""])> tr > th,
 table[rules]:not([rules=""])> * > tr > th,
 table[rules]:not([rules=""])> td,
 table[rules]:not([rules=""])> th
 {
-  border: thin none;
+  border-width: thin;
+  border-style: none;
 }
 
 
 table[rules][rules="none"]  > tr > td,
 table[rules][rules="none"] > * > tr > td,
 table[rules][rules="none"] > tr > th,
 table[rules][rules="none"] > * > tr > th,
 table[rules][rules="none"] > td,
 table[rules][rules="none"] > th
 {
-  border: thin hidden;
+  border-width: thin;
+  border-style: hidden;
 }
 
 table[rules][rules="all"] > tr > td,
 table[rules][rules="all"] > * > tr > td,
 table[rules][rules="all"] > tr > th,
 table[rules][rules="all"] > * > tr > th,
 table[rules][rules="all"] > td,
 table[rules][rules="all"] > th 
 {
-  border: thin solid ;
+  border-width: thin;
+  border-style: solid;
 }
 
 table[rules][rules="rows"] > tr,
 table[rules][rules="rows"] > * > tr {
-  border-top: thin solid;
-  border-bottom: thin solid;
+  border-top-width: thin;
+  border-bottom-width: thin;
+  border-top-style: solid;
+  border-bottom-style: solid;
 }
 
 
 table[rules][rules="cols"] > tr > td,
 table[rules][rules="cols"] > * > tr > td,
 table[rules][rules="cols"] > tr > th,
 table[rules][rules="cols"] > * > tr > th {
-  border-left: thin solid;
-  border-right: thin solid;
+  border-left-width: thin;
+  border-right-width: thin;
+  border-left-style: solid;
+  border-right-style: solid;
 }
 
 table[rules][rules="groups"] > colgroup {
-  border-left: thin solid;
-  border-right: thin solid;
+  border-left-width: thin;
+  border-right-width: thin;
+  border-left-style: solid;
+  border-right-style: solid;
 }
 table[rules][rules="groups"] > tfoot,
 table[rules][rules="groups"] > thead,
 table[rules][rules="groups"] > tbody {
-  border-top: thin solid;
-  border-bottom: thin solid;
+  border-top-width: thin;
+  border-bottom-width: thin;
+  border-top-style: solid;
+  border-bottom-style: solid;
 }
   
   
 /* caption inherits from table not table-outer */  
 caption {
   display: table-caption;
   text-align: center;
   -moz-box-sizing: border-box;
@@ -465,16 +479,30 @@ th {
 
 tr > form:-moz-is-html, tbody > form:-moz-is-html,
 thead > form:-moz-is-html, tfoot > form:-moz-is-html,
 table > form:-moz-is-html {
   /* Important: don't show these forms in HTML */
   display: none !important;
 }
 
+table[bordercolor] > tbody,
+table[bordercolor] > thead,
+table[bordercolor] > tfoot,
+table[bordercolor] > col,
+table[bordercolor] > colgroup,
+table[bordercolor] > tr,
+table[bordercolor] > * > tr,
+table[bordercolor]  > tr > td,
+table[bordercolor] > * > tr > td,
+table[bordercolor]  > tr > th,
+table[bordercolor] > * > tr > th {
+  border-color: inherit;
+}
+
 /* inlines */
 
 q:before {
   content: open-quote;
 }
 
 q:after {
   content: close-quote;
--- a/layout/style/quirk.css
+++ b/layout/style/quirk.css
@@ -91,17 +91,17 @@ table {
   font-style: -moz-initial;
   font-variant: -moz-initial;
 }
 
 /*
  * Make table borders gray for compatibility with what other browsers do
  * in all modes, rather than using the foreground color.
  */
-table, td, th {
+table, td, th, tr, thead, tbody, tfoot, colgroup, col {
   border-color: gray;
 }
 
 
 /* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
 
 /*
  * While it may seem simpler to use :-moz-first-node and :-moz-last-node without