summaryrefslogtreecommitdiffstats
path: root/layout/reftests/forms/textarea
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--layout/reftests/forms/textarea/appearance-background-change-ref.html8
-rw-r--r--layout/reftests/forms/textarea/appearance-background-change.html11
-rw-r--r--layout/reftests/forms/textarea/in-dynamic-rtl-doc.html18
-rw-r--r--layout/reftests/forms/textarea/in-ltr-doc-scrollbar.html10
-rw-r--r--layout/reftests/forms/textarea/in-rtl-doc-scrollbar.html10
-rw-r--r--layout/reftests/forms/textarea/ltr-scrollbar.html10
-rw-r--r--layout/reftests/forms/textarea/ltr.html10
-rw-r--r--layout/reftests/forms/textarea/no-resize.html10
-rw-r--r--layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html43
-rw-r--r--layout/reftests/forms/textarea/padding-scrollbar-placement.html44
-rw-r--r--layout/reftests/forms/textarea/padding-text-overflow-notref.html12
-rw-r--r--layout/reftests/forms/textarea/padding-text-overflow.html13
-rw-r--r--layout/reftests/forms/textarea/reftest.list18
-rw-r--r--layout/reftests/forms/textarea/resize-background-ref.html30
-rw-r--r--layout/reftests/forms/textarea/resize-background.html3
-rw-r--r--layout/reftests/forms/textarea/resize-ref.html3
-rw-r--r--layout/reftests/forms/textarea/resize-rtl-ref.html3
-rw-r--r--layout/reftests/forms/textarea/resize-rtl-vertical.html3
-rw-r--r--layout/reftests/forms/textarea/resize-rtl.html3
-rw-r--r--layout/reftests/forms/textarea/resize-vertical.html3
-rw-r--r--layout/reftests/forms/textarea/resize.html3
-rw-r--r--layout/reftests/forms/textarea/rtl-dynamic-attr.html18
-rw-r--r--layout/reftests/forms/textarea/rtl-dynamic-style.html18
-rw-r--r--layout/reftests/forms/textarea/rtl-scrollbar.html10
-rw-r--r--layout/reftests/forms/textarea/rtl.html10
-rw-r--r--layout/reftests/forms/textarea/various-cols-ref.html4
-rw-r--r--layout/reftests/forms/textarea/various-cols.html4
27 files changed, 332 insertions, 0 deletions
diff --git a/layout/reftests/forms/textarea/appearance-background-change-ref.html b/layout/reftests/forms/textarea/appearance-background-change-ref.html
new file mode 100644
index 0000000000..df5585213e
--- /dev/null
+++ b/layout/reftests/forms/textarea/appearance-background-change-ref.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<style>
+ textarea, input {
+ background: transparent;
+ }
+</style>
+<textarea>FOO BAR</textarea><br>
+<input value="FOO BAR">
diff --git a/layout/reftests/forms/textarea/appearance-background-change.html b/layout/reftests/forms/textarea/appearance-background-change.html
new file mode 100644
index 0000000000..d1c7730513
--- /dev/null
+++ b/layout/reftests/forms/textarea/appearance-background-change.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<textarea>FOO BAR</textarea><br>
+<input value="FOO BAR">
+<script>
+onload = function() {
+ for (let e of document.querySelectorAll("input, textarea")) {
+ e.getBoundingClientRect().top;
+ e.style.background = "transparent";
+ }
+}
+</script>
diff --git a/layout/reftests/forms/textarea/in-dynamic-rtl-doc.html b/layout/reftests/forms/textarea/in-dynamic-rtl-doc.html
new file mode 100644
index 0000000000..c8afa20cf2
--- /dev/null
+++ b/layout/reftests/forms/textarea/in-dynamic-rtl-doc.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body style="text-align: left">
+ <textarea cols=20 rows=4></textarea>
+ <script>
+ onload = function() {
+ setTimeout(function() {
+ document.dir = "rtl";
+ document.documentElement.removeAttribute("class");
+ });
+ };
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/in-ltr-doc-scrollbar.html b/layout/reftests/forms/textarea/in-ltr-doc-scrollbar.html
new file mode 100644
index 0000000000..e6b14358ec
--- /dev/null
+++ b/layout/reftests/forms/textarea/in-ltr-doc-scrollbar.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html dir="ltr">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4 style="overflow: scroll; resize: none"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/in-rtl-doc-scrollbar.html b/layout/reftests/forms/textarea/in-rtl-doc-scrollbar.html
new file mode 100644
index 0000000000..8c915b5ee9
--- /dev/null
+++ b/layout/reftests/forms/textarea/in-rtl-doc-scrollbar.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html dir="rtl">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4 style="float: left; overflow: scroll; resize: none"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/ltr-scrollbar.html b/layout/reftests/forms/textarea/ltr-scrollbar.html
new file mode 100644
index 0000000000..927fbede66
--- /dev/null
+++ b/layout/reftests/forms/textarea/ltr-scrollbar.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea dir="ltr" cols=20 rows=4 style="overflow: scroll; resize: none"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/ltr.html b/layout/reftests/forms/textarea/ltr.html
new file mode 100644
index 0000000000..c7e84be0e2
--- /dev/null
+++ b/layout/reftests/forms/textarea/ltr.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/no-resize.html b/layout/reftests/forms/textarea/no-resize.html
new file mode 100644
index 0000000000..fbf8796532
--- /dev/null
+++ b/layout/reftests/forms/textarea/no-resize.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4 style="resize: none"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html b/layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html
new file mode 100644
index 0000000000..40a639eb94
--- /dev/null
+++ b/layout/reftests/forms/textarea/padding-scrollbar-placement-ref.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>Padding and Scrollbar Placement Test Reference</title>
+ <style>input, textarea { border-radius:0; background:none; border:none; }</style>
+ <style type="text/css">
+ #t {
+ display: block;
+ position: absolute;
+ left: 50px;
+ top: 50px;
+ padding: 50px;
+ width: 300px;
+ height: 100px;
+ border: 5px solid red;
+ margin: 10px;
+ overflow: scroll;
+ font-family: verdana;
+ white-space: pre-wrap;
+ z-index: 0; /* force a stacking context */
+ }
+ #cover {
+ position: absolute;
+ left: 400px;
+ top: 50px;
+ width: 100px;
+ height: 300px;
+ background: black;
+ }
+ </style>
+ </head>
+ <body>
+ <script>
+ var ss = [];
+ for (var i = 0; i < 1000; ++i) {
+ ss.push(i);
+ }
+ document.write("<div id='t'>" + ss.join(" ") + "</div>");
+ </script>
+ <div id="cover"></div>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/padding-scrollbar-placement.html b/layout/reftests/forms/textarea/padding-scrollbar-placement.html
new file mode 100644
index 0000000000..e1b0d7d672
--- /dev/null
+++ b/layout/reftests/forms/textarea/padding-scrollbar-placement.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>Padding and Scrollbar Placement Test</title>
+ <style>input, textarea { border-radius:0; background:none; border:none; }</style>
+ <style type="text/css">
+ #t {
+ display: block;
+ position: absolute;
+ left: 50px;
+ top: 50px;
+ padding: 50px;
+ width: 300px;
+ height: 100px;
+ border: 5px solid red;
+ margin: 10px;
+ overflow: scroll;
+ font-family: verdana;
+ resize: none;
+ color: black;
+ z-index: 0; /* force a stacking context */
+ }
+ #cover {
+ position: absolute;
+ left: 400px;
+ top: 50px;
+ width: 100px;
+ height: 300px;
+ background: black;
+ }
+ </style>
+ </head>
+ <body>
+ <script>
+ var ss = [];
+ for (var i = 0; i < 1000; ++i) {
+ ss.push(i);
+ }
+ document.write("<textarea id='t'>" + ss.join(" ") + "</textarea>");
+ </script>
+ <div id="cover"></div>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/padding-text-overflow-notref.html b/layout/reftests/forms/textarea/padding-text-overflow-notref.html
new file mode 100644
index 0000000000..78edebcad7
--- /dev/null
+++ b/layout/reftests/forms/textarea/padding-text-overflow-notref.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<style>
+ textarea {
+ width: 100px;
+ height: 100px;
+ box-sizing: border-box;
+ padding: 50px 0px;
+ overflow: hidden;
+ resize: none;
+ }
+</style>
+<textarea></textarea>
diff --git a/layout/reftests/forms/textarea/padding-text-overflow.html b/layout/reftests/forms/textarea/padding-text-overflow.html
new file mode 100644
index 0000000000..92cc4f38ec
--- /dev/null
+++ b/layout/reftests/forms/textarea/padding-text-overflow.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<style>
+ textarea {
+ width: 100px;
+ height: 100px;
+ box-sizing: border-box;
+ padding: 50px 0px;
+ overflow: hidden;
+ resize: none;
+ }
+</style>
+<!-- Text should be visible -->
+<textarea>Foo</textarea>
diff --git a/layout/reftests/forms/textarea/reftest.list b/layout/reftests/forms/textarea/reftest.list
new file mode 100644
index 0000000000..f27e99726e
--- /dev/null
+++ b/layout/reftests/forms/textarea/reftest.list
@@ -0,0 +1,18 @@
+== resize.html resize-ref.html
+== resize-vertical.html resize-ref.html
+== resize-rtl.html resize-rtl-ref.html
+== resize-rtl-vertical.html resize-rtl-ref.html
+# an offset seems to apply to the native resizer on windows so skip this test for now
+skip-if(Android) skip-if(winWidget) fuzzy-if(cocoaWidget,0-1,0-33) fuzzy-if(!winWidget&&!Android,0-5,0-10) == resize-background.html resize-background-ref.html
+skip-if(Android) != ltr.html rtl.html
+skip-if(Android) != ltr-scrollbar.html rtl-scrollbar.html
+skip-if(Android) != in-ltr-doc-scrollbar.html in-rtl-doc-scrollbar.html
+skip-if(Android) != ltr.html no-resize.html
+skip-if(Android) != rtl.html no-resize.html # bug 834724
+fuzzy(0-1,0-1) == rtl.html rtl-dynamic-attr.html
+fuzzy(0-1,0-1) == rtl.html rtl-dynamic-style.html
+== rtl.html in-dynamic-rtl-doc.html
+fuzzy-if(asyncPan&&!layersGPUAccelerated,0-102,0-4168) == padding-scrollbar-placement.html padding-scrollbar-placement-ref.html
+== various-cols.html various-cols-ref.html
+== appearance-background-change.html appearance-background-change-ref.html
+!= padding-text-overflow.html padding-text-overflow-notref.html
diff --git a/layout/reftests/forms/textarea/resize-background-ref.html b/layout/reftests/forms/textarea/resize-background-ref.html
new file mode 100644
index 0000000000..9217ffaf86
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize-background-ref.html
@@ -0,0 +1,30 @@
+<html>
+<script>
+function sizeResizer() {
+ // reference resizer
+ var img = document.getElementsByTagName("img")[0];
+ // hidden textarea
+ var textarea = document.getElementsByTagName("textarea")[0];
+ var width = 200 - textarea.clientWidth;
+ var height = 200 - textarea.clientHeight;
+ // (Leave test failing if a scrollbar is missing)
+ if (width != 0 && height != 0) {
+ img.style.width = width + "px";
+ img.style.left = textarea.clientWidth + "px";
+ img.style.height = height + "px";
+ img.style.top = textarea.clientHeight + "px";
+ }
+}
+</script>
+<body onload="sizeResizer()">
+<textarea style="width: 200px; height: 200px; margin: 0; border: none;
+ background: red; font-size: 400px;">
+M
+</textarea>
+<div style="position: relative; top: -200px;
+ width: 200px; height: 200px; margin: 0; border: none;
+ background: lightgreen">
+ <img style="position: relative;" src="chrome://global/skin/icons/resizer.svg">
+</div>
+</body>
+</html>
diff --git a/layout/reftests/forms/textarea/resize-background.html b/layout/reftests/forms/textarea/resize-background.html
new file mode 100644
index 0000000000..24c6f70d89
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize-background.html
@@ -0,0 +1,3 @@
+<html><body>
+<textarea style="width: 200px; height: 200px; margin: 0; background: lightgreen; border: none;"></textarea>
+</body></html>
diff --git a/layout/reftests/forms/textarea/resize-ref.html b/layout/reftests/forms/textarea/resize-ref.html
new file mode 100644
index 0000000000..5d3334889d
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize-ref.html
@@ -0,0 +1,3 @@
+<html><body>
+<div style="overflow: auto; resize: both; background: white; -moz-appearance: none; border: 0; padding: 0; margin: 0; width: 100px; height: 100px;"></div>
+</body></html>
diff --git a/layout/reftests/forms/textarea/resize-rtl-ref.html b/layout/reftests/forms/textarea/resize-rtl-ref.html
new file mode 100644
index 0000000000..9ae0ac14fe
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize-rtl-ref.html
@@ -0,0 +1,3 @@
+<html><body>
+<div style="transform: scaleX(-1); overflow: auto; resize: both; background: white; -moz-appearance: none; border: 0; padding: 0; margin: 0; width: 100px; height: 100px;"></div>
+</body></html>
diff --git a/layout/reftests/forms/textarea/resize-rtl-vertical.html b/layout/reftests/forms/textarea/resize-rtl-vertical.html
new file mode 100644
index 0000000000..602ca9b399
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize-rtl-vertical.html
@@ -0,0 +1,3 @@
+<html><body>
+<textarea dir="rtl" style="resize: vertical; -moz-appearance: none; background: white; border: 0; padding: 0; margin: 0; width: 100px; height: 100px;" resizable="false" multiline="true" width="100" height="100"></textarea>
+</body></html>
diff --git a/layout/reftests/forms/textarea/resize-rtl.html b/layout/reftests/forms/textarea/resize-rtl.html
new file mode 100644
index 0000000000..c91acad3ce
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize-rtl.html
@@ -0,0 +1,3 @@
+<html><body>
+<textarea dir="rtl" style="-moz-appearance: none; background: white; border: 0; padding: 0; margin: 0; width: 100px; height: 100px;" resizable="false" multiline="true" width="100" height="100"></textarea>
+</body></html>
diff --git a/layout/reftests/forms/textarea/resize-vertical.html b/layout/reftests/forms/textarea/resize-vertical.html
new file mode 100644
index 0000000000..57a245449f
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize-vertical.html
@@ -0,0 +1,3 @@
+<html><body>
+<textarea style="resize: vertical; -moz-appearance: none; background: white; border: 0; padding: 0; margin: 0; width: 100px; height: 100px;" resizable="false" multiline="true" width="100" height="100"></textarea>
+</body></html>
diff --git a/layout/reftests/forms/textarea/resize.html b/layout/reftests/forms/textarea/resize.html
new file mode 100644
index 0000000000..f513b4634f
--- /dev/null
+++ b/layout/reftests/forms/textarea/resize.html
@@ -0,0 +1,3 @@
+<html><body>
+<textarea style="-moz-appearance: none; background: white; border: 0; padding: 0; margin: 0; width: 100px; height: 100px;" resizable="false" multiline="true" width="100" height="100"></textarea>
+</body></html>
diff --git a/layout/reftests/forms/textarea/rtl-dynamic-attr.html b/layout/reftests/forms/textarea/rtl-dynamic-attr.html
new file mode 100644
index 0000000000..47f97baa7b
--- /dev/null
+++ b/layout/reftests/forms/textarea/rtl-dynamic-attr.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4></textarea>
+ <script>
+ onload = function() {
+ setTimeout(function() {
+ document.querySelector("textarea").setAttribute("dir", "rtl");
+ document.documentElement.removeAttribute("class");
+ });
+ };
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/rtl-dynamic-style.html b/layout/reftests/forms/textarea/rtl-dynamic-style.html
new file mode 100644
index 0000000000..8997e31c05
--- /dev/null
+++ b/layout/reftests/forms/textarea/rtl-dynamic-style.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea cols=20 rows=4></textarea>
+ <script>
+ onload = function() {
+ setTimeout(function() {
+ document.querySelector("textarea").style.direction = "rtl";
+ document.documentElement.removeAttribute("class");
+ });
+ };
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/rtl-scrollbar.html b/layout/reftests/forms/textarea/rtl-scrollbar.html
new file mode 100644
index 0000000000..2770dc6941
--- /dev/null
+++ b/layout/reftests/forms/textarea/rtl-scrollbar.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea dir="rtl" cols=20 rows=4 style="overflow: scroll; resize: none"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/rtl.html b/layout/reftests/forms/textarea/rtl.html
new file mode 100644
index 0000000000..984f9d9aa9
--- /dev/null
+++ b/layout/reftests/forms/textarea/rtl.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title></title>
+ </head>
+ <body>
+ <textarea dir="rtl" cols=20 rows=4></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/forms/textarea/various-cols-ref.html b/layout/reftests/forms/textarea/various-cols-ref.html
new file mode 100644
index 0000000000..7ba962e61d
--- /dev/null
+++ b/layout/reftests/forms/textarea/various-cols-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<textarea cols="20"></textarea><br>
+<textarea cols="20"></textarea><br>
+<textarea cols="20"></textarea>
diff --git a/layout/reftests/forms/textarea/various-cols.html b/layout/reftests/forms/textarea/various-cols.html
new file mode 100644
index 0000000000..dc62941d8f
--- /dev/null
+++ b/layout/reftests/forms/textarea/various-cols.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<textarea></textarea><br>
+<textarea cols="0"></textarea><br>
+<textarea cols="-1"></textarea>