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

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <!DOCTYPE HTML>
michael@0 2 <!--
michael@0 3 Any copyright is dedicated to the Public Domain.
michael@0 4 http://creativecommons.org/licenses/publicdomain/
michael@0 5
michael@0 6 Test: 1px scroll rounding at the end position
michael@0 7 -->
michael@0 8 <html class="reftest-wait"><head>
michael@0 9 <title>text-overflow: scroll rounding</title>
michael@0 10 <style type="text/css">
michael@0 11 @font-face {
michael@0 12 font-family: DejaVuSansMono;
michael@0 13 src: url(../fonts/DejaVuSansMono.woff);
michael@0 14 }
michael@0 15 html,body {
michael@0 16 color:black; background-color:white; font-size:16px; padding:0; margin:0; font-family:DejaVuSansMono;
michael@0 17 }
michael@0 18
michael@0 19 .test {
michael@0 20 text-overflow:ellipsis;
michael@0 21 overflow:auto;
michael@0 22 width:100px;
michael@0 23 height:50px;
michael@0 24 border:1px solid black;
michael@0 25 white-space:pre;
michael@0 26 margin-left:90px;
michael@0 27 margin-bottom:20px;
michael@0 28 }
michael@0 29
michael@0 30 .rtl {
michael@0 31 direction:rtl; margin-left:0;
michael@0 32 }
michael@0 33 .ltr {
michael@0 34 direction:ltr;
michael@0 35 }
michael@0 36
michael@0 37 .t1 {width:100.1px;}
michael@0 38 .t2 {width:100.2px;}
michael@0 39 .t4 {width:100.4px;}
michael@0 40
michael@0 41 s {position:absolute; background:black; z-index:1; }
michael@0 42 #mask1 {top:0; left:60px; width:70px; height:100%; }
michael@0 43 #mask2 {top:30px; left:0; width:100%; height:30px; }
michael@0 44 #mask3 {top:100px; left:0; width:100%; height:30px; }
michael@0 45 #mask4 {top:170px; left:0; width:100%; height:30px; }
michael@0 46 #mask5 {top:240px; left:0; width:100%; height:30px; }
michael@0 47 #mask6 {top:320px; left:0; width:100%; height:30px; }
michael@0 48 #mask7 {top:390px; left:0; width:100%; height:30px; }
michael@0 49 #mask8 {top:460px; left:0; width:100%; height:30px; }
michael@0 50 #mask9 {top:530px; left:0; width:100%; height:30px; }
michael@0 51 </style>
michael@0 52 <script>
michael@0 53 function scrolldivs() {
michael@0 54 var divs = document.getElementsByTagName('div');
michael@0 55 for (i = 0; i < divs.length; ++i) {
michael@0 56 if (window.getComputedStyle(divs[i]).direction == 'ltr')
michael@0 57 divs[i].scrollLeft = 99999999;
michael@0 58 else
michael@0 59 divs[i].scrollLeft = -99999999;
michael@0 60 }
michael@0 61 document.documentElement.removeAttribute('class');
michael@0 62 }
michael@0 63 </script>
michael@0 64
michael@0 65 </head><body onload="scrolldivs()">
michael@0 66
michael@0 67 <s id="mask1"></s>
michael@0 68 <s id="mask2"></s>
michael@0 69 <s id="mask3"></s>
michael@0 70 <s id="mask4"></s>
michael@0 71 <s id="mask5"></s>
michael@0 72 <s id="mask6"></s>
michael@0 73 <s id="mask7"></s>
michael@0 74 <s id="mask8"></s>
michael@0 75 <s id="mask9"></s>
michael@0 76
michael@0 77 <div class="test">HelloKittyוסוכנויות</div>
michael@0 78 <div class="test rtl">HelloKittyוסוכנויות</div>
michael@0 79 <div class="test t1">HelloKittyוסוכנויות</div>
michael@0 80 <div class="test rtl t1">HelloKittyוסוכנויות</div>
michael@0 81 <div class="test t2">HelloKittyוסוכנויות</div>
michael@0 82 <div class="test rtl t2">HelloKittyוסוכנויות</div>
michael@0 83 <div class="test t4">HelloKittyוסוכנויות</div>
michael@0 84 <div class="test rtl t4">HelloKittyוסוכנויות</div>
michael@0 85 </body>
michael@0 86 </html>

mercurial