Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../../resources/js-test.js"></script> | |
|
mstensho (USE GERRIT)
2015/12/07 21:14:44
I asked in my previous batch of comments, but got
rhogan
2015/12/08 18:15:44
OK. Done!
| |
| 3 <div></div> | |
| 4 <span></span> | |
| 5 <div id="killMe" style="float:right; width:100px; height:100px;"></div> | |
| 6 <div id="container"> | |
| 7 <canvas id="canvas" style="display:block;"></canvas> | |
| 8 </div> | |
| 9 <script> | |
| 10 // Trigger layout. | |
| 11 document.body.offsetTop; | |
| 12 | |
| 13 // Delete the float. | |
| 14 document.getElementById("killMe").style.display = "none"; | |
| 15 | |
| 16 // Take it out of normal flow and establish a new block formatting | |
| 17 // context, so that the preceding float (which no longer exists, by | |
| 18 // the way) can no longer intrude. Not being in normal flow anymore | |
| 19 // also means that it can be moved into an adjacent anonymous block if | |
| 20 // one exists. | |
| 21 document.getElementById("container").style.position = 'absolute'; | |
| 22 | |
| 23 // Trigger style recalculation, but NOT layout. | |
| 24 getComputedStyle(document.getElementById("container")).color; | |
| 25 | |
| 26 // When zoom changes, LayoutReplaced::styleDidChange() will call | |
| 27 // intrinsicSizeChanged(), which will do an out-of-course layout on the canv as element. | |
| 28 document.getElementById("canvas").style.zoom = 0.50; | |
| 29 testPassed("crbug.com/562208: Clear intruding floats when moving child to in line parent. Passes if it doesn't crash."); | |
| 30 </script> | |
| OLD | NEW |