[email protected] | 30afcc0 | 2013-08-22 17:39:48 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>absolute positioned element with large negative top value inside tall relative positioned box does not render scrollbars</title> |
| 5 | <style> |
| 6 | body, p{ |
| 7 | margin:0; |
| 8 | } |
| 9 | div{ |
| 10 | position: relative; |
| 11 | height:3000px; |
| 12 | } |
| 13 | span{ |
| 14 | position: absolute; |
| 15 | top:-3355400000px; |
| 16 | } |
| 17 | </style> |
| 18 | <script> |
| 19 | if (window.testRunner) { |
| 20 | testRunner.dumpAsText(); |
| 21 | } |
| 22 | |
| 23 | function test() { |
[email protected] | dba90d54 | 2015-05-20 17:07:48 | [diff] [blame] | 24 | var height = document.scrollingElement.scrollHeight; |
[email protected] | 30afcc0 | 2013-08-22 17:39:48 | [diff] [blame] | 25 | if (height == 3000) |
| 26 | document.getElementById("result").innerHTML = "PASS"; |
| 27 | else |
[email protected] | dba90d54 | 2015-05-20 17:07:48 | [diff] [blame] | 28 | document.getElementById("result").innerHTML = "<p style='color:red'>FAIL document.scrollingElement.scrollHeight = " + height +"</p>"; |
[email protected] | 30afcc0 | 2013-08-22 17:39:48 | [diff] [blame] | 29 | } |
| 30 | </script> |
| 31 | </head> |
| 32 | |
| 33 | <body onload="test()"> |
| 34 | <div> |
| 35 | <p> This page should be scrollable </p> |
| 36 | <p id="result"> </p> |
| 37 | <span style="visibility:hidden">filler <!--abs pos with very large negative top value--></span> |
| 38 | </div> |
| 39 | |
| 40 | </body> |
| 41 | </html> |