| OLD | NEW |
| 1 var debugMode = false; | 1 var debugMode = false; |
| 2 | 2 |
| 3 if (window.testRunner) | 3 if (window.testRunner) |
| 4 testRunner.dumpAsText(); | 4 testRunner.dumpAsText(); |
| 5 | 5 |
| 6 function write(str) | 6 function write(str) |
| 7 { | 7 { |
| 8 var pre = document.getElementById('console'); | 8 var pre = document.getElementById('console'); |
| 9 var text = document.createTextNode(str + '\n'); | 9 var text = document.createTextNode(str + '\n'); |
| 10 pre.appendChild(text); | 10 pre.appendChild(text); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 // We want the first descendant succeeding us in the ordering to get | 151 // We want the first descendant succeeding us in the ordering to get |
| 152 // z-index: 0. | 152 // z-index: 0. |
| 153 if (numElementsWithZIndexZero === 3) { | 153 if (numElementsWithZIndexZero === 3) { |
| 154 if (firstChildIndex > containerIndex) | 154 if (firstChildIndex > containerIndex) |
| 155 ordering[firstChildIndex].style.zIndex = '0'; | 155 ordering[firstChildIndex].style.zIndex = '0'; |
| 156 else | 156 else |
| 157 ordering[secondChildIndex].style.zIndex = '0'; | 157 ordering[secondChildIndex].style.zIndex = '0'; |
| 158 } | 158 } |
| 159 | 159 |
| 160 if (debugMode) { |
| 161 write('permutationIteration: ' + permutationIteration); |
| 162 write('hasPositionedAncestor ' + hasPositionedAncestor); |
| 163 write('ancestor, z-index: ' + ancestor.style.zIndex + ', position: ' +
ancestor.style.position + ', display: ' + ancestor.style.display); |
| 164 write('predecessor, z-index: ' + predecessor.style.zIndex + ', positio
n: ' + predecessor.style.position + ', display: ' + predecessor.style.display); |
| 165 write('successor, z-index: ' + successor.style.zIndex + ', position: '
+ successor.style.position + ', display: ' + successor.style.display); |
| 166 write('firstChild, z-index: ' + firstChild.style.zIndex + ', position:
' + firstChild.style.position + ', display: ' + firstChild.style.display); |
| 167 write('secondChild, z-index: ' + secondChild.style.zIndex + ', positio
n: ' + secondChild.style.position + ', display: ' + secondChild.style.display); |
| 168 write('container, z-index: ' + container.style.zIndex + ', position: '
+ container.style.position + ', display: ' + container.style.display); |
| 169 write(''); |
| 170 } |
| 171 |
| 160 testPermutation(permutationIteration, ordering, hasPositionedAncestor, c
ontainerIsPositioned); | 172 testPermutation(permutationIteration, ordering, hasPositionedAncestor, c
ontainerIsPositioned); |
| 161 permutationIteration++; | 173 permutationIteration++; |
| 162 } | 174 } |
| 163 } | 175 } |
| 164 } | 176 } |
| 165 } | 177 } |
| 166 | 178 |
| 167 function permute(testPermutation) | 179 function permute(testPermutation) |
| 168 { | 180 { |
| 169 var ancestor = document.getElementById('ancestor'); | 181 var ancestor = document.getElementById('ancestor'); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 183 containerIndices.splice(containerSubindex, 1); | 195 containerIndices.splice(containerSubindex, 1); |
| 184 var firstChildIndex = containerIndices[0]; | 196 var firstChildIndex = containerIndices[0]; |
| 185 var secondChildIndex = containerIndices[1]; | 197 var secondChildIndex = containerIndices[1]; |
| 186 | 198 |
| 187 permuteWithFixedOrdering(testPermutation, siblingIndex, containerIndex, fi
rstChildIndex, secondChildIndex, 1); | 199 permuteWithFixedOrdering(testPermutation, siblingIndex, containerIndex, fi
rstChildIndex, secondChildIndex, 1); |
| 188 permuteWithFixedOrdering(testPermutation, siblingIndex, containerIndex, fi
rstChildIndex, secondChildIndex, 2); | 200 permuteWithFixedOrdering(testPermutation, siblingIndex, containerIndex, fi
rstChildIndex, secondChildIndex, 2); |
| 189 permuteWithFixedOrdering(testPermutation, siblingIndex, containerIndex, fi
rstChildIndex, secondChildIndex, 3); | 201 permuteWithFixedOrdering(testPermutation, siblingIndex, containerIndex, fi
rstChildIndex, secondChildIndex, 3); |
| 190 } | 202 } |
| 191 } | 203 } |
| 192 } // function doTest | 204 } // function doTest |
| OLD | NEW |