| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <link href="resources/flexbox.css" rel="stylesheet"> | 3 <link href="resources/flexbox.css" rel="stylesheet"> |
| 4 <style> | 4 <style> |
| 5 .flexbox { | 5 .flexbox { |
| 6 margin: 120px; | 6 margin: 120px; |
| 7 width: 100px; | 7 width: 100px; |
| 8 height: 100px; | 8 height: 100px; |
| 9 background-color: #aaa; | 9 background-color: #aaa; |
| 10 position: relative; | 10 position: relative; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 var title = document.createElement('div'); | 61 var title = document.createElement('div'); |
| 62 title.className = 'title'; | 62 title.className = 'title'; |
| 63 title.innerHTML = flexboxClassName; | 63 title.innerHTML = flexboxClassName; |
| 64 document.body.appendChild(title); | 64 document.body.appendChild(title); |
| 65 | 65 |
| 66 var isColumn = flexFlow.indexOf('column') != -1; | 66 var isColumn = flexFlow.indexOf('column') != -1; |
| 67 var isHorizontalFlow = (writingMode.indexOf('horizontal') != -1) ? !
isColumn : isColumn; | 67 var isHorizontalFlow = (writingMode.indexOf('horizontal') != -1) ? !
isColumn : isColumn; |
| 68 | 68 |
| 69 var container = document.createElement('div'); | 69 var container = document.createElement('div'); |
| 70 container.innerHTML = '<div class="flexbox ' + flexboxClassName + '"
style="-webkit-align-items: baseline;">' + | 70 container.innerHTML = '<div class="flexbox ' + flexboxClassName + '"
style="align-items: baseline;">' + |
| 71 '<div><div style="display:inline-block;"></div></div>' + | 71 '<div><div style="display:inline-block;"></div></div>' + |
| 72 '<div style="margin-top:20px;"><div style="display:inline-block;
"></div></div>' + | 72 '<div style="margin-top:20px;"><div style="display:inline-block;
"></div></div>' + |
| 73 '</div>'; | 73 '</div>'; |
| 74 | 74 |
| 75 container.firstChild.isHorizontal = writingMode.indexOf('horizontal'
) != -1; | 75 container.firstChild.isHorizontal = writingMode.indexOf('horizontal'
) != -1; |
| 76 container.firstChild.isHorizontalFlow = isHorizontalFlow; | 76 container.firstChild.isHorizontalFlow = isHorizontalFlow; |
| 77 container.firstChild.isColumn = isColumn; | 77 container.firstChild.isColumn = isColumn; |
| 78 container.firstChild.isLTR = direction == 'ltr'; | 78 container.firstChild.isLTR = direction == 'ltr'; |
| 79 document.body.appendChild(container); | 79 document.body.appendChild(container); |
| 80 }) | 80 }) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 91 shouldBe('firstChild.offsetTop', "0"); | 91 shouldBe('firstChild.offsetTop', "0"); |
| 92 shouldBe('lastChild.offsetTop', "20"); | 92 shouldBe('lastChild.offsetTop', "20"); |
| 93 } else if (flexbox.isHorizontalFlow) | 93 } else if (flexbox.isHorizontalFlow) |
| 94 shouldBe('firstChild.offsetTop', 'lastChild.offsetTop'); | 94 shouldBe('firstChild.offsetTop', 'lastChild.offsetTop'); |
| 95 else | 95 else |
| 96 shouldBe('firstChild.offsetLeft', 'lastChild.offsetLeft'); | 96 shouldBe('firstChild.offsetLeft', 'lastChild.offsetLeft'); |
| 97 } | 97 } |
| 98 </script> | 98 </script> |
| 99 </body> | 99 </body> |
| 100 </html> | 100 </html> |
| OLD | NEW |