| <!DOCTYPE html> |
| <script src="../../../resources/js-test.js"></script> |
| <div></div> |
| <span></span> |
| <div id="killMe" style="float:right; width:100px; height:100px;"></div> |
| <div id="container"> |
| <canvas id="canvas" style="display:block;"></canvas> |
| </div> |
| <script> |
| // Trigger layout. |
| document.body.offsetTop; |
| |
| // Delete the float. |
| document.getElementById("killMe").style.display = "none"; |
| |
| // Take it out of normal flow and establish a new block formatting |
| // context, so that the preceding float (which no longer exists, by |
| // the way) can no longer intrude. Not being in normal flow anymore |
| // also means that it can be moved into an adjacent anonymous block if |
| // one exists. |
| document.getElementById("container").style.position = 'absolute'; |
| |
| // Trigger style recalculation, but NOT layout. |
| getComputedStyle(document.getElementById("container")).color; |
| |
| // When zoom changes, LayoutReplaced::styleDidChange() will call |
| // intrinsicSizeChanged(), which will do an out-of-course layout on the canvas element. |
| document.getElementById("canvas").style.zoom = 0.50; |
| testPassed("crbug.com/562208: Clear intruding floats when moving child to inline parent. Passes if it doesn't crash."); |
| </script> |