blob: ef768d9c99335f083f685061bd5b36400b0ac92a [file] [log] [blame]
<!DOCTYPE html>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
.resultsDiv {
position: absolute;
top: 0px;
left: 0px;
-moz-column-width: 13em;
-webkit-column-width: 13em;
-moz-column-gap: 5em;
-webkit-column-gap: 5em;
height: 400px;
<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>
<div id="resultsContainer" style="position: relative">
<div id="actual" style="color: red" class="resultsDiv"></div>
<div id="expected" style="color: green;" class="resultsDiv"></div>
var seed = 0;
var neutrals = ['"', ")", "("];
var strongRTLs = ['ש', 'נ', 'ב', 'ג', 'ק', 'כ', 'ע'];
var strongLTRs = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];
var neutral = function() { return neutrals[seed++ % neutrals.length]; }
var strongRTL = function() { return strongRTLs[seed++ % strongRTLs.length]; }
var strongLTR = function() { return strongLTRs[seed++ % strongLTRs.length]; }
var charClassExamples = [neutral, strongRTL, strongLTR];
var possibleDirs = ['ltr', 'rtl'];
var testStyle = "unicode-bidi: -webkit-isolate";
var controlStyle = "display: inline-block";
for (outerDirIndex in possibleDirs) {
var outerDir = possibleDirs[outerDirIndex];
for (beforeSpanIndex in charClassExamples) {
var beforeSpan = charClassExamples[beforeSpanIndex];
for (spanDirIndex in possibleDirs) {
var spanDir = possibleDirs[spanDirIndex];
for (inSpanIndex in charClassExamples) {
var inSpan = charClassExamples[inSpanIndex];
for (afterSpanIndex in charClassExamples) {
var afterSpan = charClassExamples[afterSpanIndex];
function caseWithStyle(spanStyle) {
seed = 0;
var outerDiv = document.createElement("div");
outerDiv.dir = outerDir;
var span = document.createElement("span");
span.dir = spanDir;
span.setAttribute("style", spanStyle)
return outerDiv;