Fri, 16 Jan 2015 18:13:44 +0100
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 | overflow:auto; |
michael@0 | 21 | width:100px; |
michael@0 | 22 | height:50px; |
michael@0 | 23 | border:1px solid black; |
michael@0 | 24 | white-space:pre; |
michael@0 | 25 | margin-left:90px; |
michael@0 | 26 | margin-bottom:20px; |
michael@0 | 27 | } |
michael@0 | 28 | |
michael@0 | 29 | .rtl { |
michael@0 | 30 | direction:rtl; margin-left:0; |
michael@0 | 31 | } |
michael@0 | 32 | .ltr { |
michael@0 | 33 | direction:ltr; |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | .t1 {width:100.1px;} |
michael@0 | 37 | .t2 {width:100.2px;} |
michael@0 | 38 | .t4 {width:100.4px;} |
michael@0 | 39 | |
michael@0 | 40 | s {position:absolute; background:black; z-index:1; } |
michael@0 | 41 | #mask1 {top:0; left:60px; width:70px; height:100%; } |
michael@0 | 42 | #mask2 {top:30px; left:0; width:100%; height:30px; } |
michael@0 | 43 | #mask3 {top:100px; left:0; width:100%; height:30px; } |
michael@0 | 44 | #mask4 {top:170px; left:0; width:100%; height:30px; } |
michael@0 | 45 | #mask5 {top:240px; left:0; width:100%; height:30px; } |
michael@0 | 46 | #mask6 {top:320px; left:0; width:100%; height:30px; } |
michael@0 | 47 | #mask7 {top:390px; left:0; width:100%; height:30px; } |
michael@0 | 48 | #mask8 {top:460px; left:0; width:100%; height:30px; } |
michael@0 | 49 | #mask9 {top:530px; left:0; width:100%; height:30px; } |
michael@0 | 50 | </style> |
michael@0 | 51 | <script> |
michael@0 | 52 | function scrolldivs() { |
michael@0 | 53 | var divs = document.getElementsByTagName('div'); |
michael@0 | 54 | for (i = 0; i < divs.length; ++i) { |
michael@0 | 55 | if (window.getComputedStyle(divs[i]).direction == 'ltr') |
michael@0 | 56 | divs[i].scrollLeft = 99999999; |
michael@0 | 57 | else |
michael@0 | 58 | divs[i].scrollLeft = -99999999; |
michael@0 | 59 | } |
michael@0 | 60 | document.documentElement.removeAttribute('class'); |
michael@0 | 61 | } |
michael@0 | 62 | </script> |
michael@0 | 63 | |
michael@0 | 64 | </head><body onload="scrolldivs()"> |
michael@0 | 65 | |
michael@0 | 66 | <s id="mask1"></s> |
michael@0 | 67 | <s id="mask2"></s> |
michael@0 | 68 | <s id="mask3"></s> |
michael@0 | 69 | <s id="mask4"></s> |
michael@0 | 70 | <s id="mask5"></s> |
michael@0 | 71 | <s id="mask6"></s> |
michael@0 | 72 | <s id="mask7"></s> |
michael@0 | 73 | <s id="mask8"></s> |
michael@0 | 74 | <s id="mask9"></s> |
michael@0 | 75 | |
michael@0 | 76 | <div class="test">HelloKittyוסוכנויות</div> |
michael@0 | 77 | <div class="test rtl">HelloKittyוסוכנויות</div> |
michael@0 | 78 | <div class="test t1">HelloKittyוסוכנויות</div> |
michael@0 | 79 | <div class="test rtl t1">HelloKittyוסוכנויות</div> |
michael@0 | 80 | <div class="test t2">HelloKittyוסוכנויות</div> |
michael@0 | 81 | <div class="test rtl t2">HelloKittyוסוכנויות</div> |
michael@0 | 82 | <div class="test t4">HelloKittyוסוכנויות</div> |
michael@0 | 83 | <div class="test rtl t4">HelloKittyוסוכנויות</div> |
michael@0 | 84 | </body> |
michael@0 | 85 | </html> |