gecko-dev/layout/reftests/forms/textarea/resize-background-ref.html
Rick Eyre 2c10b02564 Bug 785821 - Move textarea reftests in layout/reftests/forms to their own directory r=lahabana,mounir
--HG--
rename : layout/reftests/forms/textarea-in-dynamic-rtl-doc.html => layout/reftests/forms/textarea/in-dynamic-rtl-doc.html
rename : layout/reftests/forms/textarea-in-ltr-doc-scrollbar.html => layout/reftests/forms/textarea/in-ltr-doc-scrollbar.html
rename : layout/reftests/forms/textarea-in-rtl-doc-scrollbar.html => layout/reftests/forms/textarea/in-rtl-doc-scrollbar.html
rename : layout/reftests/forms/textarea-ltr-scrollbar.html => layout/reftests/forms/textarea/ltr-scrollbar.html
rename : layout/reftests/forms/textarea-ltr.html => layout/reftests/forms/textarea/ltr.html
rename : layout/reftests/forms/textarea-no-resize.html => layout/reftests/forms/textarea/no-resize.html
rename : layout/reftests/forms/textarea-resize-background-ref.html => layout/reftests/forms/textarea/resize-background-ref.html
rename : layout/reftests/forms/textarea-resize-background.html => layout/reftests/forms/textarea/resize-background.html
rename : layout/reftests/forms/textarea-resize-ref.html => layout/reftests/forms/textarea/resize-ref.html
rename : layout/reftests/forms/textarea-resize.html => layout/reftests/forms/textarea/resize.html
rename : layout/reftests/forms/textarea-rtl-dynamic-attr.html => layout/reftests/forms/textarea/rtl-dynamic-attr.html
rename : layout/reftests/forms/textarea-rtl-dynamic-style.html => layout/reftests/forms/textarea/rtl-dynamic-style.html
rename : layout/reftests/forms/textarea-rtl-scrollbar.html => layout/reftests/forms/textarea/rtl-scrollbar.html
rename : layout/reftests/forms/textarea-rtl.html => layout/reftests/forms/textarea/rtl.html
rename : layout/reftests/forms/textarea-setvalue-framereconstruction-1.html => layout/reftests/forms/textarea/setvalue-framereconstruction-1.html
rename : layout/reftests/forms/textarea-setvalue-framereconstruction-ref.html => layout/reftests/forms/textarea/setvalue-framereconstruction-ref.html
2013-06-14 09:38:40 -04:00

31 lines
1019 B
HTML

<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.png">
</div>
</body>
</html>