| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <p> | |
| 3 This tests that layout overflow is computed correctly, even if the element | |
| 4 is not near the top-left corner of its ancestors and has visual overflow. | |
| 5 See crbug.com/254002. | |
| 6 </p> | |
| 7 <p id="result">PASS</p> | |
| 8 <div id="test"></div> | |
| 9 <script> | |
| 10 if (window.testRunner) | |
| 11 testRunner.dumpAsText(); | |
| 12 | |
| 13 document.getElementById('test').addEventListener('overflowchanged', function
(e) { | |
| 14 // This element has no children. How could it possibly have layout overf
low? | |
| 15 if (e.verticalOverflow || e.horizontalOverflow) | |
| 16 document.getElementById('result').innerHTML = 'FAIL'; | |
| 17 }, false /* capture */); | |
| 18 </script> | |
| 19 <style> | |
| 20 #test { | |
| 21 width: 100px; | |
| 22 height: 100px; | |
| 23 background: yellow; | |
| 24 overflow: hidden; | |
| 25 box-shadow: 0px 0px 0px 1px #000; /* causes visual overflow */ | |
| 26 } | |
| 27 </style> | |
| OLD | NEW |