6 var fast
= document
.getElementById("fastPath");
7 fast
.firstChild
.data
= s
;
8 var fastWidth
= fast
.offsetWidth
;
9 var slow
= document
.getElementById("slowPath");
10 slow
.firstChild
.data
= s
;
11 var slowWidth
= slow
.offsetWidth
;
12 return fastWidth
== slowWidth
;
17 if (window
.testRunner
)
18 testRunner
.dumpAsText();
20 var testStrings
= ["\u02E5\u02E9", "\u02E9\u02E5", "\u02E7\u02E9",
21 "\u02E5\u02E7", "\u02E5\u02E7\u02E5"];
23 var failedStrings
= new Array
;
24 for (var i
= 0; i
< testStrings
.length
; ++i
)
25 if (!testString(testStrings
[i
]))
26 failedStrings
.push(testStrings
[i
]);
28 var testArea
= document
.getElementById("testArea");
29 testArea
.parentNode
.removeChild(testArea
);
31 if (failedStrings
.length
> 0)
32 result
= "FAIL: The following strings are rendered differently depending on what text-rendering is set to : " + failedStrings
.join(", ");
34 result
= "PASS: All strings have identical widths regardless of what text-rendering is set to.";
35 document
.getElementById("result").firstChild
.data
= result
;
39 <body onload=
"test()">
40 <p>This test checks if sequences of IPA tone marks are treated as complex script 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=39799">bug
39799</a></p>
41 <p id=
"result">FAIL: Script did not run to completion.
</p>
42 <p id=
"testArea" style=
"font-family: Arial;">
43 <span id=
"fastPath" style=
"text-rendering: optimizeSpeed"> </span>
44 <span id=
"slowPath" style=
"text-rendering: optimizeLegibility"> </span>