summaryrefslogtreecommitdiffstats
path: root/layout/reftests/text-shadow
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--layout/reftests/text-shadow/723669-ref.html5
-rw-r--r--layout/reftests/text-shadow/723669.html5
-rw-r--r--layout/reftests/text-shadow/basic-negcoord-ref.html5
-rw-r--r--layout/reftests/text-shadow/basic-negcoord-ref.xhtml6
-rw-r--r--layout/reftests/text-shadow/basic-negcoord.html4
-rw-r--r--layout/reftests/text-shadow/basic-negcoord.xhtml5
-rw-r--r--layout/reftests/text-shadow/basic-opacity-ref.html2
-rw-r--r--layout/reftests/text-shadow/basic-opacity.html1
-rw-r--r--layout/reftests/text-shadow/basic-ref.html2
-rw-r--r--layout/reftests/text-shadow/basic-ref.xhtml6
-rw-r--r--layout/reftests/text-shadow/basic.html1
-rw-r--r--layout/reftests/text-shadow/basic.xhtml5
-rw-r--r--layout/reftests/text-shadow/blur-notref.html1
-rw-r--r--layout/reftests/text-shadow/blur-notref.xhtml3
-rw-r--r--layout/reftests/text-shadow/blur-opacity-ref.html7
-rw-r--r--layout/reftests/text-shadow/blur-opacity.html7
-rw-r--r--layout/reftests/text-shadow/blur.html1
-rw-r--r--layout/reftests/text-shadow/blur.xhtml3
-rw-r--r--layout/reftests/text-shadow/color-inherit-ref.html5
-rw-r--r--layout/reftests/text-shadow/color-inherit-ref.xhtml6
-rw-r--r--layout/reftests/text-shadow/color-inherit.html4
-rw-r--r--layout/reftests/text-shadow/color-inherit.xhtml5
-rw-r--r--layout/reftests/text-shadow/color-parserorder-ref.html1
-rw-r--r--layout/reftests/text-shadow/color-parserorder.html1
-rw-r--r--layout/reftests/text-shadow/decorations-multiple-zorder-ref.html36
-rw-r--r--layout/reftests/text-shadow/decorations-multiple-zorder.html7
-rw-r--r--layout/reftests/text-shadow/lineoverflow-ref.html3
-rw-r--r--layout/reftests/text-shadow/lineoverflow.html3
-rw-r--r--layout/reftests/text-shadow/multiple-noblur-ref.html5
-rw-r--r--layout/reftests/text-shadow/multiple-noblur-ref.xhtml9
-rw-r--r--layout/reftests/text-shadow/multiple-noblur.html1
-rw-r--r--layout/reftests/text-shadow/multiple-noblur.xhtml5
-rw-r--r--layout/reftests/text-shadow/overflow-clip-ref.html13
-rw-r--r--layout/reftests/text-shadow/overflow-clip.html18
-rw-r--r--layout/reftests/text-shadow/overflow-decoration-ref.html25
-rw-r--r--layout/reftests/text-shadow/overflow-decoration.html23
-rw-r--r--layout/reftests/text-shadow/overflow-not-scrollable-1-ref.html16
-rw-r--r--layout/reftests/text-shadow/overflow-not-scrollable-1-ref2.html15
-rw-r--r--layout/reftests/text-shadow/overflow-not-scrollable-1.html16
-rw-r--r--layout/reftests/text-shadow/overflow-not-scrollable-2-ref.html17
-rw-r--r--layout/reftests/text-shadow/overflow-not-scrollable-2.html17
-rw-r--r--layout/reftests/text-shadow/padding-decoration-ref.html1
-rw-r--r--layout/reftests/text-shadow/padding-decoration.html1
-rw-r--r--layout/reftests/text-shadow/quirks-decor-noblur-ref.html11
-rw-r--r--layout/reftests/text-shadow/quirks-decor-noblur.html1
-rw-r--r--layout/reftests/text-shadow/reftest.list41
-rw-r--r--layout/reftests/text-shadow/standards-decor-noblur-ref.html16
-rw-r--r--layout/reftests/text-shadow/standards-decor-noblur.html4
-rw-r--r--layout/reftests/text-shadow/text-shadow-on-selection-1-ref.html26
-rw-r--r--layout/reftests/text-shadow/text-shadow-on-selection-1.html41
-rw-r--r--layout/reftests/text-shadow/text-shadow-on-selection-2-ref.html27
-rw-r--r--layout/reftests/text-shadow/text-shadow-on-selection-2.html43
-rw-r--r--layout/reftests/text-shadow/text-shadow-on-space-1-ref.html16
-rw-r--r--layout/reftests/text-shadow/text-shadow-on-space-1.html17
-rw-r--r--layout/reftests/text-shadow/text-shadow-selected-1-notref.html31
-rw-r--r--layout/reftests/text-shadow/text-shadow-selected-1-ref.html33
-rw-r--r--layout/reftests/text-shadow/text-shadow-selected-1.html31
-rw-r--r--layout/reftests/text-shadow/text-shadow-selected-2-notref.html31
-rw-r--r--layout/reftests/text-shadow/text-shadow-selected-2-ref.html33
-rw-r--r--layout/reftests/text-shadow/text-shadow-selected-2.html31
-rw-r--r--layout/reftests/text-shadow/textindent-ref.html3
-rw-r--r--layout/reftests/text-shadow/textindent.html3
62 files changed, 761 insertions, 0 deletions
diff --git a/layout/reftests/text-shadow/723669-ref.html b/layout/reftests/text-shadow/723669-ref.html
new file mode 100644
index 0000000000..779f4adcf4
--- /dev/null
+++ b/layout/reftests/text-shadow/723669-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html style='text-shadow: 0.6em 0.6em 0.1em green'>
+<body>I have a green shadow</body>
+</html>
+
diff --git a/layout/reftests/text-shadow/723669.html b/layout/reftests/text-shadow/723669.html
new file mode 100644
index 0000000000..0ca26ec9ed
--- /dev/null
+++ b/layout/reftests/text-shadow/723669.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+<body onload="document.documentElement.style.textShadow = '0.6em 0.6em 0.1em green';">I have a green shadow</body>
+</html>
+
diff --git a/layout/reftests/text-shadow/basic-negcoord-ref.html b/layout/reftests/text-shadow/basic-negcoord-ref.html
new file mode 100644
index 0000000000..79c3d996cf
--- /dev/null
+++ b/layout/reftests/text-shadow/basic-negcoord-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+
+<div style="position: absolute; top: 20px; left: 20px; color: green; z-index: 0;">Hello</div>
+<div style="position: absolute; top: 24px; left: 24px; color: black; z-index: 1;">Hello</div>
+
diff --git a/layout/reftests/text-shadow/basic-negcoord-ref.xhtml b/layout/reftests/text-shadow/basic-negcoord-ref.xhtml
new file mode 100644
index 0000000000..84826fc0ac
--- /dev/null
+++ b/layout/reftests/text-shadow/basic-negcoord-ref.xhtml
@@ -0,0 +1,6 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <stack style="align-items: start; justify-items: left;">
+ <label style="margin-top: 20px; margin-left: 20px; color: green;" value="Hello!"/>
+ <label style="margin-top: 24px; margin-left: 24px; color: black;" value="Hello!"/>
+ </stack>
+</box>
diff --git a/layout/reftests/text-shadow/basic-negcoord.html b/layout/reftests/text-shadow/basic-negcoord.html
new file mode 100644
index 0000000000..dfa79426f7
--- /dev/null
+++ b/layout/reftests/text-shadow/basic-negcoord.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+
+<div style="position: absolute; top: 24px; left: 24px; color: black; text-shadow: green -4px -4px;">Hello</div>
+
diff --git a/layout/reftests/text-shadow/basic-negcoord.xhtml b/layout/reftests/text-shadow/basic-negcoord.xhtml
new file mode 100644
index 0000000000..699de53224
--- /dev/null
+++ b/layout/reftests/text-shadow/basic-negcoord.xhtml
@@ -0,0 +1,5 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <stack style="align-items: start; justify-items: left;">
+ <label style="margin-top: 24px; margin-left: 24px; color: black; text-shadow: green -4px -4px" value="Hello!"/>
+ </stack>
+</box>
diff --git a/layout/reftests/text-shadow/basic-opacity-ref.html b/layout/reftests/text-shadow/basic-opacity-ref.html
new file mode 100644
index 0000000000..11aa6d5176
--- /dev/null
+++ b/layout/reftests/text-shadow/basic-opacity-ref.html
@@ -0,0 +1,2 @@
+<div style="position: absolute; top: 33px; left: 33px; color: rgba(0, 0, 255, 0.2); z-index: 0;">Hello</div>
+<div style="position: absolute; top: 30px; left: 30px; color: green; z-index: 1;">Hello</div>
diff --git a/layout/reftests/text-shadow/basic-opacity.html b/layout/reftests/text-shadow/basic-opacity.html
new file mode 100644
index 0000000000..1e2b12d606
--- /dev/null
+++ b/layout/reftests/text-shadow/basic-opacity.html
@@ -0,0 +1 @@
+<div style="position: absolute; top: 30px; left: 30px; color: green; text-shadow: rgba(0, 0, 255, 0.2) 3px 3px;">Hello</div>
diff --git a/layout/reftests/text-shadow/basic-ref.html b/layout/reftests/text-shadow/basic-ref.html
new file mode 100644
index 0000000000..26b07d2e29
--- /dev/null
+++ b/layout/reftests/text-shadow/basic-ref.html
@@ -0,0 +1,2 @@
+<div style="position: absolute; top: 33px; left: 33px; color: grey; z-index: 0;">Hello</div>
+<div style="position: absolute; top: 30px; left: 30px; color: green; z-index: 1;">Hello</div>
diff --git a/layout/reftests/text-shadow/basic-ref.xhtml b/layout/reftests/text-shadow/basic-ref.xhtml
new file mode 100644
index 0000000000..520fe17a48
--- /dev/null
+++ b/layout/reftests/text-shadow/basic-ref.xhtml
@@ -0,0 +1,6 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <stack style="align-items: start; justify-items: left;">
+ <label style="margin-top: 33px; margin-left: 33px; color: grey;" value="Hello"/>
+ <label style="margin-top: 30px; margin-left: 30px; color: green;" value="Hello"/>
+ </stack>
+</box>
diff --git a/layout/reftests/text-shadow/basic.html b/layout/reftests/text-shadow/basic.html
new file mode 100644
index 0000000000..2c7dc05ae6
--- /dev/null
+++ b/layout/reftests/text-shadow/basic.html
@@ -0,0 +1 @@
+<div style="position: absolute; top: 30px; left: 30px; color: green; text-shadow: grey 3px 3px;">Hello</div>
diff --git a/layout/reftests/text-shadow/basic.xhtml b/layout/reftests/text-shadow/basic.xhtml
new file mode 100644
index 0000000000..f57ff366bb
--- /dev/null
+++ b/layout/reftests/text-shadow/basic.xhtml
@@ -0,0 +1,5 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <stack style="align-items: start; justify-items: left;">
+ <label style="margin-top: 30px; margin-left: 30px; color: green; text-shadow: grey 3px 3px;" value="Hello"/>
+ </stack>
+</box>
diff --git a/layout/reftests/text-shadow/blur-notref.html b/layout/reftests/text-shadow/blur-notref.html
new file mode 100644
index 0000000000..28404095ac
--- /dev/null
+++ b/layout/reftests/text-shadow/blur-notref.html
@@ -0,0 +1 @@
+<div style="text-shadow: blue 4px 4px">The shadow should be blurred</div>
diff --git a/layout/reftests/text-shadow/blur-notref.xhtml b/layout/reftests/text-shadow/blur-notref.xhtml
new file mode 100644
index 0000000000..09704014b2
--- /dev/null
+++ b/layout/reftests/text-shadow/blur-notref.xhtml
@@ -0,0 +1,3 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <label style="text-shadow: blue 4px 4px" value="The shadow should be blurred"/>
+</box>
diff --git a/layout/reftests/text-shadow/blur-opacity-ref.html b/layout/reftests/text-shadow/blur-opacity-ref.html
new file mode 100644
index 0000000000..0637cd5f0d
--- /dev/null
+++ b/layout/reftests/text-shadow/blur-opacity-ref.html
@@ -0,0 +1,7 @@
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url(../fonts/Ahem.ttf);
+}
+</style>
+<div style="position: absolute; clip: rect(20px, 100px, 100px, 20px); font: 128px Ahem; color: #7f7f7f">a</div>
diff --git a/layout/reftests/text-shadow/blur-opacity.html b/layout/reftests/text-shadow/blur-opacity.html
new file mode 100644
index 0000000000..176bd8f29f
--- /dev/null
+++ b/layout/reftests/text-shadow/blur-opacity.html
@@ -0,0 +1,7 @@
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url(../fonts/Ahem.ttf);
+}
+</style>
+<div style="position: absolute; clip: rect(20px, 100px, 100px, 20px); font: 128px Ahem; color: transparent; text-shadow: rgba(0, 0, 0, 0.5) 0px 0px 1px">a</div>
diff --git a/layout/reftests/text-shadow/blur.html b/layout/reftests/text-shadow/blur.html
new file mode 100644
index 0000000000..d14b70f2f4
--- /dev/null
+++ b/layout/reftests/text-shadow/blur.html
@@ -0,0 +1 @@
+<div style="text-shadow: blue 4px 4px 2px">The shadow should be blurred</div>
diff --git a/layout/reftests/text-shadow/blur.xhtml b/layout/reftests/text-shadow/blur.xhtml
new file mode 100644
index 0000000000..d285c82024
--- /dev/null
+++ b/layout/reftests/text-shadow/blur.xhtml
@@ -0,0 +1,3 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <label style="text-shadow: blue 4px 4px 2px" value="The shadow should be blurred"/>
+</box>
diff --git a/layout/reftests/text-shadow/color-inherit-ref.html b/layout/reftests/text-shadow/color-inherit-ref.html
new file mode 100644
index 0000000000..8fa2dafa5e
--- /dev/null
+++ b/layout/reftests/text-shadow/color-inherit-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+
+<div style="position: absolute; top: 27px; left: 27px; color: blue; z-index: 0;">Hello</div>
+<div style="position: absolute; top: 24px; left: 24px; color: blue; z-index: 1;">Hello</div>
+
diff --git a/layout/reftests/text-shadow/color-inherit-ref.xhtml b/layout/reftests/text-shadow/color-inherit-ref.xhtml
new file mode 100644
index 0000000000..6efca568fc
--- /dev/null
+++ b/layout/reftests/text-shadow/color-inherit-ref.xhtml
@@ -0,0 +1,6 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <stack style="align-items: start; justify-items: left;">
+ <label style="margin-top: 27px; margin-left: 27px; color: blue;" value="Hello"/>
+ <label style="margin-top: 24px; margin-left: 24px; color: blue;" value="Hello"/>
+ </stack>
+</box>
diff --git a/layout/reftests/text-shadow/color-inherit.html b/layout/reftests/text-shadow/color-inherit.html
new file mode 100644
index 0000000000..59bc12c423
--- /dev/null
+++ b/layout/reftests/text-shadow/color-inherit.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+
+<div style="position: absolute; top: 24px; left: 24px; color: blue; text-shadow: 3px 3px;">Hello</div>
+
diff --git a/layout/reftests/text-shadow/color-inherit.xhtml b/layout/reftests/text-shadow/color-inherit.xhtml
new file mode 100644
index 0000000000..fe3162aa69
--- /dev/null
+++ b/layout/reftests/text-shadow/color-inherit.xhtml
@@ -0,0 +1,5 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <stack style="align-items: start; justify-items: left;">
+ <label style="margin-top: 24px; margin-left: 24px; color: blue; text-shadow: 3px 3px;" value="Hello"/>
+ </stack>
+</box>
diff --git a/layout/reftests/text-shadow/color-parserorder-ref.html b/layout/reftests/text-shadow/color-parserorder-ref.html
new file mode 100644
index 0000000000..16d53ce0b6
--- /dev/null
+++ b/layout/reftests/text-shadow/color-parserorder-ref.html
@@ -0,0 +1 @@
+<div style="text-shadow: green 3px 3px 2px;">Parser test</div>
diff --git a/layout/reftests/text-shadow/color-parserorder.html b/layout/reftests/text-shadow/color-parserorder.html
new file mode 100644
index 0000000000..f6be32aae0
--- /dev/null
+++ b/layout/reftests/text-shadow/color-parserorder.html
@@ -0,0 +1 @@
+<div style="text-shadow: 3px 3px 2px green;">Parser test</div>
diff --git a/layout/reftests/text-shadow/decorations-multiple-zorder-ref.html b/layout/reftests/text-shadow/decorations-multiple-zorder-ref.html
new file mode 100644
index 0000000000..2bf66e9f47
--- /dev/null
+++ b/layout/reftests/text-shadow/decorations-multiple-zorder-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<style>
+div{
+ text-decoration-skip-ink: none;
+ }
+</style>
+<!-- Shadows -->
+<!-- Blue underline/text -->
+<div style="position: absolute; top: 22px; left: 22px;"><span style="color: blue; text-decoration: underline">test</span></div>
+<!-- Red overline/text -->
+<!--
+There are some additional pixels appearing when two red texts are overlap. We
+use transparent color for the first one to prevent the situation and the failure
+of reftest.
+-->
+<div style="position: absolute; top: 22px; left: 22px;"><span style="color: rgba(0, 0, 0, 0);">test</span><span style="color: transparent; text-decoration: red underline;">for</span></div>
+<div style="position: absolute; top: 22px; left: 22px;"><span style="color: rgba(0, 0, 0, 0);">test</span><span style="color: red; text-decoration: overline;">for</span></div>
+<!-- Green text/underline -->
+<!--
+There are some additional pixels appearing when two red texts are overlap. We
+use transparent color for the first one to prevent the situation and the failure
+of reftest.
+-->
+<div style="position: absolute; top: 22px; left: 22px;"><span style="color: rgba(0, 0, 0, 0);">testfor</span><span style="text-decoration: green underline; color: transparent;">quirks</span></div>
+<div style="position: absolute; top: 22px; left: 22px;"><span style="color: rgba(0, 0, 0, 0);">testfor</span><span style="text-decoration: overline; color: green;">quirks</span></div>
+
+<!-- "Real" text -->
+<!-- Blue underline/text -->
+<div style="position: absolute; top: 20px; left: 20px; color: blue; text-decoration: underline;"><span style="color: rgba(0, 0, 0, 0);">testforquirks</span></div>
+<div style="position: absolute; top: 20px; left: 20px;"><span style="color: blue;">test</span></div>
+<!-- Red overline/text -->
+<div style="position: absolute; top: 20px; left: 20px; color: rgba(0, 0, 0, 0);">test<span style="text-decoration: overline; color: red;"><span style="color: rgba(0, 0, 0, 0);">forquirks</span></span></div>
+<div style="position: absolute; top: 20px; left: 20px;"><span style="color: rgba(0, 0, 0, 0);">test</span><span style="color: red;">for</span></div>
+<!-- Green underline/text -->
+<div style="position: absolute; top: 20px; left: 20px;"><span style="color: rgba(0, 0, 0, 0);">testfor</span><span style="text-decoration: underline; color: green;"><span style="color: rgba(0, 0, 0, 0);">quirks</span></span></div>
+<div style="position: absolute; top: 20px; left: 20px;"><span style="color: rgba(0, 0, 0, 0);">testfor</span><span style="color: green;">quirks</span></div>
diff --git a/layout/reftests/text-shadow/decorations-multiple-zorder.html b/layout/reftests/text-shadow/decorations-multiple-zorder.html
new file mode 100644
index 0000000000..bd8cd7155d
--- /dev/null
+++ b/layout/reftests/text-shadow/decorations-multiple-zorder.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<style>
+div{
+ text-decoration-skip-ink: none;
+ }
+</style>
+<div style="text-shadow: 2px 2px; color: blue; text-decoration: underline; position: absolute; top: 20px; left: 20px;">test<span style="text-decoration: overline; color: red;">for<span style="text-decoration: underline; color: green;">quirks</span></span></div>
diff --git a/layout/reftests/text-shadow/lineoverflow-ref.html b/layout/reftests/text-shadow/lineoverflow-ref.html
new file mode 100644
index 0000000000..07fad32ce7
--- /dev/null
+++ b/layout/reftests/text-shadow/lineoverflow-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+
+<div style="position: absolute; top: 20px; left: 20px;"><span style="text-decoration: underline; text-shadow: 3px 3px 2px red; font-size: 40px;">Testingtestingtestingtesting</span></div>
diff --git a/layout/reftests/text-shadow/lineoverflow.html b/layout/reftests/text-shadow/lineoverflow.html
new file mode 100644
index 0000000000..5c4cb58aa0
--- /dev/null
+++ b/layout/reftests/text-shadow/lineoverflow.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+
+<div style="position: absolute; top: 20px; left: 20px; width: 50px; text-decoration: underline; text-shadow: 3px 3px 2px red; font-size: 40px;">Testingtestingtestingtesting</div>
diff --git a/layout/reftests/text-shadow/multiple-noblur-ref.html b/layout/reftests/text-shadow/multiple-noblur-ref.html
new file mode 100644
index 0000000000..a5f125e475
--- /dev/null
+++ b/layout/reftests/text-shadow/multiple-noblur-ref.html
@@ -0,0 +1,5 @@
+<div style="position: absolute; top: 33px; left: 33px; color: grey; z-index: 0;">Hello</div>
+<div style="position: absolute; top: 30px; left: 30px; color: green; z-index: 1;">Hello</div>
+<div style="position: absolute; top: 27px; left: 27px; color: red; z-index: 2;">Hello</div>
+<div style="position: absolute; top: 24px; left: 24px; color: purple; z-index: 3;">Hello</div>
+<div style="position: absolute; top: 20px; left: 20px; color: black; z-index: 4;">Hello</div>
diff --git a/layout/reftests/text-shadow/multiple-noblur-ref.xhtml b/layout/reftests/text-shadow/multiple-noblur-ref.xhtml
new file mode 100644
index 0000000000..7b4c18ec86
--- /dev/null
+++ b/layout/reftests/text-shadow/multiple-noblur-ref.xhtml
@@ -0,0 +1,9 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <stack style="align-items: start; justify-items: left;">
+ <label style="margin-top: 33px; margin-left: 33px; color: grey;" value="Hello"/>
+ <label style="margin-top: 30px; margin-left: 30px; color: green;" value="Hello"/>
+ <label style="margin-top: 27px; margin-left: 27px; color: red;" value="Hello"/>
+ <label style="margin-top: 24px; margin-left: 24px; color: purple;" value="Hello"/>
+ <label style="margin-top: 20px; margin-left: 20px; color: black;" value="Hello"/>
+ </stack>
+</box>
diff --git a/layout/reftests/text-shadow/multiple-noblur.html b/layout/reftests/text-shadow/multiple-noblur.html
new file mode 100644
index 0000000000..958f0ced7c
--- /dev/null
+++ b/layout/reftests/text-shadow/multiple-noblur.html
@@ -0,0 +1 @@
+<div style="position: absolute; top: 20px; left: 20px; color: black; text-shadow: purple 4px 4px, red 7px 7px, green 10px 10px, grey 13px 13px;">Hello</div>
diff --git a/layout/reftests/text-shadow/multiple-noblur.xhtml b/layout/reftests/text-shadow/multiple-noblur.xhtml
new file mode 100644
index 0000000000..ef0dad6518
--- /dev/null
+++ b/layout/reftests/text-shadow/multiple-noblur.xhtml
@@ -0,0 +1,5 @@
+<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <stack style="align-items: start; justify-items: left;">
+ <label style="margin-top: 20px; margin-left: 20px; color: black; text-shadow: purple 4px 4px, red 7px 7px, green 10px 10px, grey 13px 13px;" value="Hello"/>
+ </stack>
+</box>
diff --git a/layout/reftests/text-shadow/overflow-clip-ref.html b/layout/reftests/text-shadow/overflow-clip-ref.html
new file mode 100644
index 0000000000..88f1ba2d31
--- /dev/null
+++ b/layout/reftests/text-shadow/overflow-clip-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head></head>
+<body>
+ <div style="
+ width: 3em;
+ text-overflow: clip;
+ overflow: hidden;
+ white-space: nowrap;
+ color: red;">MMMMMM
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/overflow-clip.html b/layout/reftests/text-shadow/overflow-clip.html
new file mode 100644
index 0000000000..399bc4311f
--- /dev/null
+++ b/layout/reftests/text-shadow/overflow-clip.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<!--
+checks that unblurred text-shadows are
+actually clipped by text-overflow: clip
+-->
+<html>
+<head></head>
+<body>
+ <div style="
+ width: 3em;
+ text-overflow: clip;
+ overflow: hidden;
+ text-shadow: 3em 0px black;
+ white-space: nowrap;
+ color: red;">MMMMMM
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/overflow-decoration-ref.html b/layout/reftests/text-shadow/overflow-decoration-ref.html
new file mode 100644
index 0000000000..a488585442
--- /dev/null
+++ b/layout/reftests/text-shadow/overflow-decoration-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ .outer {
+ text-decoration: underline;
+ position: absolute;
+ }
+ .outer+.outer {
+ color: green;
+ }
+ .inner {
+ vertical-align: 1em;
+ }
+ .outer+.outer>.inner {
+ position: relative;
+ top: 1em;
+ }
+</style>
+</head>
+<body>
+ <span class="outer"><span class="inner">x</span></span>
+ <span class="outer"><span class="inner">x</span></span>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/overflow-decoration.html b/layout/reftests/text-shadow/overflow-decoration.html
new file mode 100644
index 0000000000..e545adbe75
--- /dev/null
+++ b/layout/reftests/text-shadow/overflow-decoration.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<style>
+ .outer { text-decoration: underline; }
+ .inner {
+ vertical-align: 1em;
+ text-shadow: 0 1em green;
+ }
+ .reftest-wait .inner {
+ text-shadow: 0 1em red;
+ }
+</style>
+</head>
+<body>
+ <span class="outer"><span class="inner">x</span></span>
+ <script>
+ document.addEventListener("MozReftestInvalidate", () => {
+ document.documentElement.removeAttribute('class');
+ });
+ </script>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/overflow-not-scrollable-1-ref.html b/layout/reftests/text-shadow/overflow-not-scrollable-1-ref.html
new file mode 100644
index 0000000000..642d10181f
--- /dev/null
+++ b/layout/reftests/text-shadow/overflow-not-scrollable-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<style type="text/css">
+
+div {
+ height: 200px; width: 200px; overflow: hidden;
+ text-shadow: 210px 210px 2px gray;
+ font-size: 50px;
+}
+
+/* work around potential font overflow */
+span { margin-left: 5px }
+
+</style>
+<div>
+<span>text</span>
+</div>
diff --git a/layout/reftests/text-shadow/overflow-not-scrollable-1-ref2.html b/layout/reftests/text-shadow/overflow-not-scrollable-1-ref2.html
new file mode 100644
index 0000000000..4ed3a46ec2
--- /dev/null
+++ b/layout/reftests/text-shadow/overflow-not-scrollable-1-ref2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<style type="text/css">
+
+div {
+ height: 200px; width: 200px;
+ font-size: 50px;
+}
+
+/* work around potential font overflow */
+span { margin-left: 5px }
+
+</style>
+<div>
+<span>text</span>
+</div>
diff --git a/layout/reftests/text-shadow/overflow-not-scrollable-1.html b/layout/reftests/text-shadow/overflow-not-scrollable-1.html
new file mode 100644
index 0000000000..ea47d20718
--- /dev/null
+++ b/layout/reftests/text-shadow/overflow-not-scrollable-1.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<style type="text/css">
+
+div {
+ height: 200px; width: 200px; overflow: auto;
+ text-shadow: 210px 210px 2px gray;
+ font-size: 50px;
+}
+
+/* work around potential font overflow */
+span { margin-left: 5px }
+
+</style>
+<div>
+<span>text</span>
+</div>
diff --git a/layout/reftests/text-shadow/overflow-not-scrollable-2-ref.html b/layout/reftests/text-shadow/overflow-not-scrollable-2-ref.html
new file mode 100644
index 0000000000..4d0e7457f6
--- /dev/null
+++ b/layout/reftests/text-shadow/overflow-not-scrollable-2-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<style type="text/css">
+
+div {
+ height: 200px; width: 200px; overflow: hidden;
+ text-shadow: 100px 100px 30px black;
+ font-size: 50px;
+ font-weight: bold;
+}
+
+/* work around potential font overflow */
+span { margin-left: 5px }
+
+</style>
+<div>
+<span>text</span>
+</div>
diff --git a/layout/reftests/text-shadow/overflow-not-scrollable-2.html b/layout/reftests/text-shadow/overflow-not-scrollable-2.html
new file mode 100644
index 0000000000..6a1b4c9a95
--- /dev/null
+++ b/layout/reftests/text-shadow/overflow-not-scrollable-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<style type="text/css">
+
+div {
+ height: 200px; width: 200px; overflow: auto;
+ text-shadow: 100px 100px 30px black;
+ font-size: 50px;
+ font-weight: bold;
+}
+
+/* work around potential font overflow */
+span { margin-left: 5px }
+
+</style>
+<div>
+<span>text</span>
+</div>
diff --git a/layout/reftests/text-shadow/padding-decoration-ref.html b/layout/reftests/text-shadow/padding-decoration-ref.html
new file mode 100644
index 0000000000..1cc1f5ec4e
--- /dev/null
+++ b/layout/reftests/text-shadow/padding-decoration-ref.html
@@ -0,0 +1 @@
+<!DOCTYPE HTML><div><a href="http://test" style="margin-left: 20px; text-shadow: 2px 2px 2px blue;">Hello world hello world</a></div>
diff --git a/layout/reftests/text-shadow/padding-decoration.html b/layout/reftests/text-shadow/padding-decoration.html
new file mode 100644
index 0000000000..b504ede89c
--- /dev/null
+++ b/layout/reftests/text-shadow/padding-decoration.html
@@ -0,0 +1 @@
+<!DOCTYPE HTML><div><a href="http://test" style="padding-left: 20px; text-shadow: 2px 2px 2px blue;">Hello world hello world</a></div>
diff --git a/layout/reftests/text-shadow/quirks-decor-noblur-ref.html b/layout/reftests/text-shadow/quirks-decor-noblur-ref.html
new file mode 100644
index 0000000000..9644146226
--- /dev/null
+++ b/layout/reftests/text-shadow/quirks-decor-noblur-ref.html
@@ -0,0 +1,11 @@
+<style>
+div {
+text-decoration: underline;
+}
+</style>
+
+<div style="position: absolute; top: 33px; left: 33px; color: grey; z-index: 0;">Hello</div>
+<div style="position: absolute; top: 30px; left: 30px; color: green; z-index: 1;">Hello</div>
+<div style="position: absolute; top: 27px; left: 27px; color: red; z-index: 2;">Hello</div>
+<div style="position: absolute; top: 24px; left: 24px; color: purple; z-index: 3;">Hello</div>
+<div style="position: absolute; top: 20px; left: 20px; color: black; z-index: 4;">Hello</div>
diff --git a/layout/reftests/text-shadow/quirks-decor-noblur.html b/layout/reftests/text-shadow/quirks-decor-noblur.html
new file mode 100644
index 0000000000..31a244f38e
--- /dev/null
+++ b/layout/reftests/text-shadow/quirks-decor-noblur.html
@@ -0,0 +1 @@
+<div style="position: absolute; top: 20px; left: 20px; color: black; text-shadow: purple 4px 4px, red 7px 7px, green 10px 10px, grey 13px 13px; text-decoration: underline;">Hello</div>
diff --git a/layout/reftests/text-shadow/reftest.list b/layout/reftests/text-shadow/reftest.list
new file mode 100644
index 0000000000..dc4c602116
--- /dev/null
+++ b/layout/reftests/text-shadow/reftest.list
@@ -0,0 +1,41 @@
+== 723669.html 723669-ref.html
+
+== chrome://reftest/content/text-shadow/basic.xhtml chrome://reftest/content/text-shadow/basic-ref.xhtml
+random-if(Android) == chrome://reftest/content/text-shadow/basic-negcoord.xhtml chrome://reftest/content/text-shadow/basic-negcoord-ref.xhtml
+!= chrome://reftest/content/text-shadow/blur.xhtml chrome://reftest/content/text-shadow/blur-notref.xhtml
+== chrome://reftest/content/text-shadow/color-inherit.xhtml chrome://reftest/content/text-shadow/color-inherit-ref.xhtml
+== chrome://reftest/content/text-shadow/multiple-noblur.xhtml chrome://reftest/content/text-shadow/multiple-noblur-ref.xhtml
+fuzzy-if(webrender&&swgl,2-2,6320-6320) == blur-opacity.html blur-opacity-ref.html
+
+== basic.html basic-ref.html
+== basic-negcoord.html basic-negcoord-ref.html
+== basic-opacity.html basic-opacity-ref.html
+!= blur.html blur-notref.html
+== color-inherit.html color-inherit-ref.html
+== color-parserorder.html color-parserorder-ref.html
+== decorations-multiple-zorder.html decorations-multiple-zorder-ref.html
+== multiple-noblur.html multiple-noblur-ref.html
+== quirks-decor-noblur.html quirks-decor-noblur-ref.html
+== standards-decor-noblur.html standards-decor-noblur-ref.html
+== padding-decoration.html padding-decoration-ref.html
+== textindent.html textindent-ref.html
+== lineoverflow.html lineoverflow-ref.html
+
+== overflow-not-scrollable-1.html overflow-not-scrollable-1-ref.html
+== overflow-not-scrollable-1.html overflow-not-scrollable-1-ref2.html
+== overflow-not-scrollable-2.html overflow-not-scrollable-2-ref.html
+fuzzy-if(cocoaWidget,0-27,0-2) fuzzy-if(winWidget,0-47,0-2) == overflow-clip.html overflow-clip-ref.html
+
+needs-focus != text-shadow-selected-1.html text-shadow-selected-1-notref.html
+fails-if(Android) fuzzy-if(skiaContent&&!Android,0-1,0-1000) needs-focus == text-shadow-selected-1.html text-shadow-selected-1-ref.html # different foreground selection color on Android
+needs-focus != text-shadow-selected-2.html text-shadow-selected-2-notref.html
+fails-if(Android) fuzzy-if(skiaContent&&!Android,0-1,0-1400) needs-focus == text-shadow-selected-2.html text-shadow-selected-2-ref.html # different foreground selection color on Android
+
+# bug 692744
+fuzzy-if(webrender,0-19,0-2872) == text-shadow-on-space-1.html text-shadow-on-space-1-ref.html
+
+# bug 721750
+needs-focus == text-shadow-on-selection-1.html text-shadow-on-selection-1-ref.html
+needs-focus == text-shadow-on-selection-2.html text-shadow-on-selection-2-ref.html
+
+== overflow-decoration.html overflow-decoration-ref.html
diff --git a/layout/reftests/text-shadow/standards-decor-noblur-ref.html b/layout/reftests/text-shadow/standards-decor-noblur-ref.html
new file mode 100644
index 0000000000..8a962a41e9
--- /dev/null
+++ b/layout/reftests/text-shadow/standards-decor-noblur-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<style>
+.underlined {
+text-decoration: underline;
+}
+
+span {
+color: rgba(0, 0, 0, 0);
+}
+</style>
+
+<div class="underlined" style="position: absolute; top: 33px; left: 33px; color: grey; z-index: 0;">Hello</div>
+<div class="underlined" style="position: absolute; top: 30px; left: 30px; color: green; z-index: 1;">Hello</div>
+<div class="underlined" style="position: absolute; top: 27px; left: 27px; color: red; z-index: 2;">Hello</div>
+<div class="underlined" style="position: absolute; top: 24px; left: 24px; color: purple; z-index: 3;">Hello</div>
+<div class="underlined" style="position: absolute; top: 20px; left: 20px; color: black; z-index: 4;">Hello</div>
diff --git a/layout/reftests/text-shadow/standards-decor-noblur.html b/layout/reftests/text-shadow/standards-decor-noblur.html
new file mode 100644
index 0000000000..8b5c3a1b3c
--- /dev/null
+++ b/layout/reftests/text-shadow/standards-decor-noblur.html
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+
+<!-- Shadows are painted below text AND its decorations -->
+<div style="position: absolute; top: 20px; left: 20px; color: black; text-shadow: purple 4px 4px, red 7px 7px, green 10px 10px, grey 13px 13px; text-decoration: underline;">Hello</div>
diff --git a/layout/reftests/text-shadow/text-shadow-on-selection-1-ref.html b/layout/reftests/text-shadow/text-shadow-on-selection-1-ref.html
new file mode 100644
index 0000000000..ece0e6de0f
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-on-selection-1-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+body {
+ background: white;
+ color: black;
+ font-size: 24px;
+}
+div {
+ background: white;
+ color: blue;
+ text-shadow: red 2px 2px 0px;
+}
+span {
+ background: yellow;
+ color: white;
+}
+</style>
+</head>
+<body>
+<div>
+hello <span>selected</span> world
+</div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/text-shadow-on-selection-1.html b/layout/reftests/text-shadow/text-shadow-on-selection-1.html
new file mode 100644
index 0000000000..a0c29c321b
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-on-selection-1.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+function onload() {
+ var range = document.createRange();
+ range.selectNodeContents(document.getElementById("selectMe"));
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+ window.focus();
+}
+function disableReftestWait() {
+ document.documentElement.className = '';
+}
+</script>
+<style type="text/css">
+body {
+ background: white;
+ font-size: 24px;
+}
+div {
+ color: blue;
+ text-shadow: red 2px 2px 0px;
+}
+::-moz-selection {
+ background: yellow;
+ color: white;
+}
+::selection {
+ background: yellow;
+ color: white;
+}
+</style>
+</head>
+<body onload="onload()" onfocus="disableReftestWait()">
+<div>
+hello <span id="selectMe">selected</span> world
+</div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/text-shadow-on-selection-2-ref.html b/layout/reftests/text-shadow/text-shadow-on-selection-2-ref.html
new file mode 100644
index 0000000000..09d9e4063a
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-on-selection-2-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+body {
+ background: white;
+ color: black;
+ font-size: 24px;
+}
+div {
+ background: white;
+ color: blue;
+ text-shadow: red 2px 2px 0px;
+}
+span {
+ background: yellow;
+ color: white;
+ text-shadow: none;
+}
+</style>
+</head>
+<body>
+<div>
+hello <span>selected</span> world
+</div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/text-shadow-on-selection-2.html b/layout/reftests/text-shadow/text-shadow-on-selection-2.html
new file mode 100644
index 0000000000..1791f1b9fb
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-on-selection-2.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script type="text/javascript">
+function onload() {
+ var range = document.createRange();
+ range.selectNodeContents(document.getElementById("selectMe"));
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+ window.focus();
+}
+function disableReftestWait() {
+ document.documentElement.className = '';
+}
+</script>
+<style type="text/css">
+body {
+ background: white;
+ font-size: 24px;
+}
+div {
+ color: blue;
+ text-shadow: red 2px 2px 0px;
+}
+::-moz-selection {
+ background: yellow;
+ color: white;
+ text-shadow: none;
+}
+::selection {
+ background: yellow;
+ color: white;
+ text-shadow: none;
+}
+</style>
+</head>
+<body onload="onload()" onfocus="disableReftestWait()">
+<div>
+hello <span id="selectMe">selected</span> world
+</div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/text-shadow-on-space-1-ref.html b/layout/reftests/text-shadow/text-shadow-on-space-1-ref.html
new file mode 100644
index 0000000000..447a49f094
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-on-space-1-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ font: 24px serif;
+ text-shadow: 2px 2px 1px red;
+}
+</style>
+</head>
+<body>
+<div>
+The spaces should not have shadows!
+</div>
+</body>
+
diff --git a/layout/reftests/text-shadow/text-shadow-on-space-1.html b/layout/reftests/text-shadow/text-shadow-on-space-1.html
new file mode 100644
index 0000000000..7433dad35e
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-on-space-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ font: 24px serif;
+ text-shadow: 2px 2px 1px red;
+}
+</style>
+</head>
+<body>
+<div>
+The spaces should not have shadows!
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+</body>
+
diff --git a/layout/reftests/text-shadow/text-shadow-selected-1-notref.html b/layout/reftests/text-shadow/text-shadow-selected-1-notref.html
new file mode 100644
index 0000000000..4ecfb69fd8
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-selected-1-notref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function onload() {
+ window.focus();
+ var range = document.createRange();
+ range.selectNodeContents(document.getElementById("selectMe"));
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+}
+</script>
+<style type="text/css">
+body {
+ background: lightGray;
+}
+div {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ font: 36px monospace;
+ color: white;
+}
+</style>
+</head>
+<!-- NOTREF case has selected text but the shadow is missing -->
+<body onload="onload()">
+<div id="selectMe">selected shadowed text</div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/text-shadow-selected-1-ref.html b/layout/reftests/text-shadow/text-shadow-selected-1-ref.html
new file mode 100644
index 0000000000..e0fdcd82d9
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-selected-1-ref.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function onload() {
+ window.focus();
+ var range = document.createRange();
+ range.selectNodeContents(document.getElementById("selectMe"));
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+}
+</script>
+<style type="text/css">
+body {
+ background: lightGray;
+}
+div {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ font: 36px monospace;
+ color: white;
+}
+</style>
+</head>
+<!-- REF case renders the selection first, using &nbsp; to avoid any show-through of glyph edges,
+ then the shadowed text on top of that -->
+<body onload="onload()">
+<div id="selectMe">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+<div style="text-shadow:1px 1px 1px red;">selected shadowed text</div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/text-shadow-selected-1.html b/layout/reftests/text-shadow/text-shadow-selected-1.html
new file mode 100644
index 0000000000..669aee9766
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-selected-1.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function onload() {
+ window.focus();
+ var range = document.createRange();
+ range.selectNodeContents(document.getElementById("selectMe"));
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+}
+</script>
+<style type="text/css">
+body {
+ background: lightGray;
+}
+div {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ font: 36px monospace;
+ color: white;
+}
+</style>
+</head>
+<!-- test for bug 692752 - paint text shadow on top of selection highlight -->
+<body onload="onload()">
+<div style="text-shadow:1px 1px 1px red;" id="selectMe">selected shadowed text</div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/text-shadow-selected-2-notref.html b/layout/reftests/text-shadow/text-shadow-selected-2-notref.html
new file mode 100644
index 0000000000..a74a11fe50
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-selected-2-notref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function onload() {
+ window.focus();
+ var range = document.createRange();
+ range.selectNodeContents(document.getElementById("selectMe"));
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+}
+</script>
+<style type="text/css">
+body {
+ background: lightGray;
+}
+div {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ font: 36px monospace;
+ color: white;
+}
+</style>
+</head>
+<!-- NOTREF case has selected text but the shadow is missing -->
+<body onload="onload()">
+<div id="selectMe"><bdo dir="rtl">selected shadowed rtl text</bdo></div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/text-shadow-selected-2-ref.html b/layout/reftests/text-shadow/text-shadow-selected-2-ref.html
new file mode 100644
index 0000000000..3af90e9bfb
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-selected-2-ref.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function onload() {
+ window.focus();
+ var range = document.createRange();
+ range.selectNodeContents(document.getElementById("selectMe"));
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+}
+</script>
+<style type="text/css">
+body {
+ background: lightGray;
+}
+div {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ font: 36px monospace;
+ color: white;
+}
+</style>
+</head>
+<!-- REF case renders the selection first, using &nbsp; to avoid any show-through of glyph edges,
+ then the shadowed text on top of that -->
+<body onload="onload()">
+<div id="selectMe">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+<div style="text-shadow:1px 1px 1px red;"><bdo dir="rtl">selected shadowed rtl text</bdo></div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/text-shadow-selected-2.html b/layout/reftests/text-shadow/text-shadow-selected-2.html
new file mode 100644
index 0000000000..d11b528b0b
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-selected-2.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function onload() {
+ window.focus();
+ var range = document.createRange();
+ range.selectNodeContents(document.getElementById("selectMe"));
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(range);
+}
+</script>
+<style type="text/css">
+body {
+ background: lightGray;
+}
+div {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ font: 36px monospace;
+ color: white;
+}
+</style>
+</head>
+<!-- test for bug 692752 - paint text shadow on top of selection highlight -->
+<body onload="onload()">
+<div style="text-shadow:1px 1px 1px red;" id="selectMe"><bdo dir="rtl">selected shadowed rtl text</bdo></div>
+</body>
+</html>
diff --git a/layout/reftests/text-shadow/textindent-ref.html b/layout/reftests/text-shadow/textindent-ref.html
new file mode 100644
index 0000000000..c3e3315e9b
--- /dev/null
+++ b/layout/reftests/text-shadow/textindent-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+
+<div style="position:absolute; top: 20px; left: 60px; text-decoration: underline; text-shadow: 5px 5px 3px blue; font-size: 40px;">M</div>
diff --git a/layout/reftests/text-shadow/textindent.html b/layout/reftests/text-shadow/textindent.html
new file mode 100644
index 0000000000..e66cdd88ea
--- /dev/null
+++ b/layout/reftests/text-shadow/textindent.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+
+<div style="position:absolute; top: 20px; left: 120px; text-indent: -60px; text-decoration: underline; text-shadow: 5px 5px 3px blue; font-size: 40px;">M</div>