Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | function buildTable() |
michael@0 | 2 | { |
michael@0 | 3 | var seed = 0; |
michael@0 | 4 | |
michael@0 | 5 | var neutrals = ['"', ")", "("]; |
michael@0 | 6 | var strongRTLs = ['א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ז']; |
michael@0 | 7 | var strongLTRs = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; |
michael@0 | 8 | var neutral = function() { return neutrals[seed++ % neutrals.length]; } |
michael@0 | 9 | var strongRTL = function() { return strongRTLs[seed++ % strongRTLs.length]; } |
michael@0 | 10 | var strongLTR = function() { return strongLTRs[seed++ % strongLTRs.length]; } |
michael@0 | 11 | var charClassExamples = [neutral, strongRTL, strongLTR]; |
michael@0 | 12 | var possibleDirs = ['ltr', 'rtl']; |
michael@0 | 13 | |
michael@0 | 14 | var elem=document.getElementById("elem"); |
michael@0 | 15 | for (outerDirIndex in possibleDirs) { |
michael@0 | 16 | var outerDir = possibleDirs[outerDirIndex]; |
michael@0 | 17 | for (beforeSpanIndex in charClassExamples) { |
michael@0 | 18 | var beforeSpan = charClassExamples[beforeSpanIndex]; |
michael@0 | 19 | for (spanDirIndex in possibleDirs) { |
michael@0 | 20 | var spanDir = possibleDirs[spanDirIndex]; |
michael@0 | 21 | for (inSpanIndex in charClassExamples) { |
michael@0 | 22 | var inSpan = charClassExamples[inSpanIndex]; |
michael@0 | 23 | for (afterSpanIndex in charClassExamples) { |
michael@0 | 24 | var afterSpan = charClassExamples[afterSpanIndex]; |
michael@0 | 25 | function caseWithStyle() { |
michael@0 | 26 | seed = 0; |
michael@0 | 27 | var outerDiv = document.createElement("div"); |
michael@0 | 28 | outerDiv.dir = outerDir; |
michael@0 | 29 | outerDiv.appendChild(document.createTextNode(beforeSpan())); |
michael@0 | 30 | var span = document.createElement("span"); |
michael@0 | 31 | span.dir = spanDir; |
michael@0 | 32 | span.setAttribute("class", "enclosed") |
michael@0 | 33 | span.appendChild(document.createTextNode(inSpan())); |
michael@0 | 34 | outerDiv.appendChild(span); |
michael@0 | 35 | outerDiv.appendChild(document.createTextNode(afterSpan())); |
michael@0 | 36 | return outerDiv; |
michael@0 | 37 | } |
michael@0 | 38 | elem.appendChild(caseWithStyle()); |
michael@0 | 39 | } |
michael@0 | 40 | } |
michael@0 | 41 | } |
michael@0 | 42 | } |
michael@0 | 43 | } |
michael@0 | 44 | } |