14 display: inline-block;
18 border:
10px solid silver;
25 <div>ااااا
<bdo>کبند
</bdo></div><br><br>
26 <div><bdo>کبند
</bdo></div><br><br>
27 <div><bdo>کبند کبند
</bdo></div><br><br>
28 <div>ااااا
<bdo dir=
"ltr">کبند
</bdo></div><br><br>
29 <div>ااااا
<bdo dir=
"rtl">کبند
</bdo></div><br><br>
30 <div>ااااا
<bdo dir=
"auto">کبند
</bdo></div>
34 Tests handling of
<code>bdo
</code> tags. The white box
35 for each line above should fully contain the text and
36 characters should not be painted on top of other
41 function createHighlightRect(rect
)
43 var el
= document
.createElement('div');
44 el
.className
= 'highlight';
45 el
.style
.left
= (rect
.left
- 10) + 'px';
46 el
.style
.top
= (rect
.top
- 10) + 'px';
47 el
.style
.width
= (rect
.width
+ 5) + 'px';
48 el
.style
.height
= (rect
.height
+ 5) + 'px';
51 var testElements
= document
.getElementById('test').getElementsByTagName('div');
52 for (var el
, i
= 0; el
= testElements
[i
]; i
++) {
53 var rect
= el
.getBoundingClientRect();
54 document
.body
.appendChild(createHighlightRect(rect
));