| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html lang="ja"> | |
| 3 <script src="../../resources/testharness.js"></script> | |
| 4 <script src="../../resources/testharnessreport.js"></script> | |
| 5 <style> | |
| 6 @font-face { | |
| 7 font-family:cssot; | |
| 8 src:url(../../third_party/adobe-fonts/CSSFWOrientationTest.otf); | |
| 9 } | |
| 10 div > div { | |
| 11 font-family:'MS Gothic', Ahem, cssot; | |
| 12 } | |
| 13 .vert { | |
| 14 line-height:1.5; | |
| 15 -webkit-writing-mode:vertical-rl; | |
| 16 writing-mode:tb-rl; | |
| 17 font-size:200%; | |
| 18 height:300px; | |
| 19 } | |
| 20 .tcy { | |
| 21 -webkit-text-combine:horizontal; | |
| 22 -ms-text-combine-horizontal:all; | |
| 23 } | |
| 24 .border > span { | |
| 25 border:black solid thin; | |
| 26 } | |
| 27 .kenten { | |
| 28 line-height:1.5; | |
| 29 -webkit-text-emphasis:sesame; | |
| 30 } | |
| 31 div { | |
| 32 #border:black solid thin; | |
| 33 } | |
| 34 </style> | |
| 35 <div> | |
| 36 <div id="horizRef">These two lines should look identical.</div> | |
| 37 <div id="horiz"class="tcy">These two lines should look identical.</div> | |
| 38 </div> | |
| 39 <div class="vert"> | |
| 40 <div> | |
| 41 <span style="font-size:2em">国<span class="tcy">1234567890</span>&
#x56FD;</span> | |
| 42 <span>国<span class="tcy">#12</span>国</span> | |
| 43 <span class="tcy" style="font-size:.5em">国</span> | |
| 44 <span class="tcy">国</span><span class="tcy">あ</span><span
class="tcy">1</span> | |
| 45 </div> | |
| 46 <div> | |
| 47 <span>国<span class="tcy">1234567890</span>国</span> | |
| 48 <span>国<span class="tcy">1234</span>国</span> | |
| 49 <span>国<span class="tcy">123</span>国</span> | |
| 50 <span>国<span class="tcy">12</span>国</span> | |
| 51 <span>国<span class="tcy">1</span>国</span> | |
| 52 </div> | |
| 53 <div class="border"> | |
| 54 <span>国<span class="tcy">1234567890</span>国</span> | |
| 55 <span>国<span class="tcy">1234</span>国</span> | |
| 56 <span>国<span class="tcy">123</span>国</span> | |
| 57 <span>国<span class="tcy">12</span>国</span> | |
| 58 <span>国<span class="tcy">1</span>国</span> | |
| 59 </div> | |
| 60 <div style="text-decoration:underline;"> | |
| 61 <span>国<span class="tcy">1234567890</span>国</span> | |
| 62 <span>国<span class="tcy">1234</span>国</span> | |
| 63 <span>国<span class="tcy">123</span>国</span> | |
| 64 <span>国<span class="tcy">12</span>国</span> | |
| 65 <span>国<span class="tcy">1</span>国</span> | |
| 66 </div> | |
| 67 <div class="kenten"> | |
| 68 <span>国<span class="tcy">1234567890</span>国</span> | |
| 69 <span>国<span class="tcy">1234</span>国</span> | |
| 70 <span>国<span class="tcy">123</span>国</span> | |
| 71 <span>国<span class="tcy">12</span>国</span> | |
| 72 <span>国<span class="tcy">1</span>国</span> | |
| 73 </div> | |
| 74 <div> | |
| 75 <span><ruby>国<rt>国</rt></ruby><ruby><span class="tcy">1234
567890</span><rt>国</rt></ruby><ruby>国<rt>国</rt></ruby></spa
n> | |
| 76 <span><ruby>国<rt>国</rt></ruby><ruby><span class="tcy">1234
</span><rt>国</rt></ruby><ruby>国<rt>国</rt></ruby></span> | |
| 77 <span><ruby>国<rt>国</rt></ruby><ruby><span class="tcy">123<
/span><rt>国</rt></ruby><ruby>国<rt>国</rt></ruby></span> | |
| 78 <span><ruby>国<rt>国</rt></ruby><ruby><span class="tcy">12</
span><rt>国</rt></ruby><ruby>国<rt>国</rt></ruby></span> | |
| 79 <span><ruby>国<rt>国</rt></ruby><ruby><span class="tcy">1</s
pan><rt>国</rt></ruby><ruby>国<rt>国</rt></ruby></span> | |
| 80 </div> | |
| 81 </div> | |
| 82 <script> | |
| 83 (function () { | |
| 84 document.body.offsetTop; | |
| 85 test(function () { | |
| 86 assert_equals(horiz.offsetWidth, horizRef.offsetWidth, "width"); | |
| 87 }, "text-combine should not affect in horizontal flow."); | |
| 88 var tcyAll = document.querySelectorAll(".vert .tcy"); | |
| 89 var maxAspectRatio = 1; | |
| 90 for (var i = 0; i < tcyAll.length; ++i) { | |
| 91 var tcy = tcyAll[i]; | |
| 92 test(function () { | |
| 93 var fontSize = parseFloat(window.getComputedStyle(tcy).fontSize); | |
| 94 var bounds = tcy.getBoundingClientRect(); | |
| 95 try { | |
| 96 assert_approx_equals(bounds.width, fontSize, 1, "width"); | |
| 97 assert_approx_equals(bounds.height, fontSize, 1, "height"); | |
| 98 } catch (e) { | |
| 99 tcy.style.backgroundColor = 'red'; | |
| 100 throw e; | |
| 101 } | |
| 102 }, "The size of text-combine elements in vertical flow."); | |
| 103 } | |
| 104 })(); | |
| 105 </script> | |
| OLD | NEW |