summaryrefslogtreecommitdiffstats
path: root/layout/reftests/text-decoration
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/reftests/text-decoration
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/text-decoration')
-rw-r--r--layout/reftests/text-decoration/1133392-ref.html17
-rw-r--r--layout/reftests/text-decoration/1133392.html36
-rw-r--r--layout/reftests/text-decoration/1159729-offset-adjustment-notref.html19
-rw-r--r--layout/reftests/text-decoration/1159729-offset-adjustment.html21
-rw-r--r--layout/reftests/text-decoration/641444-1-ref.html38
-rw-r--r--layout/reftests/text-decoration/641444-1.html38
-rw-r--r--layout/reftests/text-decoration/676538-1-ref.html23
-rw-r--r--layout/reftests/text-decoration/676538-1.html22
-rw-r--r--layout/reftests/text-decoration/complex-decoration-style-quirks-ref.html102
-rw-r--r--layout/reftests/text-decoration/complex-decoration-style-quirks.html114
-rw-r--r--layout/reftests/text-decoration/complex-decoration-style-standards-ref.html103
-rw-r--r--layout/reftests/text-decoration/complex-decoration-style-standards.html115
-rw-r--r--layout/reftests/text-decoration/decoration-color-override-quirks-ref.html5
-rw-r--r--layout/reftests/text-decoration/decoration-color-override-quirks.html5
-rw-r--r--layout/reftests/text-decoration/decoration-color-override-standards-ref.html6
-rw-r--r--layout/reftests/text-decoration/decoration-color-override-standards.html6
-rw-r--r--layout/reftests/text-decoration/decoration-color-quirks-ref.html70
-rw-r--r--layout/reftests/text-decoration/decoration-color-quirks.html79
-rw-r--r--layout/reftests/text-decoration/decoration-color-standards-ref.html72
-rw-r--r--layout/reftests/text-decoration/decoration-color-standards.html78
-rw-r--r--layout/reftests/text-decoration/decoration-css21-block-ref.html16
-rw-r--r--layout/reftests/text-decoration/decoration-css21-block.html14
-rw-r--r--layout/reftests/text-decoration/decoration-css21-ref.html29
-rw-r--r--layout/reftests/text-decoration/decoration-css21.html29
-rw-r--r--layout/reftests/text-decoration/decoration-style-quirks-ref.html49
-rw-r--r--layout/reftests/text-decoration/decoration-style-quirks.html42
-rw-r--r--layout/reftests/text-decoration/decoration-style-standards-ref.html34
-rw-r--r--layout/reftests/text-decoration/decoration-style-standards.html34
-rw-r--r--layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-1-ref.html21
-rw-r--r--layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-1.html26
-rw-r--r--layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-2-ref.html21
-rw-r--r--layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-2.html26
-rw-r--r--layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-1-ref.html22
-rw-r--r--layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-1.html27
-rw-r--r--layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-2-ref.html22
-rw-r--r--layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-2.html27
-rw-r--r--layout/reftests/text-decoration/emphasis-style-dynamic-ref.html12
-rw-r--r--layout/reftests/text-decoration/emphasis-style-dynamic.html20
-rw-r--r--layout/reftests/text-decoration/inline-baseline-almost-standards-ref.html10
-rw-r--r--layout/reftests/text-decoration/inline-baseline-almost-standards.html10
-rw-r--r--layout/reftests/text-decoration/inline-baseline-quirks-ref.html8
-rw-r--r--layout/reftests/text-decoration/inline-baseline-quirks.html8
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-dashed-quirks.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-dashed-standards.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-dotted-quirks.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-dotted-standards.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-double-quirks.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-double-standards.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-quirks-ref.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-solid-quirks.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-solid-standards.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-standards-ref.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-wavy-quirks.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-block-wavy-standards.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-dashed-quirks.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-dashed-standards.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-dotted-quirks.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-dotted-standards.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-double-quirks.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-double-standards.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-quirks-ref.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-solid-quirks.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-solid-standards.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-standards-ref.html2
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-wavy-quirks.html1
-rw-r--r--layout/reftests/text-decoration/line-through-style-inline-wavy-standards.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-block-dashed-quirks.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-block-dashed-standards.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-block-dotted-quirks.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-block-dotted-standards.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-block-double-quirks.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-block-double-standards.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-block-quirks-ref.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-block-solid-quirks.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-block-solid-standards.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-block-standards-ref.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-block-wavy-quirks.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-block-wavy-standards.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-dashed-quirks.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-dashed-standards.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-dotted-quirks.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-dotted-standards.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-double-quirks.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-double-standards.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-quirks-ref.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-solid-quirks.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-solid-standards.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-standards-ref.html2
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-wavy-quirks.html1
-rw-r--r--layout/reftests/text-decoration/overline-style-inline-wavy-standards.html2
-rw-r--r--layout/reftests/text-decoration/reftest-stylo.list119
-rw-r--r--layout/reftests/text-decoration/reftest.list112
-rw-r--r--layout/reftests/text-decoration/table-quirk-1-ref.html7
-rw-r--r--layout/reftests/text-decoration/table-quirk-1.html7
-rw-r--r--layout/reftests/text-decoration/table-quirk-2-ref.html26
-rw-r--r--layout/reftests/text-decoration/table-quirk-2.html35
-rw-r--r--layout/reftests/text-decoration/text-decoration-propagation-1-quirks-ref.html34
-rw-r--r--layout/reftests/text-decoration/text-decoration-propagation-1-quirks.html42
-rw-r--r--layout/reftests/text-decoration/text-decoration-propagation-1-standards-ref.html35
-rw-r--r--layout/reftests/text-decoration/text-decoration-propagation-1-standards.html43
-rw-r--r--layout/reftests/text-decoration/text-decoration-zorder-1-quirks.html44
-rw-r--r--layout/reftests/text-decoration/text-decoration-zorder-1-ref.html55
-rw-r--r--layout/reftests/text-decoration/text-decoration-zorder-1-standards.html46
-rw-r--r--layout/reftests/text-decoration/underline-block-propagation-2-quirks-ref.html40
-rw-r--r--layout/reftests/text-decoration/underline-block-propagation-2-quirks.html35
-rw-r--r--layout/reftests/text-decoration/underline-block-propagation-2-standards-ref.html39
-rw-r--r--layout/reftests/text-decoration/underline-block-propagation-2-standards.html33
-rw-r--r--layout/reftests/text-decoration/underline-block-propagation-quirks-ref.html13
-rw-r--r--layout/reftests/text-decoration/underline-block-propagation-quirks.html13
-rw-r--r--layout/reftests/text-decoration/underline-block-propagation-standards-ref.html14
-rw-r--r--layout/reftests/text-decoration/underline-block-propagation-standards.html14
-rw-r--r--layout/reftests/text-decoration/underline-block-quirks-notref.html2
-rw-r--r--layout/reftests/text-decoration/underline-block-quirks-ref.html2
-rw-r--r--layout/reftests/text-decoration/underline-block-quirks.html2
-rw-r--r--layout/reftests/text-decoration/underline-block-standards-notref.html3
-rw-r--r--layout/reftests/text-decoration/underline-block-standards-ref.html3
-rw-r--r--layout/reftests/text-decoration/underline-block-standards.html3
-rw-r--r--layout/reftests/text-decoration/underline-button-1-ref.html9
-rw-r--r--layout/reftests/text-decoration/underline-button-1.html8
-rw-r--r--layout/reftests/text-decoration/underline-button-2-ref.html9
-rw-r--r--layout/reftests/text-decoration/underline-button-2.html8
-rw-r--r--layout/reftests/text-decoration/underline-inline-block-quirks-notref.html2
-rw-r--r--layout/reftests/text-decoration/underline-inline-block-quirks-ref.html2
-rw-r--r--layout/reftests/text-decoration/underline-inline-block-quirks.html2
-rw-r--r--layout/reftests/text-decoration/underline-inline-block-standards-notref.html3
-rw-r--r--layout/reftests/text-decoration/underline-inline-block-standards-ref.html3
-rw-r--r--layout/reftests/text-decoration/underline-inline-block-standards.html3
-rw-r--r--layout/reftests/text-decoration/underline-select-1-ref.html9
-rw-r--r--layout/reftests/text-decoration/underline-select-1.html8
-rw-r--r--layout/reftests/text-decoration/underline-select-2-ref.html9
-rw-r--r--layout/reftests/text-decoration/underline-select-2.html8
-rw-r--r--layout/reftests/text-decoration/underline-style-block-dashed-quirks.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-block-dashed-standards.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-block-dotted-quirks.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-block-dotted-standards.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-block-double-quirks.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-block-double-standards.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-block-quirks-ref.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-block-solid-quirks.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-block-solid-standards.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-block-standards-ref.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-block-wavy-quirks.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-block-wavy-standards.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-dashed-quirks.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-dashed-standards.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-dotted-quirks.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-dotted-standards.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-double-quirks.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-double-standards.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-quirks-ref.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-solid-quirks.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-solid-standards.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-standards-ref.html2
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-wavy-quirks.html1
-rw-r--r--layout/reftests/text-decoration/underline-style-inline-wavy-standards.html2
-rw-r--r--layout/reftests/text-decoration/underline-table-caption-quirks-notref.html12
-rw-r--r--layout/reftests/text-decoration/underline-table-caption-quirks-ref.html12
-rw-r--r--layout/reftests/text-decoration/underline-table-caption-quirks.html12
-rw-r--r--layout/reftests/text-decoration/underline-table-caption-standards-notref.html13
-rw-r--r--layout/reftests/text-decoration/underline-table-caption-standards-ref.html13
-rw-r--r--layout/reftests/text-decoration/underline-table-caption-standards.html13
-rw-r--r--layout/reftests/text-decoration/underline-table-cell-quirks-notref.html11
-rw-r--r--layout/reftests/text-decoration/underline-table-cell-quirks-ref.html11
-rw-r--r--layout/reftests/text-decoration/underline-table-cell-quirks.html11
-rw-r--r--layout/reftests/text-decoration/underline-table-cell-standards-notref.html12
-rw-r--r--layout/reftests/text-decoration/underline-table-cell-standards-ref.html12
-rw-r--r--layout/reftests/text-decoration/underline-table-cell-standards.html12
167 files changed, 2632 insertions, 0 deletions
diff --git a/layout/reftests/text-decoration/1133392-ref.html b/layout/reftests/text-decoration/1133392-ref.html
new file mode 100644
index 000000000..ad933fb17
--- /dev/null
+++ b/layout/reftests/text-decoration/1133392-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<title>reftest, bug 1133392</title>
+<style>
+
+p > span {
+ text-decoration: underline;
+}
+
+p > span > span {
+ vertical-align: -2em;
+}
+
+</style>
+
+<p class="state-one"><span>This text<br>
+has <span>an underline</span>.</span></p>
diff --git a/layout/reftests/text-decoration/1133392.html b/layout/reftests/text-decoration/1133392.html
new file mode 100644
index 000000000..1aa42e308
--- /dev/null
+++ b/layout/reftests/text-decoration/1133392.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<title>reftest, bug 1133392</title>
+<style>
+
+ p:not(.state-one) > span {
+ text-decoration: underline;
+ }
+
+ p > span > span {
+ vertical-align: -2em;
+ }
+
+ p:not(.state-three) > span > span {
+ visibility: hidden;
+ }
+
+</style>
+
+<p class="state-one"><span>This text<br>
+has <span>an underline</span>.</span></p>
+
+<script>
+
+ var p = document.getElementsByTagName("p")[0];
+ p.offsetLeft; // flush layout
+ document.getElementsByTagName('p')[0].className = 'state-two';
+
+ document.addEventListener("MozReftestInvalidate", step_three, false);
+ function step_three(event) {
+ document.getElementsByTagName('p')[0].className = 'state-three';
+ document.documentElement.classList.remove("reftest-wait");
+ }
+
+</script>
+
diff --git a/layout/reftests/text-decoration/1159729-offset-adjustment-notref.html b/layout/reftests/text-decoration/1159729-offset-adjustment-notref.html
new file mode 100644
index 000000000..90431b9a8
--- /dev/null
+++ b/layout/reftests/text-decoration/1159729-offset-adjustment-notref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<style type="text/css">
+p {
+ font: 12px Impact, Times, serif;
+}
+span {
+ background: black;
+}
+</style>
+</head>
+<body>
+<p>
+<span>abcxyz</span>
+</p>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/1159729-offset-adjustment.html b/layout/reftests/text-decoration/1159729-offset-adjustment.html
new file mode 100644
index 000000000..cf05dd188
--- /dev/null
+++ b/layout/reftests/text-decoration/1159729-offset-adjustment.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<style type="text/css">
+p {
+ font: 12px Impact, Times, serif;
+}
+span {
+ background: black;
+ text-decoration: overline;
+ text-decoration-style: wavy;
+}
+</style>
+</head>
+<body>
+<p>
+<span>abcxyz</span>
+</p>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/641444-1-ref.html b/layout/reftests/text-decoration/641444-1-ref.html
new file mode 100644
index 000000000..798e49638
--- /dev/null
+++ b/layout/reftests/text-decoration/641444-1-ref.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8">
+ <title>Mozilla text-decoration bug if direction:rtl and text-indent &gt; 0</title>
+ <style type="text/css">
+ p { text-decoration: underline; }
+ </style>
+ </head>
+ <body>
+ <div dir="ltr">
+ <p style="margin-left:-1em">text-indent:-1em</p>
+ <p style="margin-left: 0em">text-indent: 0em</p>
+ <p style="margin-left: 1em">text-indent: 1em</p>
+ <p style="margin-left: 2em">text-indent: 2em</p>
+ <p style="margin-left: 3em">text-indent: 3em</p>
+ <p style="margin-left: 4em">text-indent: 4em</p>
+ <p style="margin-left: 5em">text-indent: 5em</p>
+ <p style="margin-left: 6em">text-indent: 6em</p>
+ <p style="margin-left: 7em">text-indent: 7em</p>
+ <p style="margin-left: 8em">text-indent: 8em</p>
+ <p style="margin-left: 9em">text-indent: 9em</p>
+ </div>
+ <div dir="rtl">
+ <p style="margin-right:-1em">text-indent:-1em</p>
+ <p style="margin-right: 0em">text-indent: 0em</p>
+ <p style="margin-right: 1em">text-indent: 1em</p>
+ <p style="margin-right: 2em">text-indent: 2em</p>
+ <p style="margin-right: 3em">text-indent: 3em</p>
+ <p style="margin-right: 4em">text-indent: 4em</p>
+ <p style="margin-right: 5em">text-indent: 5em</p>
+ <p style="margin-right: 6em">text-indent: 6em</p>
+ <p style="margin-right: 7em">text-indent: 7em</p>
+ <p style="margin-right: 8em">text-indent: 8em</p>
+ <p style="margin-right: 9em">text-indent: 9em</p>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/641444-1.html b/layout/reftests/text-decoration/641444-1.html
new file mode 100644
index 000000000..5c5d148ad
--- /dev/null
+++ b/layout/reftests/text-decoration/641444-1.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8">
+ <title>Mozilla text-decoration bug if direction:rtl and text-indent &gt; 0</title>
+ <style type="text/css">
+ p { text-decoration: underline; }
+ </style>
+ </head>
+ <body>
+ <div dir="ltr">
+ <p style="text-indent:-1em">text-indent:-1em</p>
+ <p style="text-indent: 0em">text-indent: 0em</p>
+ <p style="text-indent: 1em">text-indent: 1em</p>
+ <p style="text-indent: 2em">text-indent: 2em</p>
+ <p style="text-indent: 3em">text-indent: 3em</p>
+ <p style="text-indent: 4em">text-indent: 4em</p>
+ <p style="text-indent: 5em">text-indent: 5em</p>
+ <p style="text-indent: 6em">text-indent: 6em</p>
+ <p style="text-indent: 7em">text-indent: 7em</p>
+ <p style="text-indent: 8em">text-indent: 8em</p>
+ <p style="text-indent: 9em">text-indent: 9em</p>
+ </div>
+ <div dir="rtl">
+ <p style="text-indent:-1em">text-indent:-1em</p>
+ <p style="text-indent: 0em">text-indent: 0em</p>
+ <p style="text-indent: 1em">text-indent: 1em</p>
+ <p style="text-indent: 2em">text-indent: 2em</p>
+ <p style="text-indent: 3em">text-indent: 3em</p>
+ <p style="text-indent: 4em">text-indent: 4em</p>
+ <p style="text-indent: 5em">text-indent: 5em</p>
+ <p style="text-indent: 6em">text-indent: 6em</p>
+ <p style="text-indent: 7em">text-indent: 7em</p>
+ <p style="text-indent: 8em">text-indent: 8em</p>
+ <p style="text-indent: 9em">text-indent: 9em</p>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/676538-1-ref.html b/layout/reftests/text-decoration/676538-1-ref.html
new file mode 100644
index 000000000..5eb1de74e
--- /dev/null
+++ b/layout/reftests/text-decoration/676538-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+<title>text-decoration alignment</title>
+<meta charset=UTF-8>
+<style>
+
+span.block { position: absolute; top: 0; left: 0; }
+span.dec { text-decoration: underline }
+span.hide { color: transparent }
+
+</style>
+</head>
+<body>
+
+<p style="position: relative">
+ <span class="block" style="margin-top: 16px"><span class="hide"></span><span class="dec" style="color:black ">x<span class="hide">xx</span></span></span>
+ <span class="block" style="margin-top: 08px"><span class="hide">x</span><span class="dec" style="color:fuchsia">x<span class="hide">x</span></span></span>
+ <span class="block" style="margin-top: 00px"><span class="hide">xx</span><span class="dec" style="color:aqua ">x<span class="hide"></span></span></span>
+</p>
+
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/676538-1.html b/layout/reftests/text-decoration/676538-1.html
new file mode 100644
index 000000000..837f99abf
--- /dev/null
+++ b/layout/reftests/text-decoration/676538-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+<title>text-decoration alignment</title>
+<meta charset=UTF-8>
+<style>
+
+p, span { text-decoration: underline }
+span { vertical-align: 8px }
+p > span { color: fuchsia }
+p > span > span { color: aqua }
+
+em { font-style: normal; font-size: 5em }
+
+</style>
+</head>
+<body>
+
+<p>x<span>x<span>x</span></span></p>
+
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/complex-decoration-style-quirks-ref.html b/layout/reftests/text-decoration/complex-decoration-style-quirks-ref.html
new file mode 100644
index 000000000..fbf2c4bfe
--- /dev/null
+++ b/layout/reftests/text-decoration/complex-decoration-style-quirks-ref.html
@@ -0,0 +1,102 @@
+<style type="text/css">
+p {
+ margin-left: 11px;
+ padding-left: 11px;
+}
+p.dotted span {
+ text-decoration-style: dotted;
+}
+p.dashed span {
+ text-decoration-style: dashed;
+}
+p.wavy span {
+ text-decoration-style: wavy;
+}
+span {
+ text-decoration: underline line-through overline;
+}
+p.relative {
+ margin-left: 24px;
+}
+p.shadow span {
+ position: relative;
+ left: 1em;
+ top: 0.5em;
+}
+</style>
+<div style="font-size: 16px;">
+<p class="dotted">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+</div>
+<div style="font-size: 32px;">
+<p class="dotted">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+</div>
diff --git a/layout/reftests/text-decoration/complex-decoration-style-quirks.html b/layout/reftests/text-decoration/complex-decoration-style-quirks.html
new file mode 100644
index 000000000..6b2583afe
--- /dev/null
+++ b/layout/reftests/text-decoration/complex-decoration-style-quirks.html
@@ -0,0 +1,114 @@
+<style type="text/css">
+p {
+ margin-left: 11px;
+ padding-left: 11px;
+}
+p.dotted span {
+ text-decoration-style: dotted;
+}
+p.dashed span {
+ text-decoration-style: dashed;
+}
+p.wavy span {
+ text-decoration-style: wavy;
+}
+span {
+ text-decoration: underline line-through overline;
+}
+p.relative span {
+ position: relative;
+ left: 13px;
+}
+
+p.relative2 > span {
+ position: relative;
+ left: 13px;
+ text-decoration: none;
+}
+
+p.relative2 span span {
+ position: relative;
+ left: -13px;
+}
+
+p.shadow {
+ color: transparent;
+ text-shadow: 1em 0.5em black;
+}
+</style>
+<div style="font-size: 16px;">
+<p class="dotted">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dotted relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dotted relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="dashed relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="wavy relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="dotted shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+</div>
+<div style="font-size: 32px;">
+<p class="dotted">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dotted relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dotted relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="dashed relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="wavy relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="dotted shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+</div>
diff --git a/layout/reftests/text-decoration/complex-decoration-style-standards-ref.html b/layout/reftests/text-decoration/complex-decoration-style-standards-ref.html
new file mode 100644
index 000000000..45ad85d18
--- /dev/null
+++ b/layout/reftests/text-decoration/complex-decoration-style-standards-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<style type="text/css">
+p {
+ margin-left: 11px;
+ padding-left: 11px;
+}
+p.dotted span {
+ text-decoration-style: dotted;
+}
+p.dashed span {
+ text-decoration-style: dashed;
+}
+p.wavy span {
+ text-decoration-style: wavy;
+}
+span {
+ text-decoration: underline line-through overline;
+}
+p.relative {
+ margin-left: 24px;
+}
+p.shadow span {
+ position: relative;
+ left: 1em;
+ top: 0.5em;
+}
+</style>
+<div style="font-size: 16px;">
+<p class="dotted">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+</div>
+<div style="font-size: 32px;">
+<p class="dotted">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy relative">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dotted shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="dashed shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+<p class="wavy shadow">
+<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
+</p>
+</div>
diff --git a/layout/reftests/text-decoration/complex-decoration-style-standards.html b/layout/reftests/text-decoration/complex-decoration-style-standards.html
new file mode 100644
index 000000000..8c7f7fa1f
--- /dev/null
+++ b/layout/reftests/text-decoration/complex-decoration-style-standards.html
@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+<style type="text/css">
+p {
+ margin-left: 11px;
+ padding-left: 11px;
+}
+p.dotted span {
+ text-decoration-style: dotted;
+}
+p.dashed span {
+ text-decoration-style: dashed;
+}
+p.wavy span {
+ text-decoration-style: wavy;
+}
+span {
+ text-decoration: underline line-through overline;
+}
+p.relative span {
+ position: relative;
+ left: 13px;
+}
+
+p.relative2 > span {
+ position: relative;
+ left: 13px;
+ text-decoration: none;
+}
+
+p.relative2 span span {
+ position: relative;
+ left: -13px;
+}
+
+p.shadow {
+ color: transparent;
+ text-shadow: 1em 0.5em black;
+}
+</style>
+<div style="font-size: 16px;">
+<p class="dotted">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dotted relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dotted relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="dashed relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="wavy relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="dotted shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+</div>
+<div style="font-size: 32px;">
+<p class="dotted">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dotted relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy relative">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dotted relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="dashed relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="wavy relative2">
+<span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span></span>
+</p>
+<p class="dotted shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="dashed shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+<p class="wavy shadow">
+<span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span>
+</p>
+</div>
diff --git a/layout/reftests/text-decoration/decoration-color-override-quirks-ref.html b/layout/reftests/text-decoration/decoration-color-override-quirks-ref.html
new file mode 100644
index 000000000..5b8481674
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-color-override-quirks-ref.html
@@ -0,0 +1,5 @@
+<html>
+ <body>
+ <u>hello</u><img src="../backgrounds/red-128-alpha-32x32.png"><font color="purple"><u>hello</u></font>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/decoration-color-override-quirks.html b/layout/reftests/text-decoration/decoration-color-override-quirks.html
new file mode 100644
index 000000000..67e1346b9
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-color-override-quirks.html
@@ -0,0 +1,5 @@
+<html>
+ <body>
+ <u>hello<img src="../backgrounds/red-128-alpha-32x32.png"><font color="purple">hello</font></u>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/decoration-color-override-standards-ref.html b/layout/reftests/text-decoration/decoration-color-override-standards-ref.html
new file mode 100644
index 000000000..4420e6fc3
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-color-override-standards-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+ <body>
+ <u>hello<img src="../backgrounds/red-128-alpha-32x32.png"><span style="color: purple;">hello</span></u>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/decoration-color-override-standards.html b/layout/reftests/text-decoration/decoration-color-override-standards.html
new file mode 100644
index 000000000..2be52e67d
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-color-override-standards.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+ <body>
+ <u>hello<img src="../backgrounds/red-128-alpha-32x32.png"><font color="purple">hello</font></u>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/decoration-color-quirks-ref.html b/layout/reftests/text-decoration/decoration-color-quirks-ref.html
new file mode 100644
index 000000000..a4e3682fa
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-color-quirks-ref.html
@@ -0,0 +1,70 @@
+<p style="color: #008000;
+ text-decoration: underline line-through overline;">
+ <span style="color: #0000FF;">This blue text has green decoration lines</span>
+</p>
+<p style="color: yellow;
+ text-decoration: underline line-through overline;">
+ <span style="color: red;">This red text has yellow decoration lines</span>
+</p>
+<p style="color: red; text-decoration: underline line-through overline;">
+ <span style="color: #0000FF">This blue text has red lines</span>
+</p>
+<p style="color: orange;">
+ This orange text has transparent lines
+</p>
+<p>
+ Here is no decoration lines, but
+ <span style="font-size: 2em;
+ color: green;
+ text-decoration: underline line-through overline;">
+ <span style="color: blue;">
+ this blue text has green decoration lines</span></span>,
+ and here is no decoration lines too.
+</p>
+<p style="color: red;">
+ This is red paragraph and here is no decoration lines, but
+ <span style="font-size: 2em;
+ color: green;
+ text-decoration: underline line-through overline;">
+ <span style="color: red;">here are green decoration lines</span></span>,
+ and here is no decoration lines too.
+</p>
+<p style="color: purple;
+ text-decoration: underline line-through overline;">
+ This is purple paragraph and here are decoration lines of current color, but
+ <span style="font-size: 2em;
+ color: red;
+ text-decoration: underline line-through overline;">
+ <span style="color: purple;">here are red decoration lines</span></span>,
+ and here are current color decoration lines.
+</p>
+<p style="color: green;
+ text-decoration: underline line-through overline;">
+ This is green paragraph and here are decoration lines of current color, and
+ <span style="font-size: 2em;">
+ here is specified red decoration color but has current color lines</span>,
+ and here are current color decoration lines.
+</p>
+<p style="color: blue;">
+ This is blue paragraph,
+ <span style="font-size:2em;
+ color: red;
+ text-decoration: underline line-through overline;
+ text-decoration-color: red;">
+ here is red text with red decoration lines</span>,
+ and here is blue text without decoration lines.
+</p>
+<p style="color: blue;">
+ This is blue paragraph and decoration color is specified as green,
+ <span style="font-size:2em;
+ color: red;
+ text-decoration: underline line-through overline;
+ text-decoration-color: green;">
+ here is red text with green decoration lines</span>,
+ and here is blue text without decoration lines.
+</p>
+<p style="color: blue;
+ text-decoration: underline line-through overline;">
+ Here has blue decoration lines even though its color is specified as red
+ before text-decoration.
+</p>
diff --git a/layout/reftests/text-decoration/decoration-color-quirks.html b/layout/reftests/text-decoration/decoration-color-quirks.html
new file mode 100644
index 000000000..26c5018f7
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-color-quirks.html
@@ -0,0 +1,79 @@
+<p style="color: blue;
+ text-decoration: underline line-through overline;
+ text-decoration-color: green;">
+ This blue text has green decoration lines
+</p>
+<p style="color: #ff0000;
+ text-decoration: underline line-through overline;
+ text-decoration-color: #ffff00;">
+ This red text has yellow decoration lines
+</p>
+<p style="color: rgb(0%, 0%, 100%);
+ text-decoration: underline line-through overline;
+ text-decoration-color: rgb(100%, 0%, 0%);">
+ This blue text has red lines
+</p>
+<p style="color: orange;
+ text-decoration: underline line-through overline;
+ text-decoration-color: transparent;">
+ This orange text has transparent lines
+</p>
+<p>
+ Here is no decoration lines, but
+ <span style="font-size: 2em;
+ color: blue;
+ text-decoration: underline line-through overline;
+ text-decoration-color: green;">
+ this blue text has green decoration lines</span>,
+ and here is no decoration lines too.
+</p>
+<p style="color: red;">
+ This is red paragraph and here is no decoration lines, but
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-color: green;">
+ here are green decoration lines</span>,
+ and here is no decoration lines too.
+</p>
+<p style="color: purple;
+ text-decoration: underline line-through overline;">
+ This is purple paragraph and here are decoration lines of current color, but
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-color: red;">
+ here are red decoration lines</span>,
+ and here are current color decoration lines.
+</p>
+<p style="color: green;
+ text-decoration: underline line-through overline;">
+ This is green paragraph and here are decoration lines of current color, and
+ <span style="font-size: 2em;
+ text-decoration-color: red;">
+ here is specified red decoration color but has current color lines</span>,
+ and here are current color decoration lines.
+</p>
+<p style="color: blue;">
+ This is blue paragraph,
+ <span style="font-size:2em;
+ color: red;
+ text-decoration: underline line-through overline;
+ text-decoration-color: inherit;">
+ here is red text with red decoration lines</span>,
+ and here is blue text without decoration lines.
+</p>
+<p style="color: blue;
+ text-decoration-color: green;">
+ This is blue paragraph and decoration color is specified as green,
+ <span style="font-size:2em;
+ color: red;
+ text-decoration: underline line-through overline;
+ text-decoration-color: inherit;">
+ here is red text with green decoration lines</span>,
+ and here is blue text without decoration lines.
+</p>
+<p style="color: blue;
+ text-decoration-color: red;
+ text-decoration: underline line-through overline;">
+ Here has blue decoration lines even though its color is specified as red
+ before text-decoration.
+</p>
diff --git a/layout/reftests/text-decoration/decoration-color-standards-ref.html b/layout/reftests/text-decoration/decoration-color-standards-ref.html
new file mode 100644
index 000000000..7060609e7
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-color-standards-ref.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<p style="color: #008000;
+ text-decoration: underline line-through overline;">
+ <span style="color: #0000FF;">This blue text has green decoration lines</span>
+</p>
+<p style="color: yellow;
+ text-decoration: underline line-through overline;">
+ <span style="color: red;">This red text has yellow decoration lines</span>
+</p>
+<p style="color: red;
+ text-decoration: underline line-through overline;">
+ <span style="color: #0000FF">This blue text has red lines</span>
+</p>
+<p style="color: orange;">
+ This orange text has transparent lines
+</p>
+<p>
+ Here is no decoration lines, but
+ <span style="font-size: 2em;
+ color: green;
+ text-decoration: underline line-through overline;">
+ <span style="color: blue;">
+ this blue text has green decoration lines</span></span>,
+ and here is no decoration lines too.
+</p>
+<p style="color: red;">
+ This is red paragraph and here is no decoration lines, but
+ <span style="font-size: 2em;
+ color: green;
+ text-decoration: underline line-through overline;">
+ <span style="color: red;">here are green decoration lines</span></span>,
+ and here is no decoration lines too.
+</p>
+<p style="color: purple;
+ text-decoration: underline line-through overline;">
+ This is purple paragraph and here are decoration lines of current color, but
+ <span style="font-size: 2em;
+ color: red;
+ text-decoration: underline line-through overline;">
+ <span style="color: purple;">here are red decoration lines</span></span>,
+ and here are current color decoration lines.
+</p>
+<p style="color: green;
+ text-decoration: underline line-through overline;">
+ This is green paragraph and here are decoration lines of current color, and
+ <span style="font-size: 2em;">
+ here is specified red decoration color but has current color lines</span>,
+ and here are current color decoration lines.
+</p>
+<p style="color: blue;">
+ This is blue paragraph,
+ <span style="font-size:2em;
+ color: red;
+ text-decoration: underline line-through overline;
+ text-decoration-color: red;">
+ here is red text with red decoration lines</span>,
+ and here is blue text without decoration lines.
+</p>
+<p style="color: blue;">
+ This is blue paragraph and decoration color is specified as green,
+ <span style="font-size:2em;
+ color: red;
+ text-decoration: underline line-through overline;
+ text-decoration-color: green;">
+ here is red text with green decoration lines</span>,
+ and here is blue text without decoration lines.
+</p>
+<p style="color: blue;
+ text-decoration: underline line-through overline;">
+ Here has blue decoration lines even though its color is specified as red
+ before text-decoration.
+</p>
diff --git a/layout/reftests/text-decoration/decoration-color-standards.html b/layout/reftests/text-decoration/decoration-color-standards.html
new file mode 100644
index 000000000..46e122cf1
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-color-standards.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<p style="color: blue;
+ text-decoration: underline line-through overline;
+ text-decoration-color: green;">
+ This blue text has green decoration lines
+</p>
+<p style="color: #ff0000;
+ text-decoration: underline line-through overline;
+ text-decoration-color: #ffff00;">
+ This red text has yellow decoration lines
+</p>
+<p style="color: rgb(0%, 0%, 100%);
+ text-decoration: underline line-through overline;
+ text-decoration-color: rgb(100%, 0%, 0%);">
+ This blue text has red lines
+</p>
+<p style="color: orange;
+ text-decoration: underline line-through overline;
+ text-decoration-color: transparent;">
+ This orange text has transparent lines
+</p>
+<p>
+ Here is no decoration lines, but
+ <span style="font-size: 2em; color: blue;
+ text-decoration: underline line-through overline;
+ text-decoration-color: green;">
+ this blue text has green decoration lines</span>,
+ and here is no decoration lines too.
+</p>
+<p style="color: red;">
+ This is red paragraph and here is no decoration lines, but
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-color: green;">
+ here are green decoration lines</span>,
+ and here is no decoration lines too.</p>
+<p style="color: purple;
+ text-decoration: underline line-through overline;">
+ This is purple paragraph and here are decoration lines of current color, but
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-color: red;">
+ here are red decoration lines</span>,
+ and here are current color decoration lines.
+</p>
+<p style="color: green;
+ text-decoration: underline line-through overline;">
+ This is green paragraph and here are decoration lines of current color, and
+ <span style="font-size: 2em;
+ text-decoration-color: red;">
+ here is specified red decoration color but has current color lines</span>,
+ and here are current color decoration lines.
+</p>
+<p style="color: blue;">
+ This is blue paragraph,
+ <span style="font-size:2em;
+ color: red;
+ text-decoration: underline line-through overline;
+ text-decoration-color: inherit;">
+ here is red text with red decoration lines</span>,
+ and here is blue text without decoration lines.
+</p>
+<p style="color: blue;
+ text-decoration-color: green;">
+ This is blue paragraph and decoration color is specified as green,
+ <span style="font-size:2em;
+ color: red;
+ text-decoration: underline line-through overline;
+ text-decoration-color: inherit;">
+ here is red text with green decoration lines</span>,
+ and here is blue text without decoration lines.
+</p>
+<p style="color: blue;
+ text-decoration-color: red;
+ text-decoration: underline line-through overline;">
+ Here has blue decoration lines even though its color is specified as red
+ before text-decoration.
+</p>
diff --git a/layout/reftests/text-decoration/decoration-css21-block-ref.html b/layout/reftests/text-decoration/decoration-css21-block-ref.html
new file mode 100644
index 000000000..740f73323
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-css21-block-ref.html
@@ -0,0 +1,16 @@
+<html>
+ <head>
+ <style>
+ .high {vertical-align: 5em;}
+ .invisible {color: transparent;}
+ </style>
+ </head>
+ <body>
+ <div>
+ <span style="text-decoration: underline;">
+ underline<span class="invisible">continued<span class="invisible">continued</span></span></span>
+ <span class="invisible high">offset<span class="invisible high">offset</span></span>
+ </div>
+ <span style="text-decoration: underline;">also underlined</span>
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/text-decoration/decoration-css21-block.html b/layout/reftests/text-decoration/decoration-css21-block.html
new file mode 100644
index 000000000..761fc6a94
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-css21-block.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <style>
+ .high {vertical-align: 5em;}
+ .invisible {color: transparent;}
+ </style>
+ </head>
+ <body>
+ <div style="text-decoration: underline;">
+ underline<span class="invisible high">continued<span class="invisible high">continued</span></span><br>
+ also underlined
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/layout/reftests/text-decoration/decoration-css21-ref.html b/layout/reftests/text-decoration/decoration-css21-ref.html
new file mode 100644
index 000000000..edce6fda5
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-css21-ref.html
@@ -0,0 +1,29 @@
+<html>
+ <head>
+ <style>
+ .sup {vertical-align: super;}
+ .transparent {color: transparent;}
+ .alllines {text-decoration:line-through overline underline; color: purple;}
+ .highRel {position: relative; top: -4em;}
+ .lowRel {position: relative; top: 4em;}
+ .lowVert {vertical-align: -4em;}
+ .highVert {vertical-align: 4em;}
+ </style>
+ </head>
+ <body>
+ <p>
+ <span style="text-decoration: underline">Underlined <span class="transparent">still underlined</span></span>
+ <span style="text-decoration: underline">Underlined <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class="sup transparent">Offset</span>
+ </p>
+ <p>
+ <span class="alllines">
+ Before<span class="transparent">highlow</span>After</span>
+ </span>
+ <span class="highVert transparent">Offset</span><span class="lowVert transparent">text</span>
+ </p>
+ <p>
+ <span class="alllines">Before</span><span class="highRel alllines">high</span><span class="lowRel alllines">low</span><span class="alllines">After</span>
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/decoration-css21.html b/layout/reftests/text-decoration/decoration-css21.html
new file mode 100644
index 000000000..56fe306cb
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-css21.html
@@ -0,0 +1,29 @@
+<html>
+ <head>
+ <style>
+ .sup {vertical-align: super;}
+ .transparent {color: transparent;}
+ .alllines {text-decoration:line-through overline underline; color: purple;}
+ .highRel {position: relative; top: -4em;}
+ .lowRel {position: relative; top: 4em;}
+ .lowVert {vertical-align: -4em;}
+ .highVert {vertical-align: 4em;}
+ </style>
+ </head>
+ <body>
+ <p>
+ <span style="text-decoration: underline">Underlined <span class="sup transparent">still underlined</span></span>
+ <span style="text-decoration: underline">Underlined <span class="sup">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ </p>
+ <p>
+ <span class="alllines">
+ Before<span class="highVert transparent">high</span><span class="lowVert transparent">low</span>After
+ </span>
+ </p>
+ <p>
+ <span class="alllines">
+ Before<span class="highRel">high</span><span class="lowRel">low</span>After</span>
+ </span>
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/decoration-style-quirks-ref.html b/layout/reftests/text-decoration/decoration-style-quirks-ref.html
new file mode 100644
index 000000000..a10f49a12
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-style-quirks-ref.html
@@ -0,0 +1,49 @@
+<p>
+ Here is specified the decoration style as dotted but no decoration lines,
+ however,
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-style: solid;">
+ here has solid decoration lines</span>,
+ and here has no decoration lines.
+</p>
+<p>
+ Here is specified the decoration style as dashed but no decoration lines,
+ however,
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-style: dashed;">
+ here has inherited decoration lines</span>,
+ and here has no decoration lines.
+</p>
+<p>
+ <span style="text-decoration: underline line-through overline;
+ text-decoration-style: dotted;">
+ Here has dotted decoration lines,
+ </span><span style="text-decoration: underline line-through overline;
+ text-decoration-style: dotted">
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-style: wavy;">
+ here has wavy decoration
+ lines</span></span><span style="text-decoration: underline line-through overline;
+ text-decoration-style: dotted;">,
+ and here has dotted decoration lines.</span>
+</p>
+<p>
+ <span style="text-decoration: underline line-through overline;
+ text-decoration-style: double;">
+ Here has double decoration lines,
+ <span style="font-size: 2em;">
+ here is specified as dashed decoration lines but should be
+ ignored</span><span style="text-decoration: underline line-through overline;
+ text-decoration-style: double;">,
+ and here has double decoration lines.</span></span>
+</p>
+<p>
+ Here is specified the decoration style as -moz-none.
+</p>
+<p style="text-decoration: underline line-through overline;">
+ Here has solid decoration lines even if its style is specified as dotted
+ before text-decoration.
+</p>
diff --git a/layout/reftests/text-decoration/decoration-style-quirks.html b/layout/reftests/text-decoration/decoration-style-quirks.html
new file mode 100644
index 000000000..aa269e801
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-style-quirks.html
@@ -0,0 +1,42 @@
+<p style="text-decoration-style: dotted;">
+ Here is specified the decoration style as dotted but no decoration lines, however,
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;">
+ here has solid decoration lines</span>,
+ and here has no decoration lines.
+</p>
+<p style="text-decoration-style: dashed;">
+ Here is specified the decoration style as dashed but no decoration lines,
+ however,
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-style: inherit;">
+ here has inherited decoration lines</span>,
+ and here has no decoration lines.
+</p>
+<p style="text-decoration: underline line-through overline;
+ text-decoration-style: dotted;">
+ Here has dotted decoration lines,
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-style: wavy;">
+ here has wavy decoration lines</span>,
+ and here has dotted decoration lines.
+</p>
+<p style="text-decoration: underline line-through overline;
+ text-decoration-style: double;">
+ Here has double decoration lines,
+ <span style="font-size: 2em;
+ text-decoration-style: dashed;">
+ here is specified as dashed decoration lines but should be ignored</span>,
+ and here has double decoration lines.
+</p>
+<p style="text-decoration: underline line-through overline;
+ text-decoration-style: -moz-none;">
+ Here is specified the decoration style as -moz-none.
+</p>
+<p style="text-decoration-style: dotted;
+ text-decoration: underline line-through overline;">
+ Here has solid decoration lines even if its style is specified as dotted
+ before text-decoration.
+</p>
diff --git a/layout/reftests/text-decoration/decoration-style-standards-ref.html b/layout/reftests/text-decoration/decoration-style-standards-ref.html
new file mode 100644
index 000000000..28d5c1175
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-style-standards-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<p>
+ Here is specified the decoration style as dotted but no decoration lines,
+ however,
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-style: solid;">
+ here has solid decoration lines</span>,
+ and here has no decoration lines.
+</p>
+<p>
+ Here is specified the decoration style as dashed but no decoration lines,
+ however,
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-style: dashed;">
+ here has inherited decoration lines</span>,
+ and here has no decoration lines.
+</p>
+<p style="text-decoration: underline line-through overline;
+ text-decoration-style: double;">
+ Here has double decoration lines,
+ <span style="font-size: 2em;
+ text-decoration: none;">
+ here is specified as dashed decoration lines but should be ignored</span>,
+ and here has double decoration lines.
+</p>
+<p>
+ Here is specified the decoration style as -moz-none.
+</p>
+<p style="text-decoration: underline line-through overline;">
+ Here has solid decoration lines even if its style is specified as dotted
+ before text-decoration.
+</p>
diff --git a/layout/reftests/text-decoration/decoration-style-standards.html b/layout/reftests/text-decoration/decoration-style-standards.html
new file mode 100644
index 000000000..4ad687e12
--- /dev/null
+++ b/layout/reftests/text-decoration/decoration-style-standards.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<p style="text-decoration-style: dotted;">
+ Here is specified the decoration style as dotted but no decoration lines,
+ however,
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;">
+ here has solid decoration lines</span>, and here has no decoration lines.
+</p>
+<p style="text-decoration-style: dashed;">
+ Here is specified the decoration style as dashed but no decoration lines,
+ however,
+ <span style="font-size: 2em;
+ text-decoration: underline line-through overline;
+ text-decoration-style: inherit;">
+ here has inherited decoration lines</span>,
+ and here has no decoration lines.
+</p>
+<p style="text-decoration: underline line-through overline;
+ text-decoration-style: double;">
+ Here has double decoration lines,
+ <span style="font-size: 2em;
+ text-decoration-style: dashed;">
+ here is specified as dashed decoration lines but should be ignored</span>,
+ and here has double decoration lines.
+</p>
+<p style="text-decoration: underline line-through overline;
+ text-decoration-style: -moz-none;">
+ Here is specified the decoration style as -moz-none.
+</p>
+<p style="text-decoration-style: dotted;
+ text-decoration: underline line-through overline;">
+ Here has solid decoration lines even if its style is specified as dotted
+ before text-decoration.
+</p>
diff --git a/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-1-ref.html b/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-1-ref.html
new file mode 100644
index 000000000..915f3a7bb
--- /dev/null
+++ b/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-1-ref.html
@@ -0,0 +1,21 @@
+<html>
+<head>
+<style>
+.underline {
+ text-decoration: underline;
+}
+.align-bottom {
+ vertical-align: bottom;
+}
+.align-top {
+ vertical-align: top;
+}
+</style>
+</head>
+<body>
+<p class="underline">
+<span class="align-bottom">This</span> line has a bottom vertical align span. <br />
+<span class="align-top">This</span> line has a top vertical align span.
+</p>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-1.html b/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-1.html
new file mode 100644
index 000000000..eccaa3eb1
--- /dev/null
+++ b/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-1.html
@@ -0,0 +1,26 @@
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+function addUnderline() {
+ var element = document.getElementById("dynamicUnderline");
+ element.style.textDecoration = "underline";
+ document.documentElement.removeAttribute("class");
+}
+document.addEventListener('MozReftestInvalidate', addUnderline, false);
+</script>
+<style>
+.align-bottom {
+ vertical-align: bottom;
+}
+.align-top {
+ vertical-align: top;
+}
+</style>
+</head>
+<body>
+<p id="dynamicUnderline">
+<span class="align-bottom">This</span> line has a bottom vertical align span. <br />
+<span class="align-top">This</span> line has a top vertical align span.
+</p>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-2-ref.html b/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-2-ref.html
new file mode 100644
index 000000000..7a1ba472f
--- /dev/null
+++ b/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-2-ref.html
@@ -0,0 +1,21 @@
+<html>
+<head>
+<style>
+.underline {
+ text-decoration: underline;
+}
+.align-bottom {
+ vertical-align: bottom;
+}
+.align-top {
+ vertical-align: top;
+}
+</style>
+</head>
+<body>
+<p class="underline">
+<span class="align-bottom">This line has only a bottom vertical align span.</span> <br />
+<span class="align-top">This line has a top vertical align span.</span>
+</p>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-2.html b/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-2.html
new file mode 100644
index 000000000..52d5c5b62
--- /dev/null
+++ b/layout/reftests/text-decoration/dynamic-underline-vertical-align-quirks-2.html
@@ -0,0 +1,26 @@
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+function addUnderline() {
+ var element = document.getElementById("dynamicUnderline");
+ element.style.textDecoration = "underline";
+ document.documentElement.removeAttribute("class");
+}
+document.addEventListener('MozReftestInvalidate', addUnderline, false);
+</script>
+<style>
+.align-bottom {
+ vertical-align: bottom;
+}
+.align-top {
+ vertical-align: top;
+}
+</style>
+</head>
+<body>
+<p id="dynamicUnderline">
+<span class="align-bottom">This line has only a bottom vertical align span.</span> <br />
+<span class="align-top">This line has a top vertical align span.</span>
+</p>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-1-ref.html b/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-1-ref.html
new file mode 100644
index 000000000..01ba4d9b6
--- /dev/null
+++ b/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-1-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.underline {
+ text-decoration: underline;
+}
+.align-bottom {
+ vertical-align: bottom;
+}
+.align-top {
+ vertical-align: top;
+}
+</style>
+</head>
+<body>
+<p class="underline">
+<span class="align-bottom">This</span> line has a bottom vertical align span. <br />
+<span class="align-top">This</span> line has a top vertical align span.
+</p>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-1.html b/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-1.html
new file mode 100644
index 000000000..c285c0246
--- /dev/null
+++ b/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-1.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+function addUnderline() {
+ var element = document.getElementById("dynamicUnderline");
+ element.style.textDecoration = "underline";
+ document.documentElement.removeAttribute("class");
+}
+document.addEventListener('MozReftestInvalidate', addUnderline, false);
+</script>
+<style>
+.align-bottom {
+ vertical-align: bottom;
+}
+.align-top {
+ vertical-align: top;
+}
+</style>
+</head>
+<body>
+<p id="dynamicUnderline">
+<span class="align-bottom">This</span> line has a bottom vertical align span. <br />
+<span class="align-top">This</span> line has a top vertical align span.
+</p>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-2-ref.html b/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-2-ref.html
new file mode 100644
index 000000000..fb465cce2
--- /dev/null
+++ b/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-2-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.underline {
+ text-decoration: underline;
+}
+.align-bottom {
+ vertical-align: bottom;
+}
+.align-top {
+ vertical-align: top;
+}
+</style>
+</head>
+<body>
+<p class="underline">
+<span class="align-bottom">This line has only a bottom vertical align span.</span> <br />
+<span class="align-top">This line has a top vertical align span.</span>
+</p>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-2.html b/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-2.html
new file mode 100644
index 000000000..e48816365
--- /dev/null
+++ b/layout/reftests/text-decoration/dynamic-underline-vertical-align-standards-2.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+function addUnderline() {
+ var element = document.getElementById("dynamicUnderline");
+ element.style.textDecoration = "underline";
+ document.documentElement.removeAttribute("class");
+}
+document.addEventListener('MozReftestInvalidate', addUnderline, false);
+</script>
+<style>
+.align-bottom {
+ vertical-align: bottom;
+}
+.align-top {
+ vertical-align: top;
+}
+</style>
+</head>
+<body>
+<p id="dynamicUnderline">
+<span class="align-bottom">This line has only a bottom vertical align span.</span> <br />
+<span class="align-top">This line has a top vertical align span.</span>
+</p>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/emphasis-style-dynamic-ref.html b/layout/reftests/text-decoration/emphasis-style-dynamic-ref.html
new file mode 100644
index 000000000..786be9402
--- /dev/null
+++ b/layout/reftests/text-decoration/emphasis-style-dynamic-ref.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<html lang="ja">
+<meta charset="UTF-8">
+<title>Bug 1229278 - Dynamic change to text-emphasis-style</title>
+<style>
+ div {
+ line-height: 5;
+ text-emphasis-style: filled triangle;
+ }
+</style>
+<div>テスト</div>
+</html>
diff --git a/layout/reftests/text-decoration/emphasis-style-dynamic.html b/layout/reftests/text-decoration/emphasis-style-dynamic.html
new file mode 100644
index 000000000..3e9b920eb
--- /dev/null
+++ b/layout/reftests/text-decoration/emphasis-style-dynamic.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<html lang="ja" class="reftest-wait">
+<meta charset="UTF-8">
+<title>Bug 1229278 - Dynamic change to text-emphasis-style</title>
+<style>
+ div {
+ line-height: 5;
+ text-emphasis-style: filled triangle;
+ }
+ .reftest-wait div {
+ text-emphasis-style: filled circle;
+ }
+</style>
+<div>テスト</div>
+<script>
+ document.addEventListener("MozReftestInvalidate", function() {
+ document.documentElement.className = "";
+ });
+</script>
+</html>
diff --git a/layout/reftests/text-decoration/inline-baseline-almost-standards-ref.html b/layout/reftests/text-decoration/inline-baseline-almost-standards-ref.html
new file mode 100644
index 000000000..4d193d6c9
--- /dev/null
+++ b/layout/reftests/text-decoration/inline-baseline-almost-standards-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <title>test for bug 223764 (Almost-standards)</title>
+ <body>
+ <p style="overflow: hidden; padding-bottom: 20px;">
+ <span style="font-size: 100px;"><span style="font-size: 20px">hello</span></span>
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/inline-baseline-almost-standards.html b/layout/reftests/text-decoration/inline-baseline-almost-standards.html
new file mode 100644
index 000000000..71bdfc14b
--- /dev/null
+++ b/layout/reftests/text-decoration/inline-baseline-almost-standards.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <title>test for bug 223764 (Almost-standards)</title>
+ <body>
+ <p style="overflow: hidden; padding-bottom: 20px;">
+ <span style="font-size: 100px; text-decoration:underline"><span style="font-size: 20px">hello</span></span>
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/inline-baseline-quirks-ref.html b/layout/reftests/text-decoration/inline-baseline-quirks-ref.html
new file mode 100644
index 000000000..a1f2bd5ae
--- /dev/null
+++ b/layout/reftests/text-decoration/inline-baseline-quirks-ref.html
@@ -0,0 +1,8 @@
+<html>
+ <title>test for bug 223764 (Quirks)</title>
+ <body>
+ <p style="overflow: hidden; padding-bottom: 20px;">
+ <span style="font-size: 100px;"><span style="font-size: 20px">hello</span></span>
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/inline-baseline-quirks.html b/layout/reftests/text-decoration/inline-baseline-quirks.html
new file mode 100644
index 000000000..599b1e8da
--- /dev/null
+++ b/layout/reftests/text-decoration/inline-baseline-quirks.html
@@ -0,0 +1,8 @@
+<html>
+ <title>test for bug 223764 (Quirks)</title>
+ <body>
+ <p style="overflow: hidden; padding-bottom: 20px;">
+ <span style="font-size: 100px; text-decoration:underline"><span style="font-size: 20px">hello</span></span>
+ </p>
+ </body>
+</html>
diff --git a/layout/reftests/text-decoration/line-through-style-block-dashed-quirks.html b/layout/reftests/text-decoration/line-through-style-block-dashed-quirks.html
new file mode 100644
index 000000000..77503d466
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-dashed-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: line-through; text-decoration-style: dashed;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-dashed-standards.html b/layout/reftests/text-decoration/line-through-style-block-dashed-standards.html
new file mode 100644
index 000000000..782a237cb
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-dashed-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: line-through; text-decoration-style: dashed;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-dotted-quirks.html b/layout/reftests/text-decoration/line-through-style-block-dotted-quirks.html
new file mode 100644
index 000000000..6e6741ccf
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-dotted-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: line-through; text-decoration-style: dotted;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-dotted-standards.html b/layout/reftests/text-decoration/line-through-style-block-dotted-standards.html
new file mode 100644
index 000000000..6151a80ee
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-dotted-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: line-through; text-decoration-style: dotted;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-double-quirks.html b/layout/reftests/text-decoration/line-through-style-block-double-quirks.html
new file mode 100644
index 000000000..47ea92144
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-double-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: line-through; text-decoration-style: double;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-double-standards.html b/layout/reftests/text-decoration/line-through-style-block-double-standards.html
new file mode 100644
index 000000000..1439dcb79
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-double-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: line-through; text-decoration-style: double;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-quirks-ref.html b/layout/reftests/text-decoration/line-through-style-block-quirks-ref.html
new file mode 100644
index 000000000..53c4a2fd4
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-quirks-ref.html
@@ -0,0 +1 @@
+<p style="text-decoration: line-through;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-solid-quirks.html b/layout/reftests/text-decoration/line-through-style-block-solid-quirks.html
new file mode 100644
index 000000000..0ff5cc002
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-solid-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: line-through; text-decoration-style: solid;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-solid-standards.html b/layout/reftests/text-decoration/line-through-style-block-solid-standards.html
new file mode 100644
index 000000000..9d4967115
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-solid-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: line-through; text-decoration-style: solid;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-standards-ref.html b/layout/reftests/text-decoration/line-through-style-block-standards-ref.html
new file mode 100644
index 000000000..cea0d3718
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-standards-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: line-through;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-wavy-quirks.html b/layout/reftests/text-decoration/line-through-style-block-wavy-quirks.html
new file mode 100644
index 000000000..437b2c334
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-wavy-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: line-through; text-decoration-style: wavy;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-block-wavy-standards.html b/layout/reftests/text-decoration/line-through-style-block-wavy-standards.html
new file mode 100644
index 000000000..f00c7a48f
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-block-wavy-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: line-through; text-decoration-style: wavy;">This paragraph has line-through</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-dashed-quirks.html b/layout/reftests/text-decoration/line-through-style-inline-dashed-quirks.html
new file mode 100644
index 000000000..ae0e01e6d
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-dashed-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through; text-decoration-style: dashed;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-dashed-standards.html b/layout/reftests/text-decoration/line-through-style-inline-dashed-standards.html
new file mode 100644
index 000000000..588f85e2d
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-dashed-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through; text-decoration-style: dashed;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-dotted-quirks.html b/layout/reftests/text-decoration/line-through-style-inline-dotted-quirks.html
new file mode 100644
index 000000000..f47816e56
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-dotted-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through; text-decoration-style: dotted;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-dotted-standards.html b/layout/reftests/text-decoration/line-through-style-inline-dotted-standards.html
new file mode 100644
index 000000000..1096674d4
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-dotted-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through; text-decoration-style: dotted;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-double-quirks.html b/layout/reftests/text-decoration/line-through-style-inline-double-quirks.html
new file mode 100644
index 000000000..9daf8458c
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-double-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through; text-decoration-style: double;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-double-standards.html b/layout/reftests/text-decoration/line-through-style-inline-double-standards.html
new file mode 100644
index 000000000..2db67bd36
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-double-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through; text-decoration-style: double;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-quirks-ref.html b/layout/reftests/text-decoration/line-through-style-inline-quirks-ref.html
new file mode 100644
index 000000000..789426b01
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-quirks-ref.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-solid-quirks.html b/layout/reftests/text-decoration/line-through-style-inline-solid-quirks.html
new file mode 100644
index 000000000..746f67ce1
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-solid-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through; text-decoration-style: solid;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-solid-standards.html b/layout/reftests/text-decoration/line-through-style-inline-solid-standards.html
new file mode 100644
index 000000000..a59ba91fb
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-solid-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through; text-decoration-style: solid;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-standards-ref.html b/layout/reftests/text-decoration/line-through-style-inline-standards-ref.html
new file mode 100644
index 000000000..8b401685f
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-standards-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-wavy-quirks.html b/layout/reftests/text-decoration/line-through-style-inline-wavy-quirks.html
new file mode 100644
index 000000000..1f89c11ef
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-wavy-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through; text-decoration-style: wavy;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/line-through-style-inline-wavy-standards.html b/layout/reftests/text-decoration/line-through-style-inline-wavy-standards.html
new file mode 100644
index 000000000..6914b7454
--- /dev/null
+++ b/layout/reftests/text-decoration/line-through-style-inline-wavy-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: line-through; text-decoration-style: wavy;">here has line-through</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-dashed-quirks.html b/layout/reftests/text-decoration/overline-style-block-dashed-quirks.html
new file mode 100644
index 000000000..09b78f711
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-dashed-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: overline; text-decoration-style: dashed;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-dashed-standards.html b/layout/reftests/text-decoration/overline-style-block-dashed-standards.html
new file mode 100644
index 000000000..9204157cf
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-dashed-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: overline; text-decoration-style: dashed;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-dotted-quirks.html b/layout/reftests/text-decoration/overline-style-block-dotted-quirks.html
new file mode 100644
index 000000000..5f8d676e8
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-dotted-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: overline; text-decoration-style: dotted;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-dotted-standards.html b/layout/reftests/text-decoration/overline-style-block-dotted-standards.html
new file mode 100644
index 000000000..b653753b4
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-dotted-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: overline; text-decoration-style: dotted;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-double-quirks.html b/layout/reftests/text-decoration/overline-style-block-double-quirks.html
new file mode 100644
index 000000000..37bb36800
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-double-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: overline; text-decoration-style: double;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-double-standards.html b/layout/reftests/text-decoration/overline-style-block-double-standards.html
new file mode 100644
index 000000000..2bce4cc1d
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-double-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: overline; text-decoration-style: double;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-quirks-ref.html b/layout/reftests/text-decoration/overline-style-block-quirks-ref.html
new file mode 100644
index 000000000..07353927d
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-quirks-ref.html
@@ -0,0 +1 @@
+<p style="text-decoration: overline;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-solid-quirks.html b/layout/reftests/text-decoration/overline-style-block-solid-quirks.html
new file mode 100644
index 000000000..b8d6f30c9
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-solid-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: overline; text-decoration-style: solid;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-solid-standards.html b/layout/reftests/text-decoration/overline-style-block-solid-standards.html
new file mode 100644
index 000000000..e79563783
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-solid-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: overline; text-decoration-style: solid;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-standards-ref.html b/layout/reftests/text-decoration/overline-style-block-standards-ref.html
new file mode 100644
index 000000000..c349ca362
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-standards-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: overline;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-wavy-quirks.html b/layout/reftests/text-decoration/overline-style-block-wavy-quirks.html
new file mode 100644
index 000000000..b3e159e32
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-wavy-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: overline; text-decoration-style: wavy;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-block-wavy-standards.html b/layout/reftests/text-decoration/overline-style-block-wavy-standards.html
new file mode 100644
index 000000000..ac34fc5ac
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-block-wavy-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: overline; text-decoration-style: wavy;">This paragraph has overline</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-dashed-quirks.html b/layout/reftests/text-decoration/overline-style-inline-dashed-quirks.html
new file mode 100644
index 000000000..bed18d95a
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-dashed-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline; text-decoration-style: dashed;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-dashed-standards.html b/layout/reftests/text-decoration/overline-style-inline-dashed-standards.html
new file mode 100644
index 000000000..a5ce662f3
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-dashed-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline; text-decoration-style: dashed;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-dotted-quirks.html b/layout/reftests/text-decoration/overline-style-inline-dotted-quirks.html
new file mode 100644
index 000000000..fd8bcf88a
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-dotted-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline; text-decoration-style: dotted;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-dotted-standards.html b/layout/reftests/text-decoration/overline-style-inline-dotted-standards.html
new file mode 100644
index 000000000..be2f98c75
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-dotted-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline; text-decoration-style: dotted;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-double-quirks.html b/layout/reftests/text-decoration/overline-style-inline-double-quirks.html
new file mode 100644
index 000000000..a481122ae
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-double-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline; text-decoration-style: double;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-double-standards.html b/layout/reftests/text-decoration/overline-style-inline-double-standards.html
new file mode 100644
index 000000000..b30572501
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-double-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline; text-decoration-style: double;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-quirks-ref.html b/layout/reftests/text-decoration/overline-style-inline-quirks-ref.html
new file mode 100644
index 000000000..a0a2c6c3f
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-quirks-ref.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-solid-quirks.html b/layout/reftests/text-decoration/overline-style-inline-solid-quirks.html
new file mode 100644
index 000000000..fb9b72332
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-solid-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline; text-decoration-style: solid;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-solid-standards.html b/layout/reftests/text-decoration/overline-style-inline-solid-standards.html
new file mode 100644
index 000000000..d02f2021e
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-solid-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline; text-decoration-style: solid;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-standards-ref.html b/layout/reftests/text-decoration/overline-style-inline-standards-ref.html
new file mode 100644
index 000000000..c4890983a
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-standards-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-wavy-quirks.html b/layout/reftests/text-decoration/overline-style-inline-wavy-quirks.html
new file mode 100644
index 000000000..6b1829c7d
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-wavy-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline; text-decoration-style: wavy;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/overline-style-inline-wavy-standards.html b/layout/reftests/text-decoration/overline-style-inline-wavy-standards.html
new file mode 100644
index 000000000..bd8e24268
--- /dev/null
+++ b/layout/reftests/text-decoration/overline-style-inline-wavy-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: overline; text-decoration-style: wavy;">here has overline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/reftest-stylo.list b/layout/reftests/text-decoration/reftest-stylo.list
new file mode 100644
index 000000000..5f4e8122c
--- /dev/null
+++ b/layout/reftests/text-decoration/reftest-stylo.list
@@ -0,0 +1,119 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+skip-if(B2G||Mulet) == complex-decoration-style-quirks.html complex-decoration-style-quirks.html
+# bug 773482
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) == complex-decoration-style-standards.html complex-decoration-style-standards.html
+# bug 773482
+# Initial mulet triage: parity with B2G/B2G Desktop
+== decoration-color-quirks.html decoration-color-quirks.html
+== decoration-color-standards.html decoration-color-standards.html
+== decoration-style-quirks.html decoration-style-quirks.html
+== decoration-style-standards.html decoration-style-standards.html
+fuzzy-if(B2G,255,1) == dynamic-underline-vertical-align-quirks-1.html dynamic-underline-vertical-align-quirks-1.html
+fuzzy-if(B2G,255,1) == dynamic-underline-vertical-align-standards-1.html dynamic-underline-vertical-align-standards-1.html
+fuzzy-if(B2G,255,1) == dynamic-underline-vertical-align-quirks-2.html dynamic-underline-vertical-align-quirks-2.html
+fuzzy-if(B2G,255,1) == dynamic-underline-vertical-align-standards-2.html dynamic-underline-vertical-align-standards-2.html
+== line-through-style-block-solid-quirks.html line-through-style-block-solid-quirks.html
+== line-through-style-block-dotted-quirks.html line-through-style-block-dotted-quirks.html
+== line-through-style-block-dashed-quirks.html line-through-style-block-dashed-quirks.html
+skip == line-through-style-block-double-quirks.html line-through-style-block-double-quirks.html
+== line-through-style-block-wavy-quirks.html line-through-style-block-wavy-quirks.html
+== line-through-style-inline-solid-quirks.html line-through-style-inline-solid-quirks.html
+== line-through-style-inline-dotted-quirks.html line-through-style-inline-dotted-quirks.html
+== line-through-style-inline-dashed-quirks.html line-through-style-inline-dashed-quirks.html
+== line-through-style-inline-double-quirks.html line-through-style-inline-double-quirks.html
+== line-through-style-inline-wavy-quirks.html line-through-style-inline-wavy-quirks.html
+== line-through-style-block-solid-standards.html line-through-style-block-solid-standards.html
+== line-through-style-block-dotted-standards.html line-through-style-block-dotted-standards.html
+== line-through-style-block-dashed-standards.html line-through-style-block-dashed-standards.html
+== line-through-style-block-double-standards.html line-through-style-block-double-standards.html
+== line-through-style-block-wavy-standards.html line-through-style-block-wavy-standards.html
+== line-through-style-inline-solid-standards.html line-through-style-inline-solid-standards.html
+== line-through-style-inline-dotted-standards.html line-through-style-inline-dotted-standards.html
+skip == line-through-style-inline-dashed-standards.html line-through-style-inline-dashed-standards.html
+== line-through-style-inline-double-standards.html line-through-style-inline-double-standards.html
+== line-through-style-inline-wavy-standards.html line-through-style-inline-wavy-standards.html
+== overline-style-block-solid-quirks.html overline-style-block-solid-quirks.html
+== overline-style-block-dotted-quirks.html overline-style-block-dotted-quirks.html
+== overline-style-block-dashed-quirks.html overline-style-block-dashed-quirks.html
+== overline-style-block-double-quirks.html overline-style-block-double-quirks.html
+== overline-style-block-wavy-quirks.html overline-style-block-wavy-quirks.html
+== overline-style-inline-solid-quirks.html overline-style-inline-solid-quirks.html
+== overline-style-inline-dotted-quirks.html overline-style-inline-dotted-quirks.html
+== overline-style-inline-dashed-quirks.html overline-style-inline-dashed-quirks.html
+== overline-style-inline-double-quirks.html overline-style-inline-double-quirks.html
+== overline-style-inline-wavy-quirks.html overline-style-inline-wavy-quirks.html
+== overline-style-block-solid-standards.html overline-style-block-solid-standards.html
+== overline-style-block-dotted-standards.html overline-style-block-dotted-standards.html
+== overline-style-block-dashed-standards.html overline-style-block-dashed-standards.html
+== overline-style-block-double-standards.html overline-style-block-double-standards.html
+== overline-style-block-wavy-standards.html overline-style-block-wavy-standards.html
+== overline-style-inline-solid-standards.html overline-style-inline-solid-standards.html
+== overline-style-inline-dotted-standards.html overline-style-inline-dotted-standards.html
+== overline-style-inline-dashed-standards.html overline-style-inline-dashed-standards.html
+== overline-style-inline-double-standards.html overline-style-inline-double-standards.html
+== overline-style-inline-wavy-standards.html overline-style-inline-wavy-standards.html
+skip == underline-style-block-solid-quirks.html underline-style-block-solid-quirks.html
+== underline-style-block-dotted-quirks.html underline-style-block-dotted-quirks.html
+== underline-style-block-dashed-quirks.html underline-style-block-dashed-quirks.html
+== underline-style-block-double-quirks.html underline-style-block-double-quirks.html
+== underline-style-block-wavy-quirks.html underline-style-block-wavy-quirks.html
+== underline-style-inline-solid-quirks.html underline-style-inline-solid-quirks.html
+== underline-style-inline-dotted-quirks.html underline-style-inline-dotted-quirks.html
+== underline-style-inline-dashed-quirks.html underline-style-inline-dashed-quirks.html
+== underline-style-inline-double-quirks.html underline-style-inline-double-quirks.html
+== underline-style-inline-wavy-quirks.html underline-style-inline-wavy-quirks.html
+== underline-style-block-solid-standards.html underline-style-block-solid-standards.html
+== underline-style-block-dotted-standards.html underline-style-block-dotted-standards.html
+== underline-style-block-dashed-standards.html underline-style-block-dashed-standards.html
+== underline-style-block-double-standards.html underline-style-block-double-standards.html
+== underline-style-block-wavy-standards.html underline-style-block-wavy-standards.html
+== underline-style-inline-solid-standards.html underline-style-inline-solid-standards.html
+== underline-style-inline-dotted-standards.html underline-style-inline-dotted-standards.html
+== underline-style-inline-dashed-standards.html underline-style-inline-dashed-standards.html
+== underline-style-inline-double-standards.html underline-style-inline-double-standards.html
+== underline-style-inline-wavy-standards.html underline-style-inline-wavy-standards.html
+== underline-block-quirks.html underline-block-quirks.html
+== underline-block-quirks.html underline-block-quirks.html
+== underline-inline-block-quirks.html underline-inline-block-quirks.html
+== underline-inline-block-quirks.html underline-inline-block-quirks.html
+== underline-table-caption-quirks.html underline-table-caption-quirks.html
+== underline-table-caption-quirks.html underline-table-caption-quirks.html
+== underline-table-cell-quirks.html underline-table-cell-quirks.html
+== underline-table-cell-quirks.html underline-table-cell-quirks.html
+skip == underline-block-propagation-quirks.html underline-block-propagation-quirks.html
+== underline-block-propagation-2-quirks.html underline-block-propagation-2-quirks.html
+== underline-block-standards.html underline-block-standards.html
+== underline-block-standards.html underline-block-standards.html
+skip == underline-inline-block-standards.html underline-inline-block-standards.html
+skip == underline-inline-block-standards.html underline-inline-block-standards.html
+skip == underline-table-caption-standards.html underline-table-caption-standards.html
+skip == underline-table-caption-standards.html underline-table-caption-standards.html
+== underline-table-cell-standards.html underline-table-cell-standards.html
+== underline-table-cell-standards.html underline-table-cell-standards.html
+== underline-block-propagation-standards.html underline-block-propagation-standards.html
+skip == underline-block-propagation-2-standards.html underline-block-propagation-2-standards.html
+== text-decoration-zorder-1-standards.html text-decoration-zorder-1-standards.html
+== text-decoration-zorder-1-quirks.html text-decoration-zorder-1-quirks.html
+== table-quirk-1.html table-quirk-1.html
+== table-quirk-2.html table-quirk-2.html
+skip == text-decoration-propagation-1-quirks.html text-decoration-propagation-1-quirks.html
+== text-decoration-propagation-1-standards.html text-decoration-propagation-1-standards.html
+skip-if(B2G||Mulet) == 641444-1.html 641444-1.html
+# bug 773482
+# Initial mulet triage: parity with B2G/B2G Desktop
+== decoration-css21.html decoration-css21.html
+fuzzy-if(cocoaWidget,1,5) == decoration-color-override-quirks.html decoration-color-override-quirks.html
+# == decoration-color-override-standards.html decoration-color-override-standards.html
+== decoration-color-override-standards-ref.html decoration-color-override-standards-ref.html
+== decoration-css21-block.html decoration-css21-block.html
+== inline-baseline-almost-standards.html inline-baseline-almost-standards.html
+== inline-baseline-quirks.html inline-baseline-quirks.html
+== 676538-1.html 676538-1.html
+fuzzy-if(OSX==1010,1,4) == underline-button-1.html underline-button-1.html
+fuzzy-if(OSX==1010,1,2) == underline-button-2.html underline-button-2.html
+== underline-select-1.html underline-select-1.html
+== underline-select-2.html underline-select-2.html
+== 1133392.html 1133392.html
+== 1159729-offset-adjustment.html 1159729-offset-adjustment.html
+== emphasis-style-dynamic.html emphasis-style-dynamic.html
diff --git a/layout/reftests/text-decoration/reftest.list b/layout/reftests/text-decoration/reftest.list
new file mode 100644
index 000000000..b15636351
--- /dev/null
+++ b/layout/reftests/text-decoration/reftest.list
@@ -0,0 +1,112 @@
+== complex-decoration-style-quirks.html complex-decoration-style-quirks-ref.html
+== complex-decoration-style-standards.html complex-decoration-style-standards-ref.html
+== decoration-color-quirks.html decoration-color-quirks-ref.html
+== decoration-color-standards.html decoration-color-standards-ref.html
+== decoration-style-quirks.html decoration-style-quirks-ref.html
+== decoration-style-standards.html decoration-style-standards-ref.html
+== dynamic-underline-vertical-align-quirks-1.html dynamic-underline-vertical-align-quirks-1-ref.html
+== dynamic-underline-vertical-align-standards-1.html dynamic-underline-vertical-align-standards-1-ref.html
+== dynamic-underline-vertical-align-quirks-2.html dynamic-underline-vertical-align-quirks-2-ref.html
+== dynamic-underline-vertical-align-standards-2.html dynamic-underline-vertical-align-standards-2-ref.html
+== line-through-style-block-solid-quirks.html line-through-style-block-quirks-ref.html
+!= line-through-style-block-dotted-quirks.html line-through-style-block-quirks-ref.html
+!= line-through-style-block-dashed-quirks.html line-through-style-block-quirks-ref.html
+!= line-through-style-block-double-quirks.html line-through-style-block-quirks-ref.html
+!= line-through-style-block-wavy-quirks.html line-through-style-block-quirks-ref.html
+== line-through-style-inline-solid-quirks.html line-through-style-inline-quirks-ref.html
+!= line-through-style-inline-dotted-quirks.html line-through-style-inline-quirks-ref.html
+!= line-through-style-inline-dashed-quirks.html line-through-style-inline-quirks-ref.html
+!= line-through-style-inline-double-quirks.html line-through-style-inline-quirks-ref.html
+!= line-through-style-inline-wavy-quirks.html line-through-style-inline-quirks-ref.html
+== line-through-style-block-solid-standards.html line-through-style-block-standards-ref.html
+!= line-through-style-block-dotted-standards.html line-through-style-block-standards-ref.html
+!= line-through-style-block-dashed-standards.html line-through-style-block-standards-ref.html
+!= line-through-style-block-double-standards.html line-through-style-block-standards-ref.html
+!= line-through-style-block-wavy-standards.html line-through-style-block-standards-ref.html
+== line-through-style-inline-solid-standards.html line-through-style-inline-standards-ref.html
+!= line-through-style-inline-dotted-standards.html line-through-style-inline-standards-ref.html
+!= line-through-style-inline-dashed-standards.html line-through-style-inline-standards-ref.html
+!= line-through-style-inline-double-standards.html line-through-style-inline-standards-ref.html
+!= line-through-style-inline-wavy-standards.html line-through-style-inline-standards-ref.html
+== overline-style-block-solid-quirks.html overline-style-block-quirks-ref.html
+!= overline-style-block-dotted-quirks.html overline-style-block-quirks-ref.html
+!= overline-style-block-dashed-quirks.html overline-style-block-quirks-ref.html
+!= overline-style-block-double-quirks.html overline-style-block-quirks-ref.html
+!= overline-style-block-wavy-quirks.html overline-style-block-quirks-ref.html
+== overline-style-inline-solid-quirks.html overline-style-inline-quirks-ref.html
+!= overline-style-inline-dotted-quirks.html overline-style-inline-quirks-ref.html
+!= overline-style-inline-dashed-quirks.html overline-style-inline-quirks-ref.html
+!= overline-style-inline-double-quirks.html overline-style-inline-quirks-ref.html
+!= overline-style-inline-wavy-quirks.html overline-style-inline-quirks-ref.html
+== overline-style-block-solid-standards.html overline-style-block-standards-ref.html
+!= overline-style-block-dotted-standards.html overline-style-block-standards-ref.html
+!= overline-style-block-dashed-standards.html overline-style-block-standards-ref.html
+!= overline-style-block-double-standards.html overline-style-block-standards-ref.html
+!= overline-style-block-wavy-standards.html overline-style-block-standards-ref.html
+== overline-style-inline-solid-standards.html overline-style-inline-standards-ref.html
+!= overline-style-inline-dotted-standards.html overline-style-inline-standards-ref.html
+!= overline-style-inline-dashed-standards.html overline-style-inline-standards-ref.html
+!= overline-style-inline-double-standards.html overline-style-inline-standards-ref.html
+!= overline-style-inline-wavy-standards.html overline-style-inline-standards-ref.html
+== underline-style-block-solid-quirks.html underline-style-block-quirks-ref.html
+!= underline-style-block-dotted-quirks.html underline-style-block-quirks-ref.html
+!= underline-style-block-dashed-quirks.html underline-style-block-quirks-ref.html
+!= underline-style-block-double-quirks.html underline-style-block-quirks-ref.html
+!= underline-style-block-wavy-quirks.html underline-style-block-quirks-ref.html
+== underline-style-inline-solid-quirks.html underline-style-inline-quirks-ref.html
+!= underline-style-inline-dotted-quirks.html underline-style-inline-quirks-ref.html
+!= underline-style-inline-dashed-quirks.html underline-style-inline-quirks-ref.html
+!= underline-style-inline-double-quirks.html underline-style-inline-quirks-ref.html
+!= underline-style-inline-wavy-quirks.html underline-style-inline-quirks-ref.html
+== underline-style-block-solid-standards.html underline-style-block-standards-ref.html
+!= underline-style-block-dotted-standards.html underline-style-block-standards-ref.html
+!= underline-style-block-dashed-standards.html underline-style-block-standards-ref.html
+!= underline-style-block-double-standards.html underline-style-block-standards-ref.html
+!= underline-style-block-wavy-standards.html underline-style-block-standards-ref.html
+== underline-style-inline-solid-standards.html underline-style-inline-standards-ref.html
+!= underline-style-inline-dotted-standards.html underline-style-inline-standards-ref.html
+!= underline-style-inline-dashed-standards.html underline-style-inline-standards-ref.html
+!= underline-style-inline-double-standards.html underline-style-inline-standards-ref.html
+!= underline-style-inline-wavy-standards.html underline-style-inline-standards-ref.html
+== underline-block-quirks.html underline-block-quirks-ref.html
+!= underline-block-quirks.html underline-block-quirks-notref.html
+== underline-inline-block-quirks.html underline-inline-block-quirks-ref.html
+!= underline-inline-block-quirks.html underline-inline-block-quirks-notref.html
+== underline-table-caption-quirks.html underline-table-caption-quirks-ref.html
+!= underline-table-caption-quirks.html underline-table-caption-quirks-notref.html
+== underline-table-cell-quirks.html underline-table-cell-quirks-ref.html
+!= underline-table-cell-quirks.html underline-table-cell-quirks-notref.html
+== underline-block-propagation-quirks.html underline-block-propagation-quirks-ref.html
+== underline-block-propagation-2-quirks.html underline-block-propagation-2-quirks-ref.html
+== underline-block-standards.html underline-block-standards-ref.html
+!= underline-block-standards.html underline-block-standards-notref.html
+== underline-inline-block-standards.html underline-inline-block-standards-ref.html
+!= underline-inline-block-standards.html underline-inline-block-standards-notref.html
+== underline-table-caption-standards.html underline-table-caption-standards-ref.html
+!= underline-table-caption-standards.html underline-table-caption-standards-notref.html
+== underline-table-cell-standards.html underline-table-cell-standards-ref.html
+!= underline-table-cell-standards.html underline-table-cell-standards-notref.html
+== underline-block-propagation-standards.html underline-block-propagation-standards-ref.html
+== underline-block-propagation-2-standards.html underline-block-propagation-2-standards-ref.html
+== text-decoration-zorder-1-standards.html text-decoration-zorder-1-ref.html
+== text-decoration-zorder-1-quirks.html text-decoration-zorder-1-ref.html
+== table-quirk-1.html table-quirk-1-ref.html
+== table-quirk-2.html table-quirk-2-ref.html
+== text-decoration-propagation-1-quirks.html text-decoration-propagation-1-quirks-ref.html
+== text-decoration-propagation-1-standards.html text-decoration-propagation-1-standards-ref.html
+== 641444-1.html 641444-1-ref.html
+== decoration-css21.html decoration-css21-ref.html
+fuzzy-if(cocoaWidget,1,5) == decoration-color-override-quirks.html decoration-color-override-quirks-ref.html
+== decoration-color-override-standards.html decoration-color-override-standards-ref.html
+!= decoration-color-override-standards-ref.html decoration-color-override-quirks-ref.html
+== decoration-css21-block.html decoration-css21-block-ref.html
+!= inline-baseline-almost-standards.html inline-baseline-almost-standards-ref.html
+!= inline-baseline-quirks.html inline-baseline-quirks-ref.html
+== 676538-1.html 676538-1-ref.html
+fuzzy-if(OSX==1010,1,4) == underline-button-1.html underline-button-1-ref.html
+fuzzy-if(OSX==1010,1,2) == underline-button-2.html underline-button-2-ref.html
+fuzzy-if(skiaContent,4,2) == underline-select-1.html underline-select-1-ref.html
+== underline-select-2.html underline-select-2-ref.html
+== 1133392.html 1133392-ref.html
+!= 1159729-offset-adjustment.html 1159729-offset-adjustment-notref.html
+== emphasis-style-dynamic.html emphasis-style-dynamic-ref.html
diff --git a/layout/reftests/text-decoration/table-quirk-1-ref.html b/layout/reftests/text-decoration/table-quirk-1-ref.html
new file mode 100644
index 000000000..844ec63e8
--- /dev/null
+++ b/layout/reftests/text-decoration/table-quirk-1-ref.html
@@ -0,0 +1,7 @@
+<title>text-decoration quirk on tables (Bug 572713)</title>
+
+<div><table><tbody><tr><td>text-decoration on container of table</td></tr></tbody></table></div>
+<div><table><tbody><tr><td style="text-decoration: underline">text-decoration on table</td></tr></tbody></table></div>
+<div><table><tbody><tr><td style="text-decoration: underline">text-decoration on tbody</td></tr></tbody></table></div>
+<div><table><tbody><tr><td style="text-decoration: underline">text-decoration on tr</td></tr></tbody></table></div>
+<div><table><tbody><tr><td style="text-decoration: underline">text-decoration on td</td></tr></tbody></table></div>
diff --git a/layout/reftests/text-decoration/table-quirk-1.html b/layout/reftests/text-decoration/table-quirk-1.html
new file mode 100644
index 000000000..98375f44d
--- /dev/null
+++ b/layout/reftests/text-decoration/table-quirk-1.html
@@ -0,0 +1,7 @@
+<title>text-decoration quirk on tables (Bug 572713)</title>
+
+<div style="text-decoration: underline"><table><tbody><tr><td>text-decoration on container of table</td></tr></tbody></table></div>
+<div><table style="text-decoration: underline"><tbody><tr><td>text-decoration on table</td></tr></tbody></table></div>
+<div><table><tbody style="text-decoration: underline"><tr><td>text-decoration on tbody</td></tr></tbody></table></div>
+<div><table><tbody><tr style="text-decoration: underline"><td>text-decoration on tr</td></tr></tbody></table></div>
+<div><table><tbody><tr><td style="text-decoration: underline">text-decoration on td</td></tr></tbody></table></div>
diff --git a/layout/reftests/text-decoration/table-quirk-2-ref.html b/layout/reftests/text-decoration/table-quirk-2-ref.html
new file mode 100644
index 000000000..49786fa6e
--- /dev/null
+++ b/layout/reftests/text-decoration/table-quirk-2-ref.html
@@ -0,0 +1,26 @@
+<title>text-decoration quirk on tables (Bug 572713)</title>
+
+<h1>text-decoration on a block</h1>
+
+<u>text in the block</u>
+
+<div><u>text in a block in the block</u></div>
+
+<table><tbody><tr><td>an HTML table</td></tr></tbody></table>
+
+<table style="display:block"><tbody style="display:block"><tr style="display:block"><td style="display:block">an HTML table that's not table-display</td></tr></tbody></table>
+
+<div style="display: table"><div style="display: table-row-group"><div style="display: table-row"><div style="display: table-cell"><u>a div with table display types</u></div></div></div></div>
+
+<h1>text-decoration on an inline</h1>
+
+<u>text in the block</u>
+
+<div><u>text in a block in the block</u></div>
+
+<table><tbody><tr><td>an HTML table</td></tr></tbody></table>
+
+<table style="display:block"><tbody style="display:block"><tr style="display:block"><td style="display:block">an HTML table that's not table-display</td></tr></tbody></table>
+
+<div style="display: table"><div style="display: table-row-group"><div style="display: table-row"><div style="display: table-cell"><u>a div with table display types</u></div></div></div></div>
+
diff --git a/layout/reftests/text-decoration/table-quirk-2.html b/layout/reftests/text-decoration/table-quirk-2.html
new file mode 100644
index 000000000..b02c95ab1
--- /dev/null
+++ b/layout/reftests/text-decoration/table-quirk-2.html
@@ -0,0 +1,35 @@
+<title>text-decoration quirk on tables (Bug 572713)</title>
+
+<h1>text-decoration on a block</h1>
+
+<div style="text-decoration: underline">
+
+text in the block
+
+<div>text in a block in the block</div>
+
+<table><tbody><tr><td>an HTML table</td></tr></tbody></table>
+
+<table style="display:block"><tbody style="display:block"><tr style="display:block"><td style="display:block">an HTML table that's not table-display</td></tr></tbody></table>
+
+<div style="display: table"><div style="display: table-row-group"><div style="display: table-row"><div style="display: table-cell">a div with table display types</div></div></div></div>
+
+
+</div>
+
+<h1>text-decoration on an inline</h1>
+
+<div style="text-decoration: underline; display: inline">
+
+text in the block
+
+<div>text in a block in the block</div>
+
+<table><tbody><tr><td>an HTML table</td></tr></tbody></table>
+
+<table style="display:block"><tbody style="display:block"><tr style="display:block"><td style="display:block">an HTML table that's not table-display</td></tr></tbody></table>
+
+<div style="display: table"><div style="display: table-row-group"><div style="display: table-row"><div style="display: table-cell">a div with table display types</div></div></div></div>
+
+
+</div>
diff --git a/layout/reftests/text-decoration/text-decoration-propagation-1-quirks-ref.html b/layout/reftests/text-decoration/text-decoration-propagation-1-quirks-ref.html
new file mode 100644
index 000000000..fae4ce658
--- /dev/null
+++ b/layout/reftests/text-decoration/text-decoration-propagation-1-quirks-ref.html
@@ -0,0 +1,34 @@
+<title>text-decoration</title>
+
+<h1>text-decoration on a block</h1>
+
+ <u>text directly in parent</u>
+
+ <div><u>text in block</u></div>
+
+ <div style="float:left; clear: left">text in float</div>
+ <div style="clear:left"></div>
+
+ <div style="display:inline-block">text in<br>inline-block</div><u>
+ </u><div style="display:inline-table">text in<br>inline-table</div>
+
+ <div style="height: 2em">
+ <div style="position: absolute">text in abs-pos</div>
+ </div>
+
+<h1>text-decoration on an inline</h1>
+
+ <u>text directly in parent</u>
+
+ <div><u>text in block</u></div>
+
+ <div style="float:left; clear: left">text in float</div>
+ <div style="clear:left"></div>
+
+ <div style="display:inline-block">text in<br>inline-block</div><u>
+ </u><div style="display:inline-table">text in<br>inline-table</div>
+
+ <div style="height: 2em">
+ <div style="position: absolute">text in abs-pos</div>
+ </div>
+
diff --git a/layout/reftests/text-decoration/text-decoration-propagation-1-quirks.html b/layout/reftests/text-decoration/text-decoration-propagation-1-quirks.html
new file mode 100644
index 000000000..74f35a67c
--- /dev/null
+++ b/layout/reftests/text-decoration/text-decoration-propagation-1-quirks.html
@@ -0,0 +1,42 @@
+<title>text-decoration</title>
+
+<h1>text-decoration on a block</h1>
+
+<div style="text-decoration: underline">
+
+ text directly in parent
+
+ <div>text in block</div>
+
+ <div style="float:left; clear: left">text in float</div>
+ <div style="clear:left"></div>
+
+ <div style="display:inline-block">text in<br>inline-block</div>
+ <div style="display:inline-table">text in<br>inline-table</div>
+
+ <div style="height: 2em">
+ <div style="position: absolute">text in abs-pos</div>
+ </div>
+
+</div>
+
+<h1>text-decoration on an inline</h1>
+
+<div style="text-decoration: underline; display: inline">
+
+ text directly in parent
+
+ <div>text in block</div>
+
+ <div style="float:left; clear: left">text in float</div>
+ <div style="clear:left"></div>
+
+ <div style="display:inline-block">text in<br>inline-block</div>
+ <div style="display:inline-table">text in<br>inline-table</div>
+
+ <div style="height: 2em">
+ <div style="position: absolute">text in abs-pos</div>
+ </div>
+
+</div>
+
diff --git a/layout/reftests/text-decoration/text-decoration-propagation-1-standards-ref.html b/layout/reftests/text-decoration/text-decoration-propagation-1-standards-ref.html
new file mode 100644
index 000000000..7238485ab
--- /dev/null
+++ b/layout/reftests/text-decoration/text-decoration-propagation-1-standards-ref.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<title>text-decoration</title>
+
+<h1>text-decoration on a block</h1>
+
+ <u>text directly in parent</u>
+
+ <div><u>text in block</u></div>
+
+ <div style="float:left; clear: left">text in float</div>
+ <div style="clear:left"></div>
+
+ <div style="display:inline-block">text in<br>inline-block</div><u>
+ </u><div style="display:inline-table">text in<br>inline-table</div>
+
+ <div style="height: 2em">
+ <div style="position: absolute">text in abs-pos</div>
+ </div>
+
+<h1>text-decoration on an inline</h1>
+
+ <u>text directly in parent</u>
+
+ <div><u>text in block</u></div>
+
+ <div style="float:left; clear: left">text in float</div>
+ <div style="clear:left"></div>
+
+ <div style="display:inline-block">text in<br>inline-block</div><u>
+ </u><div style="display:inline-table">text in<br>inline-table</div>
+
+ <div style="height: 2em">
+ <div style="position: absolute">text in abs-pos</div>
+ </div>
+
diff --git a/layout/reftests/text-decoration/text-decoration-propagation-1-standards.html b/layout/reftests/text-decoration/text-decoration-propagation-1-standards.html
new file mode 100644
index 000000000..bba9d57f2
--- /dev/null
+++ b/layout/reftests/text-decoration/text-decoration-propagation-1-standards.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<title>text-decoration</title>
+
+<h1>text-decoration on a block</h1>
+
+<div style="text-decoration: underline">
+
+ text directly in parent
+
+ <div>text in block</div>
+
+ <div style="float:left; clear: left">text in float</div>
+ <div style="clear:left"></div>
+
+ <div style="display:inline-block">text in<br>inline-block</div>
+ <div style="display:inline-table">text in<br>inline-table</div>
+
+ <div style="height: 2em">
+ <div style="position: absolute">text in abs-pos</div>
+ </div>
+
+</div>
+
+<h1>text-decoration on an inline</h1>
+
+<div style="text-decoration: underline; display: inline">
+
+ text directly in parent
+
+ <div>text in block</div>
+
+ <div style="float:left; clear: left">text in float</div>
+ <div style="clear:left"></div>
+
+ <div style="display:inline-block">text in<br>inline-block</div>
+ <div style="display:inline-table">text in<br>inline-table</div>
+
+ <div style="height: 2em">
+ <div style="position: absolute">text in abs-pos</div>
+ </div>
+
+</div>
+
diff --git a/layout/reftests/text-decoration/text-decoration-zorder-1-quirks.html b/layout/reftests/text-decoration/text-decoration-zorder-1-quirks.html
new file mode 100644
index 000000000..18eaeba0d
--- /dev/null
+++ b/layout/reftests/text-decoration/text-decoration-zorder-1-quirks.html
@@ -0,0 +1,44 @@
+<html lang="en-US">
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { background: white; }
+
+ p.serif { font-family: serif; left: 20px; }
+ p.sans { font-family: sans-serif; left: 220px; }
+
+ p {
+ margin: 0;
+ position: absolute;
+ font-weight: bold;
+ font-size: 50px;
+ color: fuchsia;
+ }
+
+ span { color: blue; }
+
+ p.under { text-decoration: underline; top: 25px; }
+ p.over { text-decoration: overline; top: 125px; }
+ p.through { text-decoration: line-through; top: 225px; }
+
+ </style>
+</head>
+<body>
+
+<p class="serif under"><span>&Aacute;p|/</span></p>
+
+<p class="serif over"><span>&Aacute;p|/</span></p>
+
+<p class="serif through"><span>&Aacute;p|/</span></p>
+
+<p class="sans under"><span>&Aacute;p|/</span></p>
+
+<p class="sans over"><span>&Aacute;p|/</span></p>
+
+<p class="sans through"><span>&Aacute;p|/</span></p>
+
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/text-decoration-zorder-1-ref.html b/layout/reftests/text-decoration/text-decoration-zorder-1-ref.html
new file mode 100644
index 000000000..e12598730
--- /dev/null
+++ b/layout/reftests/text-decoration/text-decoration-zorder-1-ref.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { background: white; }
+
+ p.serif { font-family: serif; left: 20px; }
+ p.sans { font-family: sans-serif; left: 220px; }
+
+ p {
+ margin: 0;
+ position: absolute;
+ font-weight: bold;
+ font-size: 50px;
+ }
+
+ p.under { text-decoration: underline; top: 25px; }
+ p.over { text-decoration: overline; top: 125px; }
+ p.through { text-decoration: line-through; top: 225px; }
+
+ p.text { text-decoration: none ! important; }
+ p.line span { color: transparent; }
+
+ p.text { color: blue; }
+ p.line { color: fuchsia; }
+
+ </style>
+</head>
+<body>
+
+<p class="serif line under"><span>&Aacute;p|/</span></p>
+<p class="serif text under"><span>&Aacute;p|/</span></p>
+
+<p class="serif line over"><span>&Aacute;p|/</span></p>
+<p class="serif text over"><span>&Aacute;p|/</span></p>
+
+<p class="serif text through"><span>&Aacute;p|/</span></p>
+<p class="serif line through"><span>&Aacute;p|/</span></p>
+
+<p class="sans line under"><span>&Aacute;p|/</span></p>
+<p class="sans text under"><span>&Aacute;p|/</span></p>
+
+<p class="sans line over"><span>&Aacute;p|/</span></p>
+<p class="sans text over"><span>&Aacute;p|/</span></p>
+
+<p class="sans text through"><span>&Aacute;p|/</span></p>
+<p class="sans line through"><span>&Aacute;p|/</span></p>
+
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/text-decoration-zorder-1-standards.html b/layout/reftests/text-decoration/text-decoration-zorder-1-standards.html
new file mode 100644
index 000000000..38d377f8b
--- /dev/null
+++ b/layout/reftests/text-decoration/text-decoration-zorder-1-standards.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body { background: white; }
+
+ p.serif { font-family: serif; left: 20px; }
+ p.sans { font-family: sans-serif; left: 220px; }
+
+ p {
+ margin: 0;
+ position: absolute;
+ font-weight: bold;
+ font-size: 50px;
+ color: fuchsia;
+ }
+
+ span { color: blue; }
+
+ p.under { text-decoration: underline; top: 25px; }
+ p.over { text-decoration: overline; top: 125px; }
+ p.through { text-decoration: line-through; top: 225px; }
+
+ </style>
+</head>
+<body>
+
+<p class="serif under"><span>&Aacute;p|/</span></p>
+
+<p class="serif over"><span>&Aacute;p|/</span></p>
+
+<p class="serif through"><span>&Aacute;p|/</span></p>
+
+<p class="sans under"><span>&Aacute;p|/</span></p>
+
+<p class="sans over"><span>&Aacute;p|/</span></p>
+
+<p class="sans through"><span>&Aacute;p|/</span></p>
+
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-block-propagation-2-quirks-ref.html b/layout/reftests/text-decoration/underline-block-propagation-2-quirks-ref.html
new file mode 100644
index 000000000..6f4bc8ecd
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-propagation-2-quirks-ref.html
@@ -0,0 +1,40 @@
+<html><head>
+<title>More tests of propagation of text-decoration</title>
+<style>
+textarea { -moz-appearance: none }
+textarea + textarea { margin-left: 10px }
+</style>
+</head>
+<body>
+<!-- t-d should not propagate to the content of a form control -->
+<form>
+<span style="text-decoration:underline">This text should be underlined.</span><br>
+<textarea rows="2" cols="40">This text should not be underlined.</textarea
+><textarea rows="2" cols="40" style="text-decoration:line-through"
+>This text should be struck out.</textarea>
+<p style="text-decoration:underline">This text should also be underlined.</p>
+</form>
+<!-- t-d should propagate from parent elements to table-cells, except
+ not through a table element in quirks mode, per
+ https://quirks.spec.whatwg.org/#the-text-decoration-doesn't-propagate-into-tables-quirk
+ -->
+<div>
+ <table>
+ <tr>
+ <td>
+ <span style="text-decoration:overline">
+ <span style="text-decoration:line-through">
+ overlined, and struck out
+ </span></span>
+ </td>
+ </tr>
+ </table>
+</div>
+<!-- t-d on a float itself should apply -->
+<div>
+ <p style="text-decoration:underline">This text should be underlined.</p>
+ <p style="float:left; text-decoration:overline"
+ >This text should be overlined (only).</p>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-block-propagation-2-quirks.html b/layout/reftests/text-decoration/underline-block-propagation-2-quirks.html
new file mode 100644
index 000000000..7e32b7581
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-propagation-2-quirks.html
@@ -0,0 +1,35 @@
+<html><head>
+<title>More tests of propagation of text-decoration</title>
+<style>
+textarea { -moz-appearance: none }
+textarea + textarea { margin-left: 10px }
+</style>
+</head>
+<body>
+<!-- t-d should not propagate to the content of a form control -->
+<form style="text-decoration:underline">
+This text should be underlined.<br>
+<textarea rows="2" cols="40">This text should not be underlined.</textarea
+><textarea rows="2" cols="40" style="text-decoration:line-through"
+>This text should be struck out.</textarea>
+<p>This text should also be underlined.</p>
+</form>
+<!-- t-d should propagate from parent elements to table-cells, except
+ not through a table element in quirks mode, per
+ https://quirks.spec.whatwg.org/#the-text-decoration-doesn't-propagate-into-tables-quirk
+ -->
+<div style="text-decoration:underline">
+ <table style="text-decoration:overline">
+ <tr style="text-decoration:line-through">
+ <td>overlined, and struck out</td>
+ </tr>
+ </table>
+</div>
+<!-- t-d on a float itself should apply -->
+<div style="text-decoration:underline">
+ <p>This text should be underlined.</p>
+ <p style="float:left; text-decoration:overline"
+ >This text should be overlined (only).</p>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-block-propagation-2-standards-ref.html b/layout/reftests/text-decoration/underline-block-propagation-2-standards-ref.html
new file mode 100644
index 000000000..9795dcbe4
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-propagation-2-standards-ref.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML>
+<html><head>
+<title>More tests of propagation of text-decoration</title>
+<style>
+textarea { -moz-appearance: none }
+textarea + textarea { margin-left: 10px }
+</style>
+</head>
+<body>
+<!-- t-d should not propagate to the content of a form control -->
+<form>
+<span style="text-decoration:underline">This text should be underlined.</span><br>
+<textarea rows="2" cols="40">This text should not be underlined.</textarea
+><textarea rows="2" cols="40" style="text-decoration:line-through"
+>This text should be struck out.</textarea>
+<p style="text-decoration:underline">This text should also be underlined.</p>
+</form>
+<!-- t-d should propagate from parent elements to table-cells -->
+<div>
+ <table>
+ <tr>
+ <td>
+ <span style="text-decoration:underline">
+ <span style="text-decoration:overline">
+ <span style="text-decoration:line-through">
+ underlined, overlined, and struck out
+ </span></span></span>
+ </td>
+ </tr>
+ </table>
+</div>
+<!-- t-d on a float itself should apply -->
+<div>
+ <p style="text-decoration:underline">This text should be underlined.</p>
+ <p style="float:left; text-decoration:overline"
+ >This text should be overlined (only).</p>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-block-propagation-2-standards.html b/layout/reftests/text-decoration/underline-block-propagation-2-standards.html
new file mode 100644
index 000000000..018c147a1
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-propagation-2-standards.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML>
+<html><head>
+<title>More tests of propagation of text-decoration</title>
+<style>
+textarea { -moz-appearance: none }
+textarea + textarea { margin-left: 10px }
+</style>
+</head>
+<body>
+<!-- t-d should not propagate to the content of a form control -->
+<form style="text-decoration:underline">
+This text should be underlined.<br>
+<textarea rows="2" cols="40">This text should not be underlined.</textarea
+><textarea rows="2" cols="40" style="text-decoration:line-through"
+>This text should be struck out.</textarea>
+<p>This text should also be underlined.</p>
+</form>
+<!-- t-d should propagate from parent elements to table-cells -->
+<div style="text-decoration:underline">
+ <table style="text-decoration:overline">
+ <tr style="text-decoration:line-through">
+ <td>underlined, overlined, and struck out</td>
+ </tr>
+ </table>
+</div>
+<!-- t-d on a float itself should apply -->
+<div style="text-decoration:underline">
+ <p>This text should be underlined.</p>
+ <p style="float:left; text-decoration:overline"
+ >This text should be overlined (only).</p>
+</div>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-block-propagation-quirks-ref.html b/layout/reftests/text-decoration/underline-block-propagation-quirks-ref.html
new file mode 100644
index 000000000..73d8fe301
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-propagation-quirks-ref.html
@@ -0,0 +1,13 @@
+<title>text-decoration: underline test</title>
+<div>
+<span style="text-decoration:underline">This text should be underlined.</span>
+
+<div style="float:left;width:10em">This text should not be underlined.</div>
+
+<div style="clear:both; margin: 1px 2px 3px 4px; border: medium solid; padding: 6px 8px 10px 12px"><span style="text-decoration:underline">This text should be underlined.</span></div>
+
+<div style="position:absolute; top: 400px;left:400px">This should not be underlined.</div>
+
+<div><span style="text-decoration:underline">This should be underlined but </span><span style="display:inline-block">this should not<br>be underlined<br>on any line</span><span style="text-decoration:underline">.</span></div>
+
+<div><span style="text-decoration:underline">This should be underlined but </span><span style="display:inline-table">this should not<br>be underlined<br>on any line</span><span style="text-decoration:underline">.</span></div>
diff --git a/layout/reftests/text-decoration/underline-block-propagation-quirks.html b/layout/reftests/text-decoration/underline-block-propagation-quirks.html
new file mode 100644
index 000000000..ef3e25537
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-propagation-quirks.html
@@ -0,0 +1,13 @@
+<title>text-decoration: underline test</title>
+<div style="text-decoration:underline">
+This text should be underlined.
+
+<div style="float:left;width:10em">This text should not be underlined.</div>
+
+<div style="clear:both; margin: 1px 2px 3px 4px; border: medium solid; padding: 6px 8px 10px 12px">This text should be underlined.</div>
+
+<div style="position:absolute; top: 400px;left:400px">This should not be underlined.</div>
+
+<div>This should be underlined but <span style="display:inline-block">this should not<br>be underlined<br>on any line</span>.</div>
+
+<div>This should be underlined but <span style="display:inline-table">this should not<br>be underlined<br>on any line</span>.</div>
diff --git a/layout/reftests/text-decoration/underline-block-propagation-standards-ref.html b/layout/reftests/text-decoration/underline-block-propagation-standards-ref.html
new file mode 100644
index 000000000..d7ce633de
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-propagation-standards-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<div>
+<span style="text-decoration:underline">This text should be underlined.</span>
+
+<div style="float:left;width:10em">This text should not be underlined.</div>
+
+<div style="clear:both; margin: 1px 2px 3px 4px; border: medium solid; padding: 6px 8px 10px 12px"><span style="text-decoration:underline">This text should be underlined.</span></div>
+
+<div style="position:absolute; top: 400px;left:400px">This should not be underlined.</div>
+
+<div><span style="text-decoration:underline">This should be underlined but </span><span style="display:inline-block">this should not<br>be underlined<br>on any line</span><span style="text-decoration:underline">.</span></div>
+
+<div><span style="text-decoration:underline">This should be underlined but </span><span style="display:inline-table">this should not<br>be underlined<br>on any line</span><span style="text-decoration:underline">.</span></div>
diff --git a/layout/reftests/text-decoration/underline-block-propagation-standards.html b/layout/reftests/text-decoration/underline-block-propagation-standards.html
new file mode 100644
index 000000000..a010e93a7
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-propagation-standards.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<div style="text-decoration:underline">
+This text should be underlined.
+
+<div style="float:left;width:10em">This text should not be underlined.</div>
+
+<div style="clear:both; margin: 1px 2px 3px 4px; border: medium solid; padding: 6px 8px 10px 12px">This text should be underlined.</div>
+
+<div style="position:absolute; top: 400px;left:400px">This should not be underlined.</div>
+
+<div>This should be underlined but <span style="display:inline-block">this should not<br>be underlined<br>on any line</span>.</div>
+
+<div>This should be underlined but <span style="display:inline-table">this should not<br>be underlined<br>on any line</span>.</div>
diff --git a/layout/reftests/text-decoration/underline-block-quirks-notref.html b/layout/reftests/text-decoration/underline-block-quirks-notref.html
new file mode 100644
index 000000000..141a19951
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-quirks-notref.html
@@ -0,0 +1,2 @@
+<title>text-decoration: underline test</title>
+<div>This text should be underlined.</div>
diff --git a/layout/reftests/text-decoration/underline-block-quirks-ref.html b/layout/reftests/text-decoration/underline-block-quirks-ref.html
new file mode 100644
index 000000000..8f70b8e28
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-quirks-ref.html
@@ -0,0 +1,2 @@
+<title>text-decoration: underline test</title>
+<div><span style="text-decoration:underline">This text should be underlined.</span></div>
diff --git a/layout/reftests/text-decoration/underline-block-quirks.html b/layout/reftests/text-decoration/underline-block-quirks.html
new file mode 100644
index 000000000..6860b3aee
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-quirks.html
@@ -0,0 +1,2 @@
+<title>text-decoration: underline test</title>
+<div style="text-decoration:underline">This text should be underlined.</div>
diff --git a/layout/reftests/text-decoration/underline-block-standards-notref.html b/layout/reftests/text-decoration/underline-block-standards-notref.html
new file mode 100644
index 000000000..ed47f3bec
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-standards-notref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<div>This text should be underlined.</div>
diff --git a/layout/reftests/text-decoration/underline-block-standards-ref.html b/layout/reftests/text-decoration/underline-block-standards-ref.html
new file mode 100644
index 000000000..ea53cd446
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-standards-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<div><span style="text-decoration:underline">This text should be underlined.</span></div>
diff --git a/layout/reftests/text-decoration/underline-block-standards.html b/layout/reftests/text-decoration/underline-block-standards.html
new file mode 100644
index 000000000..b9b527d7a
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-block-standards.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<div style="text-decoration:underline">This text should be underlined.</div>
diff --git a/layout/reftests/text-decoration/underline-button-1-ref.html b/layout/reftests/text-decoration/underline-button-1-ref.html
new file mode 100644
index 000000000..c5b84e1c2
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-button-1-ref.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<html>
+<body>
+ <span style="text-decoration: underline">
+ Some</span><button>text</button><span
+ style="text-decoration: underline">and a button
+ </span>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-button-1.html b/layout/reftests/text-decoration/underline-button-1.html
new file mode 100644
index 000000000..4c40e8bdf
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-button-1.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<html>
+<body>
+ <span style="text-decoration: underline">
+ Some<button>text</button>and a button
+ </span>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-button-2-ref.html b/layout/reftests/text-decoration/underline-button-2-ref.html
new file mode 100644
index 000000000..f003bae64
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-button-2-ref.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<html>
+<body>
+ <span style="text-decoration: underline; font: 16px sans-serif">
+ Some</span><button style="text-decoration: underline; color: black; font: 16px sans-serif">text</button><span
+ style="text-decoration: underline; font: 16px sans-serif">and a button
+ </span>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-button-2.html b/layout/reftests/text-decoration/underline-button-2.html
new file mode 100644
index 000000000..c61afd2a1
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-button-2.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<html>
+<body>
+ <span style="text-decoration: underline; font: 16px sans-serif">
+ Some<button style="display: inline; color: black; font: 16px sans-serif">text</button>and a button
+ </span>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-inline-block-quirks-notref.html b/layout/reftests/text-decoration/underline-inline-block-quirks-notref.html
new file mode 100644
index 000000000..17b221274
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-inline-block-quirks-notref.html
@@ -0,0 +1,2 @@
+<title>text-decoration: underline test</title>
+<p>This has an <span style="display:inline-block">inline<br>block</span> in it.</p>
diff --git a/layout/reftests/text-decoration/underline-inline-block-quirks-ref.html b/layout/reftests/text-decoration/underline-inline-block-quirks-ref.html
new file mode 100644
index 000000000..27c474675
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-inline-block-quirks-ref.html
@@ -0,0 +1,2 @@
+<title>text-decoration: underline test</title>
+<p>This has an <span style="display:inline-block"><span style="text-decoration:underline">inline</span><br><span style="text-decoration:underline">block</span></span> in it.</p>
diff --git a/layout/reftests/text-decoration/underline-inline-block-quirks.html b/layout/reftests/text-decoration/underline-inline-block-quirks.html
new file mode 100644
index 000000000..b75286d7d
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-inline-block-quirks.html
@@ -0,0 +1,2 @@
+<title>text-decoration: underline test</title>
+<p>This has an <span style="display:inline-block;text-decoration:underline">inline<br>block</span> in it.</p>
diff --git a/layout/reftests/text-decoration/underline-inline-block-standards-notref.html b/layout/reftests/text-decoration/underline-inline-block-standards-notref.html
new file mode 100644
index 000000000..f2325dfe1
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-inline-block-standards-notref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<p>This has an <span style="display:inline-block">inline<br>block</span> in it.</p>
diff --git a/layout/reftests/text-decoration/underline-inline-block-standards-ref.html b/layout/reftests/text-decoration/underline-inline-block-standards-ref.html
new file mode 100644
index 000000000..6b23d0f4f
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-inline-block-standards-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<p>This has an <span style="display:inline-block"><span style="text-decoration:underline">inline</span><br><span style="text-decoration:underline">block</span></span> in it.</p>
diff --git a/layout/reftests/text-decoration/underline-inline-block-standards.html b/layout/reftests/text-decoration/underline-inline-block-standards.html
new file mode 100644
index 000000000..24b519ebe
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-inline-block-standards.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<p>This has an <span style="display:inline-block;text-decoration:underline">inline<br>block</span> in it.</p>
diff --git a/layout/reftests/text-decoration/underline-select-1-ref.html b/layout/reftests/text-decoration/underline-select-1-ref.html
new file mode 100644
index 000000000..e10ebe978
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-select-1-ref.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<html>
+<body>
+ <span style="text-decoration: underline">
+ Some</span><select><option>text</option></select><span
+ style="text-decoration: underline">and a button
+ </span>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-select-1.html b/layout/reftests/text-decoration/underline-select-1.html
new file mode 100644
index 000000000..84c74d5f7
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-select-1.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<html>
+<body>
+ <span style="text-decoration: underline">
+ Some<select><option>text</option></select>and a button
+ </span>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-select-2-ref.html b/layout/reftests/text-decoration/underline-select-2-ref.html
new file mode 100644
index 000000000..3c032949d
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-select-2-ref.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<html>
+<body>
+ <span style="text-decoration: underline">
+ Some</span><select size="5"><option>text</option></select><span
+ style="text-decoration: underline">and a button
+ </span>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-select-2.html b/layout/reftests/text-decoration/underline-select-2.html
new file mode 100644
index 000000000..e2b014eb4
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-select-2.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<html>
+<body>
+ <span style="text-decoration: underline">
+ Some<select size="5"><option>text</option></select>and a button
+ </span>
+</body>
+</html>
diff --git a/layout/reftests/text-decoration/underline-style-block-dashed-quirks.html b/layout/reftests/text-decoration/underline-style-block-dashed-quirks.html
new file mode 100644
index 000000000..5e8beec1e
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-dashed-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: underline; text-decoration-style: dashed;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-dashed-standards.html b/layout/reftests/text-decoration/underline-style-block-dashed-standards.html
new file mode 100644
index 000000000..237f3d098
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-dashed-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: underline; text-decoration-style: dashed;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-dotted-quirks.html b/layout/reftests/text-decoration/underline-style-block-dotted-quirks.html
new file mode 100644
index 000000000..909e1761d
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-dotted-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: underline; text-decoration-style: dotted;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-dotted-standards.html b/layout/reftests/text-decoration/underline-style-block-dotted-standards.html
new file mode 100644
index 000000000..994681c12
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-dotted-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: underline; text-decoration-style: dotted;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-double-quirks.html b/layout/reftests/text-decoration/underline-style-block-double-quirks.html
new file mode 100644
index 000000000..8047c47f1
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-double-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: underline; text-decoration-style: double;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-double-standards.html b/layout/reftests/text-decoration/underline-style-block-double-standards.html
new file mode 100644
index 000000000..69dbb4a56
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-double-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: underline; text-decoration-style: double;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-quirks-ref.html b/layout/reftests/text-decoration/underline-style-block-quirks-ref.html
new file mode 100644
index 000000000..65d66622f
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-quirks-ref.html
@@ -0,0 +1 @@
+<p style="text-decoration: underline;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-solid-quirks.html b/layout/reftests/text-decoration/underline-style-block-solid-quirks.html
new file mode 100644
index 000000000..d0637957d
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-solid-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: underline; text-decoration-style: solid;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-solid-standards.html b/layout/reftests/text-decoration/underline-style-block-solid-standards.html
new file mode 100644
index 000000000..fdf75e6a1
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-solid-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: underline; text-decoration-style: solid;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-standards-ref.html b/layout/reftests/text-decoration/underline-style-block-standards-ref.html
new file mode 100644
index 000000000..4e03e4f07
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-standards-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: underline;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-wavy-quirks.html b/layout/reftests/text-decoration/underline-style-block-wavy-quirks.html
new file mode 100644
index 000000000..abf208a84
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-wavy-quirks.html
@@ -0,0 +1 @@
+<p style="text-decoration: underline; text-decoration-style: wavy;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-block-wavy-standards.html b/layout/reftests/text-decoration/underline-style-block-wavy-standards.html
new file mode 100644
index 000000000..ae1a6ed72
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-block-wavy-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p style="text-decoration: underline; text-decoration-style: wavy;">This paragraph has underline</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-dashed-quirks.html b/layout/reftests/text-decoration/underline-style-inline-dashed-quirks.html
new file mode 100644
index 000000000..7a2a15ccd
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-dashed-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline; text-decoration-style: dashed;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-dashed-standards.html b/layout/reftests/text-decoration/underline-style-inline-dashed-standards.html
new file mode 100644
index 000000000..8afb04e39
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-dashed-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline; text-decoration-style: dashed;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-dotted-quirks.html b/layout/reftests/text-decoration/underline-style-inline-dotted-quirks.html
new file mode 100644
index 000000000..30da0a460
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-dotted-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline; text-decoration-style: dotted;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-dotted-standards.html b/layout/reftests/text-decoration/underline-style-inline-dotted-standards.html
new file mode 100644
index 000000000..f83d30766
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-dotted-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline; text-decoration-style: dotted;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-double-quirks.html b/layout/reftests/text-decoration/underline-style-inline-double-quirks.html
new file mode 100644
index 000000000..a0f5c9e28
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-double-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline; text-decoration-style: double;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-double-standards.html b/layout/reftests/text-decoration/underline-style-inline-double-standards.html
new file mode 100644
index 000000000..239bd9e06
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-double-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline; text-decoration-style: double;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-quirks-ref.html b/layout/reftests/text-decoration/underline-style-inline-quirks-ref.html
new file mode 100644
index 000000000..d8a1b40b8
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-quirks-ref.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-solid-quirks.html b/layout/reftests/text-decoration/underline-style-inline-solid-quirks.html
new file mode 100644
index 000000000..6f415d16f
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-solid-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline; text-decoration-style: solid;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-solid-standards.html b/layout/reftests/text-decoration/underline-style-inline-solid-standards.html
new file mode 100644
index 000000000..88268b266
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-solid-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline; text-decoration-style: solid;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-standards-ref.html b/layout/reftests/text-decoration/underline-style-inline-standards-ref.html
new file mode 100644
index 000000000..7cc4eec7e
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-standards-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-wavy-quirks.html b/layout/reftests/text-decoration/underline-style-inline-wavy-quirks.html
new file mode 100644
index 000000000..57b8c5e06
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-wavy-quirks.html
@@ -0,0 +1 @@
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline; text-decoration-style: wavy;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-style-inline-wavy-standards.html b/layout/reftests/text-decoration/underline-style-inline-wavy-standards.html
new file mode 100644
index 000000000..d078e7068
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-style-inline-wavy-standards.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<p>This paragraph has no decoration lines, but <span style="text-decoration: underline; text-decoration-style: wavy;">here has underline</span>, and here has no decoration lines.</p>
diff --git a/layout/reftests/text-decoration/underline-table-caption-quirks-notref.html b/layout/reftests/text-decoration/underline-table-caption-quirks-notref.html
new file mode 100644
index 000000000..26c618938
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-caption-quirks-notref.html
@@ -0,0 +1,12 @@
+<title>text-decoration: underline test</title>
+<table border>
+ <caption>This is the table caption</caption>
+ <tr>
+ <td>Row 1, Cell 1</td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-caption-quirks-ref.html b/layout/reftests/text-decoration/underline-table-caption-quirks-ref.html
new file mode 100644
index 000000000..926acf820
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-caption-quirks-ref.html
@@ -0,0 +1,12 @@
+<title>text-decoration: underline test</title>
+<table border>
+ <caption><span style="text-decoration: underline">This is the table caption</span></caption>
+ <tr>
+ <td>Row 1, Cell 1</td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-caption-quirks.html b/layout/reftests/text-decoration/underline-table-caption-quirks.html
new file mode 100644
index 000000000..0fbeba106
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-caption-quirks.html
@@ -0,0 +1,12 @@
+<title>text-decoration: underline test</title>
+<table border>
+ <caption style="text-decoration: underline">This is the table caption</caption>
+ <tr>
+ <td>Row 1, Cell 1</td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-caption-standards-notref.html b/layout/reftests/text-decoration/underline-table-caption-standards-notref.html
new file mode 100644
index 000000000..00cd35b6c
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-caption-standards-notref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<table border>
+ <caption>This is the table caption</caption>
+ <tr>
+ <td>Row 1, Cell 1</td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-caption-standards-ref.html b/layout/reftests/text-decoration/underline-table-caption-standards-ref.html
new file mode 100644
index 000000000..c99bff74b
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-caption-standards-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<table border>
+ <caption><span style="text-decoration: underline">This is the table caption</span></caption>
+ <tr>
+ <td>Row 1, Cell 1</td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-caption-standards.html b/layout/reftests/text-decoration/underline-table-caption-standards.html
new file mode 100644
index 000000000..f9af71bde
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-caption-standards.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<table border>
+ <caption style="text-decoration: underline">This is the table caption</caption>
+ <tr>
+ <td>Row 1, Cell 1</td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-cell-quirks-notref.html b/layout/reftests/text-decoration/underline-table-cell-quirks-notref.html
new file mode 100644
index 000000000..0d77eb061
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-cell-quirks-notref.html
@@ -0,0 +1,11 @@
+<title>text-decoration: underline test</title>
+<table border>
+ <tr>
+ <td>Row 1, Cell 1</td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-cell-quirks-ref.html b/layout/reftests/text-decoration/underline-table-cell-quirks-ref.html
new file mode 100644
index 000000000..d44cc08cc
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-cell-quirks-ref.html
@@ -0,0 +1,11 @@
+<title>text-decoration: underline test</title>
+<table border>
+ <tr>
+ <td><span style="text-decoration: underline">Row 1, Cell 1</span></td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-cell-quirks.html b/layout/reftests/text-decoration/underline-table-cell-quirks.html
new file mode 100644
index 000000000..5c11e7e5d
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-cell-quirks.html
@@ -0,0 +1,11 @@
+<title>text-decoration: underline test</title>
+<table border>
+ <tr>
+ <td style="text-decoration: underline">Row 1, Cell 1</td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-cell-standards-notref.html b/layout/reftests/text-decoration/underline-table-cell-standards-notref.html
new file mode 100644
index 000000000..712d5a16d
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-cell-standards-notref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<table border>
+ <tr>
+ <td>Row 1, Cell 1</td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-cell-standards-ref.html b/layout/reftests/text-decoration/underline-table-cell-standards-ref.html
new file mode 100644
index 000000000..45de37dbb
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-cell-standards-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<table border>
+ <tr>
+ <td><span style="text-decoration: underline">Row 1, Cell 1</span></td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>
diff --git a/layout/reftests/text-decoration/underline-table-cell-standards.html b/layout/reftests/text-decoration/underline-table-cell-standards.html
new file mode 100644
index 000000000..cfaf01e25
--- /dev/null
+++ b/layout/reftests/text-decoration/underline-table-cell-standards.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<title>text-decoration: underline test</title>
+<table border>
+ <tr>
+ <td style="text-decoration: underline">Row 1, Cell 1</td>
+ <td>Row 1, Cell 2</td>
+ </tr>
+ <tr>
+ <td>Row 2, Cell 1</td>
+ <td>Row 2, Cell 2</td>
+ </tr>
+</table>