2 <meta http-equiv=
"content-type" content=
"text/html; charset=UTF-8">
8 -moz-column-width:
13em;
10 -webkit-columns:
1 1px; /* Make as many (overflowing) columns as necessary, but keep them as narrow as possible */
11 -webkit-column-gap:
5em;
18 <div>This table shows unicode-bidi: isolate behavior (in red) with display: inline-block behavior overlapping in green. You should see no red in this test! Behavior between these two methods should be identical for non-wrapping strings, assuming unicode-bidi: isolate is implemented and functioning correctly.
</div>
20 <div id=
"resultsContainer" style=
"position: relative">
21 <div id=
"actual" style=
"color: red" class=
"resultsDiv"></div>
22 <div id=
"expected" style=
"color: green;" class=
"resultsDiv"></div>
28 var neutrals
= ['"', ")", "("];
29 var strongRTLs
= ['ש', 'נ', 'ב', 'ג', 'ק', 'כ', 'ע'];
30 var strongLTRs
= ['a', 'b', 'c', 'd', 'e', 'f', 'g'];
31 var neutral = function() { return neutrals
[seed
++ % neutrals
.length
]; }
32 var strongRTL = function() { return strongRTLs
[seed
++ % strongRTLs
.length
]; }
33 var strongLTR = function() { return strongLTRs
[seed
++ % strongLTRs
.length
]; }
34 var charClassExamples
= [neutral
, strongRTL
, strongLTR
];
35 var possibleDirs
= ['ltr', 'rtl'];
37 var controlStyle
= "display: inline-block";
39 for (outerDirIndex
in possibleDirs
) {
40 var outerDir
= possibleDirs
[outerDirIndex
];
41 for (beforeSpanIndex
in charClassExamples
) {
42 var beforeSpan
= charClassExamples
[beforeSpanIndex
];
43 for (spanDirIndex
in possibleDirs
) {
44 var spanDir
= possibleDirs
[spanDirIndex
];
45 for (inSpanIndex
in charClassExamples
) {
46 var inSpan
= charClassExamples
[inSpanIndex
];
47 for (afterSpanIndex
in charClassExamples
) {
48 var afterSpan
= charClassExamples
[afterSpanIndex
];
49 function caseWithStyle(spanStyle
) {
51 var outerDiv
= document
.createElement("div");
52 outerDiv
.dir
= outerDir
;
53 outerDiv
.appendChild(document
.createTextNode(beforeSpan()));
54 var span
= document
.createElement("span");
56 span
.setAttribute("style", spanStyle
)
57 span
.appendChild(document
.createTextNode(inSpan()));
58 outerDiv
.appendChild(span
);
59 outerDiv
.appendChild(document
.createTextNode(afterSpan()));
62 expected
.appendChild(caseWithStyle(controlStyle
));
63 actual
.appendChild(caseWithStyle(controlStyle
));