layout/reftests/text-overflow/scroll-rounding.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/text-overflow/scroll-rounding.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,86 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<!--
     1.6 +    Any copyright is dedicated to the Public Domain.
     1.7 +    http://creativecommons.org/licenses/publicdomain/
     1.8 +
     1.9 +    Test: 1px scroll rounding at the end position
    1.10 +-->
    1.11 +<html class="reftest-wait"><head>
    1.12 +<title>text-overflow: scroll rounding</title>
    1.13 +<style type="text/css">
    1.14 +@font-face {
    1.15 +  font-family: DejaVuSansMono;
    1.16 +  src: url(../fonts/DejaVuSansMono.woff);
    1.17 +}
    1.18 +html,body {
    1.19 +    color:black; background-color:white; font-size:16px; padding:0; margin:0; font-family:DejaVuSansMono;
    1.20 +}
    1.21 +
    1.22 +.test {
    1.23 +  text-overflow:ellipsis;
    1.24 +  overflow:auto;
    1.25 +  width:100px;
    1.26 +  height:50px;
    1.27 +  border:1px solid black;
    1.28 +  white-space:pre;
    1.29 +  margin-left:90px;
    1.30 +  margin-bottom:20px;
    1.31 +}
    1.32 +
    1.33 +.rtl {
    1.34 +  direction:rtl;  margin-left:0;
    1.35 +}
    1.36 +.ltr {
    1.37 +  direction:ltr;
    1.38 +}
    1.39 +
    1.40 +.t1 {width:100.1px;}
    1.41 +.t2 {width:100.2px;}
    1.42 +.t4 {width:100.4px;}
    1.43 +
    1.44 +s {position:absolute; background:black; z-index:1; }
    1.45 +#mask1 {top:0; left:60px; width:70px; height:100%; }
    1.46 +#mask2 {top:30px; left:0; width:100%; height:30px; }
    1.47 +#mask3 {top:100px; left:0; width:100%; height:30px; }
    1.48 +#mask4 {top:170px; left:0; width:100%; height:30px; }
    1.49 +#mask5 {top:240px; left:0; width:100%; height:30px; }
    1.50 +#mask6 {top:320px; left:0; width:100%; height:30px; }
    1.51 +#mask7 {top:390px; left:0; width:100%; height:30px; }
    1.52 +#mask8 {top:460px; left:0; width:100%; height:30px; }
    1.53 +#mask9 {top:530px; left:0; width:100%; height:30px; }
    1.54 +</style>
    1.55 +<script>
    1.56 +function scrolldivs() {
    1.57 + var divs = document.getElementsByTagName('div');
    1.58 +  for (i = 0; i < divs.length; ++i) {
    1.59 +    if (window.getComputedStyle(divs[i]).direction == 'ltr')
    1.60 +      divs[i].scrollLeft = 99999999;
    1.61 +    else
    1.62 +      divs[i].scrollLeft = -99999999;
    1.63 +  }
    1.64 +  document.documentElement.removeAttribute('class');
    1.65 +}
    1.66 +</script>
    1.67 +
    1.68 +</head><body onload="scrolldivs()">
    1.69 +
    1.70 +<s id="mask1"></s>
    1.71 +<s id="mask2"></s>
    1.72 +<s id="mask3"></s>
    1.73 +<s id="mask4"></s>
    1.74 +<s id="mask5"></s>
    1.75 +<s id="mask6"></s>
    1.76 +<s id="mask7"></s>
    1.77 +<s id="mask8"></s>
    1.78 +<s id="mask9"></s>
    1.79 +
    1.80 +<div class="test">HelloKittyוסוכנויות</div>
    1.81 +<div class="test rtl">HelloKittyוסוכנויות</div>
    1.82 +<div class="test t1">HelloKittyוסוכנויות</div>
    1.83 +<div class="test rtl t1">HelloKittyוסוכנויות</div>
    1.84 +<div class="test t2">HelloKittyוסוכנויות</div>
    1.85 +<div class="test rtl t2">HelloKittyוסוכנויות</div>
    1.86 +<div class="test t4">HelloKittyוסוכנויות</div>
    1.87 +<div class="test rtl t4">HelloKittyוסוכנויות</div>
    1.88 +</body>
    1.89 +</html>

mercurial