| <!DOCTYPE html> |
| <head> |
| <style> |
| #content { -webkit-flow-into: flow; } |
| .region { -webkit-flow-from: flow; border:2px solid black; margin:1em 0} |
| .finished #content, .finished .region { display: none; } |
| |
| #region1 { width: 200px; height: 30px; } |
| #region2 { width: 200px; height: 50px; } |
| #region3 { width: 200px; height: 50px; } |
| #region4 { width: 200px; height: 50px; } |
| #region5 { width: 200px; height: 100px; } |
| #region6 { width: 200px; height: 60px; } |
| </style> |
| </head> |
| <div id="content"> |
| <p style="-webkit-region-break-after: always"><b class="check region1">Text in region 1.</b> This paragraph has "<i>-webkit-region-break-after: always</i>". <b class="check region2">There should be nothing in this region after this line.</b></p> |
| |
| <p><b class="check region3">First element in the region 3.</b> Some text inside a flow. Some text inside a flow. Some text inside a flow. <br><b class="check region4">Text in region 4.</b> </p> |
| |
| <p> |
| <!-- Using the paragraph element to test nested blocks region-breaks. --> |
| <div><span class="check region4">Simple line in region 4.</span></div> |
| <div style="margin-top:50px;"><b class="check region5">First line in region 5.</b> This paragraph displays in region 5 because it has a margin-top, which is too high to fit in the previous region.</div> |
| <div style="-webkit-region-break-before: always"><b class="check region6">First line in region 6.</b> This paragraph uses "<i>-webkit-region-break-before: always</i>".</div> |
| </p> |
| </div> |
| |
| <div id="region1" class="region"></div> |
| <div id="region2" class="region"></div> |
| <div id="region3" class="region"></div> |
| <div id="region4" class="region"></div> |
| <div id="region5" class="region"></div> |
| <div id="region6" class="region"></div> |
| |
| <script src="resources/helper.js"></script> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| document.body.offsetLeft; |
| document.getElementById('region1').style.height = "60px"; |
| document.getElementById('region2').style.height = "100px"; |
| document.getElementById('region3').style.height = "100px"; |
| document.getElementById('region4').style.height = "100px"; |
| document.getElementById('region5').style.height = "200px"; |
| document.getElementById('region6').style.height = "120px"; |
| document.body.offsetLeft; |
| if (testContentToRegionsMapping()) |
| document.body.className = "finished"; |
| </script> |