OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <meta charset="utf-8"> | |
5 <script src="../../../resources/js-test.js"></script> | |
6 <script src="../resources/helper.js"></script> | |
7 <style> | |
8 html { -webkit-writing-mode: vertical-rl; } | |
9 body { font-family: monospace; } | |
10 #wrapper { font-size: 50px; } | |
11 .border { border: 1px solid red; } | |
12 #box { -webkit-flow-into: flow1;} | |
13 #region1 { -webkit-flow-from: flow1; width: 70px; height: 250px; left: 20px;
top: 250px;} | |
14 #region2 { -webkit-flow-from: flow1; width: 60px; height: 250px; left: 20px;
top: 300px;} | |
15 </style> | |
16 </head> | |
17 <body> | |
18 <div id="description"></div> | |
19 <div id="wrapper"><div id="box">Text node.</div></div> | |
20 <div id="region1" class="border"></div> | |
21 <div id="region2" class="border"></div> | |
22 <div id="console"></div> | |
23 <script> | |
24 if (window.layoutTestController) | |
25 layoutTestController.dumpAsText(); | |
26 | |
27 description("[CSSRegions] Test for Region::getRegionFlowRanges in vertical-r
l mode. Text breaks into two regions"); | |
28 var region1 = document.getElementById("region1"); | |
29 var region2 = document.getElementById("region2"); | |
30 | |
31 | |
32 debug("Flow test"); | |
33 range1 = region1.webkitGetRegionFlowRanges(); | |
34 shouldEvaluateTo("range1.length", 1); | |
35 compareArrays(getRangeAt(range1, 0), ["wrapper", 0, "#text", 4]); | |
36 range2 = region2.webkitGetRegionFlowRanges(); | |
37 shouldEvaluateTo("range2.length", 1); | |
38 compareArrays(getRangeAt(range2, 0), ["#text", 5, "wrapper", 1]); | |
39 | |
40 function hideRegionsAndFlows() { | |
41 document.getElementById("region1").style.visibility = "hidden"; | |
42 document.getElementById("region2").style.visibility = "hidden"; | |
43 } | |
44 | |
45 hideRegionsAndFlows(); | |
46 </script> | |
47 </body> | |
48 </html> | |
OLD | NEW |