| 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 #article { | |
| 8 -webkit-flow-into: article; | |
| 9 height: 150px; | |
| 10 width: 50px; | |
| 11 background-color: green; | |
| 12 } | |
| 13 | |
| 14 #region_1 { | |
| 15 position: absolute; | |
| 16 top:200px; | |
| 17 left: 100px; | |
| 18 } | |
| 19 | |
| 20 #region_1::before { | |
| 21 display: block; | |
| 22 width: 50px; | |
| 23 height: 50px; | |
| 24 border: 1px solid black; | |
| 25 -webkit-flow-from: article; | |
| 26 } | |
| 27 | |
| 28 #region_1::after { | |
| 29 display: block; | |
| 30 width: 50px; | |
| 31 height: 50px; | |
| 32 border: 1px solid black; | |
| 33 -webkit-flow-from: article; | |
| 34 } | |
| 35 | |
| 36 #region_2 { | |
| 37 -webkit-flow-from: article; | |
| 38 height:50px; | |
| 39 width:50px; | |
| 40 position: absolute; | |
| 41 top: 200px; | |
| 42 left: 200px; | |
| 43 border: 1px solid black; | |
| 44 } | |
| 45 </style> | |
| 46 </head> | |
| 47 <body> | |
| 48 <!-- | |
| 49 Test that the pseudo-elements regions are not exposed to JS. | |
| 50 --> | |
| 51 <div id="article"></div> | |
| 52 | |
| 53 <div id="region_1"></div> | |
| 54 <div id="region_2"></div> | |
| 55 <script> | |
| 56 if (window.testRunner) | |
| 57 testRunner.dumpAsText(); | |
| 58 description("Tests WebKitNamedFlow.getRegionsByContent() and pseudo-
elements as regions") | |
| 59 | |
| 60 var namedFlow = getFlowByName("article"); | |
| 61 var targetNode = document.getElementById("article"); | |
| 62 var regionList = namedFlow.getRegionsByContent(targetNode); | |
| 63 | |
| 64 shouldEvaluateTo("regionList.length", 1); | |
| 65 shouldBeEqualToString("regionList.item(0).id", "region_2"); | |
| 66 | |
| 67 document.getElementById("article").style.visibility = "hidden"; | |
| 68 document.getElementById("region_1").style.visibility = "hidden"; | |
| 69 document.getElementById("region_2").style.visibility = "hidden"; | |
| 70 </script> | |
| 71 </body> | |
| 72 </html> | |
| OLD | NEW |