OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 #container { |
| 4 float: right; |
| 5 } |
| 6 canvas{ |
| 7 display: block; |
| 8 } |
| 9 </style> |
| 10 <li></li> |
| 11 crbug.com/568744: Ensure an element's floats are cleared when it becomes inline.
This test shouldn't crash. |
| 12 <div id="container"> |
| 13 <canvas></canvas> |
| 14 </div> |
| 15 <pre id="pre"></pre> |
| 16 <script> |
| 17 if (window.testRunner) |
| 18 testRunner.dumpAsText(); |
| 19 |
| 20 document.body.offsetTop; |
| 21 var pre = document.getElementById("pre") |
| 22 |
| 23 // Make the pre element have block children. |
| 24 pre.appendChild(document.createElement("canvas")); |
| 25 // Change the pre element so that it is now out-of-flow and folds into an ad
jacent anonymous block. |
| 26 pre.style.position = 'absolute'; |
| 27 // Destroy the float that should no longer be in the pre's float lists. |
| 28 document.getElementById("container").style.display = "none"; |
| 29 // Re-compute style, but don't layout. (Layout would rebuild float lists and
avoid a crash.) |
| 30 getComputedStyle(pre).color; |
| 31 // Prompt the canvas to access the float destroyed above if it hasn't been r
emoved from pre's float lists. |
| 32 document.body.style.zoom=0.50 |
| 33 </script> |
OLD | NEW |