| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| #red { position: absolute; background-color: red; width: 50px; height: 50px; top: 100px; left: 50px; } |
| #region { -webkit-flow-from: flow; position: absolute; top: 100px; left: 100px; width: 200px; height: 200px; } |
| #target { -webkit-flow-into: flow; width: 50px; height: 50px; background-color: green; top: 100px; left: 50px; position: absolute; z-index: 0; } |
| </style> |
| <script src="../repaint/resources/text-based-repaint.js"></script> |
| </head> |
| <body onload="runRepaintTest()"> |
| <!-- |
| Test for WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=111176 |
| Test that an absolute positioned element, collected into a named flow, that has its position changed to fixed, |
| is positioned relative to the viewport instead of the region. |
| On success, you should see a green rectangle below. |
| --> |
| <div id="red"></div> |
| <div id="target"></div> |
| <div id="region"></div> |
| <script> |
| function repaintTest() { |
| document.getElementById("target").style.position = "fixed"; |
| } |
| </script> |
| </body> |
| </html> |