OLD | NEW |
1 <head> | 1 <head> |
2 <script> | 2 <script> |
3 | 3 |
4 function testString(s) | 4 function testString(s) |
5 { | 5 { |
6 var fast = document.getElementById("fastPath"); | 6 var fast = document.getElementById("fastPath"); |
7 fast.firstChild.data = s; | 7 fast.firstChild.data = s; |
8 var fastWidth = fast.offsetWidth; | 8 var fastWidth = fast.getBoundingClientRect().width; |
9 var slow = document.getElementById("slowPath"); | 9 var slow = document.getElementById("slowPath"); |
10 slow.firstChild.data = s; | 10 slow.firstChild.data = s; |
11 var slowWidth = slow.offsetWidth; | 11 var slowWidth = slow.getBoundingClientRect().width; |
12 return fastWidth == slowWidth; | 12 return fastWidth == slowWidth; |
13 } | 13 } |
14 | 14 |
15 function test() | 15 function test() |
16 { | 16 { |
17 if (window.testRunner) | 17 if (window.testRunner) |
18 testRunner.dumpAsText(); | 18 testRunner.dumpAsText(); |
19 | 19 |
20 var testStrings = ["\u02E5\u02E9", "\u02E9\u02E5", "\u02E7\u02E9", | 20 var testStrings = ["\u02E5\u02E9", "\u02E9\u02E5", "\u02E7\u02E9", |
21 "\u02E5\u02E7", "\u02E5\u02E7\u02E5"]; | 21 "\u02E5\u02E7", "\u02E5\u02E7\u02E5"]; |
(...skipping 15 matching lines...) Expand all Loading... |
37 </script> | 37 </script> |
38 </head> | 38 </head> |
39 <body onload="test()"> | 39 <body onload="test()"> |
40 <p>This test checks if sequences of IPA tone marks are treated as complex scri
pt characters and ligated when a font capable of that is specified regardless of
text-rendering mode. It's for <a href="http://bugs.webkit.org/show_bug.cgi?id=3
9799">bug 39799</a></p> | 40 <p>This test checks if sequences of IPA tone marks are treated as complex scri
pt characters and ligated when a font capable of that is specified regardless of
text-rendering mode. It's for <a href="http://bugs.webkit.org/show_bug.cgi?id=3
9799">bug 39799</a></p> |
41 <p id="result">FAIL: Script did not run to completion.</p> | 41 <p id="result">FAIL: Script did not run to completion.</p> |
42 <p id="testArea" style="font-family: Arial;"> | 42 <p id="testArea" style="font-family: Arial;"> |
43 <span id="fastPath" style="text-rendering: optimizeSpeed"> </span> | 43 <span id="fastPath" style="text-rendering: optimizeSpeed"> </span> |
44 <span id="slowPath" style="text-rendering: optimizeLegibility"> </span> | 44 <span id="slowPath" style="text-rendering: optimizeLegibility"> </span> |
45 </p> | 45 </p> |
46 </body> | 46 </body> |
OLD | NEW |