OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 body { | 5 body { |
6 font-size: 13px; | 6 font-size: 13px; |
| 7 text-rendering:optimizeLegibility; |
7 } | 8 } |
8 .px-tab-size { | 9 .px-tab-size { |
9 tab-size: 60px; | 10 tab-size: 60px; |
10 } | 11 } |
11 .em-tab-size { | 12 .em-tab-size { |
12 tab-size: 7em; | 13 tab-size: 7em; |
13 } | 14 } |
14 .int-tab-size { | 15 .int-tab-size { |
15 tab-size: 9; | 16 tab-size: 9; |
16 } | 17 } |
17 </style> | 18 </style> |
18 <script src="../resources/js-test.js"></script> | 19 <script src="../resources/js-test.js"></script> |
19 </head> | 20 </head> |
20 <body> | 21 <body> |
21 <div style="background-repeat: repeat-x;"> | 22 <div id="container" style="background-repeat: repeat-x;"> |
22 <div><pre id="leading-px" class="px-tab-size">	<span>leading text, tab-s
ize in px.</span></pre></div> | 23 <div><pre id="leading-px" class="px-tab-size">	<span>leading text, tab-s
ize in px.</span></pre></div> |
23 <div><pre id="leading-em" class="em-tab-size">	<span>leading text, tab-s
ize in em.</span></pre></div> | 24 <div><pre id="leading-em" class="em-tab-size">	<span>leading text, tab-s
ize in em.</span></pre></div> |
24 <div><pre id="leading-int" class="int-tab-size">	<span>leading text, tab
-size in spaces.</span></pre></div> | 25 <div><pre id="leading-int" class="int-tab-size">	<span>leading text, tab
-size in spaces.</span></pre></div> |
25 <div><pre id="trailing-px" class="px-tab-size"><span>leading text</span>&Tab
;<span>trailing text, tab-size in px.</span></pre></div> | 26 <div><pre id="trailing-px" class="px-tab-size"><span>leading text</span>&Tab
;<span>trailing text, tab-size in px.</span></pre></div> |
26 <div><pre id="trailing-em" class="em-tab-size"><span>leading text</span>&Tab
;<span>trailing text, tab-size in em.</span></pre></div> | 27 <div><pre id="trailing-em" class="em-tab-size"><span>leading text</span>&Tab
;<span>trailing text, tab-size in em.</span></pre></div> |
27 <div><pre id="trailing-int" class="int-tab-size"><span>leading text</span>&T
ab;<span>trailing text, tab-size in spaces.</span></pre></div> | 28 <div><pre id="trailing-int" class="int-tab-size"><span>leading text</span>&T
ab;<span>trailing text, tab-size in spaces.</span></pre></div> |
28 <div><pre>Some spaces... '<span id="space-size-reference"> </span>'
... for size reference.</pre></div> | 29 <div><pre>Some spaces... '<span id="space-size-reference"> </span>'
... for size reference.</pre></div> |
29 <div><pre>'<span id="leading-text-size-reference">leading text</span>', for
size reference.</pre></div> | 30 <div><pre>'<span id="leading-text-size-reference">leading text</span>', for
size reference.</pre></div> |
30 <script> | 31 <script> |
31 | 32 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 emTrailingSpan = emPre.lastElementChild; | 73 emTrailingSpan = emPre.lastElementChild; |
73 intTrailingSpan = intPre.lastElementChild; | 74 intTrailingSpan = intPre.lastElementChild; |
74 | 75 |
75 pxTabLength = pxTrailingSpan.getBoundingClientRect().left - pxLeadingSpan.getBou
ndingClientRect().right; | 76 pxTabLength = pxTrailingSpan.getBoundingClientRect().left - pxLeadingSpan.getBou
ndingClientRect().right; |
76 emTabLength = emTrailingSpan.getBoundingClientRect().left - emLeadingSpan.getBou
ndingClientRect().right; | 77 emTabLength = emTrailingSpan.getBoundingClientRect().left - emLeadingSpan.getBou
ndingClientRect().right; |
77 intTabLength = intTrailingSpan.getBoundingClientRect().left - intLeadingSpan.get
BoundingClientRect().right; | 78 intTabLength = intTrailingSpan.getBoundingClientRect().left - intLeadingSpan.get
BoundingClientRect().right; |
78 | 79 |
79 shouldBe("pxTabLength", "pxExpected", false, 0.02); | 80 shouldBe("pxTabLength", "pxExpected", false, 0.02); |
80 shouldBe("emTabLength", "emExpected", false, 0.02); | 81 shouldBe("emTabLength", "emExpected", false, 0.02); |
81 shouldBe("intTabLength", "intExpected", false, 0.02); | 82 shouldBe("intTabLength", "intExpected", false, 0.02); |
| 83 |
| 84 if (window.testRunner) |
| 85 container.style.display = "none"; |
82 </script> | 86 </script> |
83 </body> | 87 </body> |
84 </html> | 88 </html> |
OLD | NEW |