| OLD | NEW |
| (Empty) |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../resources/js-test.js"></script> | |
| 5 <script src="../resources/helper.js"></script> | |
| 6 <style> | |
| 7 html { -webkit-writing-mode: vertical-rl ;} | |
| 8 body { font-family: monospace; } | |
| 9 #wrapper { font-size: 30px; } | |
| 10 .border { border: 1px solid red; } | |
| 11 #box1 { -webkit-flow-into: flow; background-color: green; } | |
| 12 #box11 { background-color: lightgreen; width: 30px; margin-right: 70px;} | |
| 13 #region1 { -webkit-flow-from: flow; width: 200px; height: 400px; } | |
| 14 #region2 { -webkit-flow-from: flow; width: 200px; height: 400px; } | |
| 15 #region3 { -webkit-flow-from: flow; width: 200px; height: 400px; } | |
| 16 #box2 { -webkit-writing-mode: horizontal-tb; background-color: grey; width:
150px; height: 400px;} | |
| 17 #box22 { height: 30px; width: 30px; background-color: white; } | |
| 18 #box3 { -webkit-writing-mode: vertical-lr; background-color: lightblue; wid
th: 150px; height: 400px;} | |
| 19 #box4 { -webkit-writing-mode: horizontal-bt; background-color: yellow; heigh
t: 60px; width: 200px; position: absolute; top: 100px; left: 20px;} | |
| 20 </style> | |
| 21 </head> | |
| 22 <body> | |
| 23 <div id="description"></div> | |
| 24 <!--div id="wrapper"><div id="box1"><div id="box11"></div><div id="box2">Ver
t RL</div><div id="box3">Vert LR</div><div id="box4">Horizontal BT</div></div--> | |
| 25 | |
| 26 <div id="wrapper"><div id="box1"><div id="box11"></div><div id="box2">Horizo
ntal TB<div id="box22">X</div></div><div id="box3">Vertical LR<div id="box4">Hor
izontal BT</div></div></div></div> | |
| 27 <div id="region1" class="border"></div> | |
| 28 <div id="region2" class="border"></div> | |
| 29 <div id="region3" class="border"></div> | |
| 30 <script> | |
| 31 if (window.layoutTestController) | |
| 32 layoutTestController.dumpAsText(); | |
| 33 | |
| 34 debug("[CSSRegions] Test for Region::getRegionFlowRanges for mixed vertical
modes"); | |
| 35 region1 = document.getElementById("region1"); | |
| 36 region2 = document.getElementById("region2"); | |
| 37 region3 = document.getElementById("region3"); | |
| 38 range1 = region1.webkitGetRegionFlowRanges(); | |
| 39 shouldEvaluateTo("range1.length", 2); | |
| 40 compareArrays(getRangeAt(range1, 0), ["wrapper", 0, "box1", 1]); | |
| 41 compareArrays(getRangeAt(range1, 1), ["box3", 1, "box3", 2]); | |
| 42 range2 = region2.webkitGetRegionFlowRanges(); | |
| 43 shouldEvaluateTo("range2.length", 1); | |
| 44 compareArrays(getRangeAt(range2, 0), ["box1", 1, "box1", 2]); | |
| 45 range3 = region3.webkitGetRegionFlowRanges(); | |
| 46 shouldEvaluateTo("range3.length", 1); | |
| 47 compareArrays(getRangeAt(range3, 0), ["box1", 2, "box3", 1]); | |
| 48 | |
| 49 function hideRegionsAndFlows() { | |
| 50 document.getElementById("region1").style.visibility = "hidden"; | |
| 51 document.getElementById("region2").style.visibility = "hidden"; | |
| 52 document.getElementById("region3").style.visibility = "hidden"; | |
| 53 } | |
| 54 hideRegionsAndFlows(); | |
| 55 </script> | |
| 56 </body> | |
| 57 </html> | |
| OLD | NEW |