summaryrefslogtreecommitdiffstats
path: root/layout/reftests/text-shadow
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /layout/reftests/text-shadow
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/text-shadow')
-rw-r--r--layout/reftests/text-shadow/basic-negcoord-ref.xhtml6
-rw-r--r--layout/reftests/text-shadow/basic-negcoord.xhtml5
-rw-r--r--layout/reftests/text-shadow/basic-ref.xhtml6
-rw-r--r--layout/reftests/text-shadow/basic.xhtml5
-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.xhtml3
-rw-r--r--layout/reftests/text-shadow/color-inherit-ref.xhtml6
-rw-r--r--layout/reftests/text-shadow/color-inherit.xhtml5
-rw-r--r--layout/reftests/text-shadow/multiple-noblur-ref.xhtml9
-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/reftest.list22
-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
29 files changed, 528 insertions, 0 deletions
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.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-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.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.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.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.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.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/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.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/reftest.list b/layout/reftests/text-shadow/reftest.list
new file mode 100644
index 0000000000..c5b0a70004
--- /dev/null
+++ b/layout/reftests/text-shadow/reftest.list
@@ -0,0 +1,22 @@
+== 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(0-2,0-6400) random-if(useDrawSnapshot) == blur-opacity.html blur-opacity-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
+fuzzy(0-1,0-1000) needs-focus == text-shadow-selected-1.html text-shadow-selected-1-ref.html
+needs-focus != text-shadow-selected-2.html text-shadow-selected-2-notref.html
+fuzzy(0-1,0-1400) needs-focus == text-shadow-selected-2.html text-shadow-selected-2-ref.html
+
+# bug 692744
+fuzzy(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/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>