Bug 1354478 - Reftests for caret drawing in text that is reversed relative to the element's inline direction. r=dholbert

This commit is contained in:
Jonathan Kew 2017-04-12 11:32:19 +01:00
Родитель dca4d0e0df
Коммит 8cc01ae9d3
14 изменённых файлов: 462 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,35 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea onfocus="done()">aa</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,35 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea dir="rtl" onfocus="done()">aa</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,35 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea onfocus="done()">دد</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,35 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea dir="rtl" onfocus="done()">دد</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,38 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
body {
writing-mode: sideways-rl;
}
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea onfocus="done()">aa</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,38 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
body {
writing-mode: sideways-rl;
}
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea dir="rtl" onfocus="done()">aa</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,38 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
body {
writing-mode: sideways-rl;
}
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea onfocus="done()">دد</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,38 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
body {
writing-mode: sideways-rl;
}
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea dir="rtl" onfocus="done()">دد</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,38 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
body {
writing-mode: sideways-lr;
}
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea onfocus="done()">aa</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,38 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
body {
writing-mode: sideways-lr;
}
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea dir="rtl" onfocus="done()">aa</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,38 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
body {
writing-mode: sideways-lr;
}
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea onfocus="done()">دد</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,38 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<style>
body {
writing-mode: sideways-lr;
}
textarea {
inline-size: 200px;
-moz-appearance: none;
appearance: none;
unicode-bidi: plaintext;
}
div {
inline-size: 200px;
block-size: 20px;
position: relative;
offset-block-start: -20px;
background: silver;
}
</style>
<script>
function start() {
var textarea = document.querySelector("textarea");
textarea.selectionStart = 1; // place caret between the letters
textarea.selectionEnd = 1;
textarea.focus();
}
function done() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="start()">
<textarea dir="rtl" onfocus="done()">دد</textarea>
<div></div>
</body>
</html>

Просмотреть файл

@ -267,6 +267,18 @@ support-files =
bug1263357-4-ref.html
bug1263357-5.html
bug1263357-5-ref.html
bug1354478-1.html
bug1354478-1-ref.html
bug1354478-2.html
bug1354478-2-ref.html
bug1354478-3.html
bug1354478-3-ref.html
bug1354478-4.html
bug1354478-4-ref.html
bug1354478-5.html
bug1354478-5-ref.html
bug1354478-6.html
bug1354478-6-ref.html
image_rgrg-256x256.png
input-invalid-ref.html
input-maxlength-invalid-change.html

Просмотреть файл

@ -186,6 +186,12 @@ var tests = [
[ 'bug1263357-3.html' , 'bug1263357-3-ref.html'] ,
[ 'bug1263357-4.html' , 'bug1263357-4-ref.html'] ,
[ 'bug1263357-5.html' , 'bug1263357-5-ref.html'] ,
[ 'bug1354478-1.html' , 'bug1354478-1-ref.html'] ,
[ 'bug1354478-2.html' , 'bug1354478-2-ref.html'] ,
[ 'bug1354478-3.html' , 'bug1354478-3-ref.html'] ,
[ 'bug1354478-4.html' , 'bug1354478-4-ref.html'] ,
[ 'bug1354478-5.html' , 'bug1354478-5-ref.html'] ,
[ 'bug1354478-6.html' , 'bug1354478-6-ref.html'] ,
function() {SpecialPowers.pushPrefEnv({'clear': [['layout.accessiblecaret.enabled']]}, nextTest);} ,
];