bug 1269845 - text selection reftest;
MozReview-Commit-ID: 4iZQ1iqFlrR
--- a/layout/reftests/backgrounds/background-clip-text-1a.html
+++ b/layout/reftests/backgrounds/background-clip-text-1a.html
@@ -2,18 +2,19 @@
<html>
<head>
<title>background-clip: text</title>
<style>
div.out {
width: 500px;
height: 300px;
margin: 0px;
- background-image: linear-gradient(green, green);
- background-clip: text;
+ background: linear-gradient(green, green) repeat scroll 0% 0% padding-box text, none repeat padding-box ;
+
+/*url("http://webkit.org/images/green-background.png") repeat scroll 0% 0% padding-box text, rgb(152, 90, 11) none repeat scroll 0% 0% padding-box content-box*/
color: transparent;
font-size: 100px;
font-family: serif;
}
</style>
</head>
<body style="margin: 0px;">
<div class="out">
new file mode 100644
--- /dev/null
+++ b/layout/reftests/backgrounds/background-clip-text-2-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <title>background-clip: text reference</title>
+ </head>
+ <body style="margin: 0px;">
+ <div style="width: 500px; height: 300px;">
+ <svg xmlns="http://www.w3.org/2000/svg" width="500px" height="300px">
+ <defs>
+ <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%">
+ <stop offset="0%" style="stop-color:white;stop-opacity:1" />
+ <stop offset="100%" style="stop-color:white;stop-opacity:1" />
+ </linearGradient>
+ </defs>
+ <text id="text1" x="0" y="200" font-size="100px" fill="url(#grad1)" font-family="serif">TEXT clip</text>
+ </svg>
+ </div>
+ <script type="text/javascript">
+ function doTest() {
+ var text1 = document.getElementById("text1");
+ var range = document.createRange();
+ range.selectNode(text1);
+ window.getSelection().removeAllRanges();
+ window.getSelection().addRange(range);
+ document.documentElement.classList.remove('reftest-wait');
+ }
+
+ window.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </body>
+</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/layout/reftests/backgrounds/background-clip-text-2.html
@@ -0,0 +1,36 @@
+<!doctype HTML>
+<html class="reftest-wait">
+ <head>
+ <title>background-clip: text</title>
+ <style>
+ div.out {
+ width: 500px;
+ height: 300px;
+ margin: 0px;
+ background-image: linear-gradient(white, white);
+ background-clip: text;
+ color: transparent;
+ font-size: 100px;
+ font-family: serif;
+ }
+ </style>
+ </head>
+ <body style="margin: 0px;">
+ <div class="out">
+ <p id="text1" style="display:inline-block;">TEXT clip</p>
+ <div style="display:inline-block; width:0px; height:200px;"/>
+ </div>
+ <script type="text/javascript">
+ function doTest() {
+ var text1 = document.getElementById("text1");
+ var range = document.createRange();
+ range.selectNode(text1);
+ window.getSelection().removeAllRanges();
+ window.getSelection().addRange(range);
+ document.documentElement.classList.remove('reftest-wait');
+ }
+
+ window.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </body>
+</html>
--- a/layout/reftests/backgrounds/reftest.list
+++ b/layout/reftests/backgrounds/reftest.list
@@ -179,9 +179,10 @@ fuzzy(30,474) fuzzy-if(skiaContent,31,47
pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,1,44) == background-clip-text-1a.html background-clip-text-1-ref.html
pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,1,44) == background-clip-text-1b.html background-clip-text-1-ref.html
pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,1,44) == background-clip-text-1c.html background-clip-text-1-ref.html
pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,1,44) == background-clip-text-1d.html background-clip-text-1-ref.html
pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,1,44) == background-clip-text-1e.html background-clip-text-1-ref.html
pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,1,44) == background-clip-text-1f.html background-clip-text-1-ref.html
pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,1,44) == background-clip-text-1g.html background-clip-text-1-ref.html
+pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,1,44) == background-clip-text-2.html background-clip-text-2-ref.html
pref(layout.css.background-clip-text.enabled,false) != background-clip-text-1a.html background-clip-text-1-ref.html