3 <title>Line breaks after empty inline - Hebrew
</title>
8 The following two paragraphs should have the same line breaks:
10 <div style=
"width: 40px; font-family: raanana;">
11 <p style=
"border:solid green 1px;">אבג דהו זחט</p>
12 <p style=
"border:solid green 1px;">אבג <span></span> דהו זחט</p>
14 <div><pre id=results
></pre></div>
16 if (window
.testRunner
)
17 testRunner
.dumpAsText();
19 function getLineWidths(paragraphNumber
) {
20 var range
= document
.createRange();
21 var paragraphs
= document
.getElementsByTagName("p");
22 var p
= paragraphs
[paragraphNumber
];
24 range
.setEnd(p
,p
.childNodes
.length
);
25 var rects
= range
.getClientRects();
27 for (var i
= 0; i
< rects
.length
; ++i
) {
35 var widths1
= getLineWidths(0);
36 var widths2
= getLineWidths(1);
38 if (widths1
.length
!= widths2
.length
)
39 results
+= 'FAIL: different number of lines, got ' + widths2
.length
+ ', expected ' + widths1
.length
;
41 for (var i
= 0; i
< widths1
.length
; ++i
) {
42 if (widths2
[i
] != widths1
[i
]) {
45 results
+= 'FAIL: line[' + i
+ '] width differs, got ' + widths2
[i
] + ', expected ' + widths1
[i
];
51 document
.getElementById("results").innerText
= results
;