zalan@apple.com | a1b94ad | 2014-12-14 06:44:28 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>This tests that fixed positioned pseudo content gets composited.</title> |
| 5 | <style> |
| 6 | .pseudo_content:before { |
| 7 | background: blue; |
| 8 | content: "foobar before content"; |
| 9 | display: block; |
| 10 | position: fixed; |
| 11 | top: 0px; |
| 12 | left: 0px; |
| 13 | } |
| 14 | |
| 15 | .pseudo_content:after { |
| 16 | background: green; |
| 17 | content: "foobar after content"; |
| 18 | display: block; |
| 19 | position: fixed; |
| 20 | top: 100px; |
| 21 | left: 0px; |
| 22 | } |
| 23 | </style> |
| 24 | <script> |
| 25 | if (window.internals) |
| 26 | window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(true); |
| 27 | |
| 28 | if (window.testRunner) |
| 29 | testRunner.dumpAsText(); |
| 30 | |
| 31 | if (window.internals) { |
| 32 | window.addEventListener("load", function() { |
| 33 | document.getElementById("layerTree").innerText = window.internals.layerTreeAsText(document); |
| 34 | }, false); |
| 35 | } |
| 36 | </script> |
| 37 | </head> |
| 38 | <body> |
| 39 | <div class=pseudo_content></div> |
| 40 | <pre id=layerTree></pre> |
| 41 | </body> |
| 42 | </html> |