OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <style> | |
3 #container { | |
mstensho (USE GERRIT)
2015/12/11 14:24:30
Is that a tab I see?
| |
4 float: right; | |
5 } | |
6 #canvas{ | |
mstensho (USE GERRIT)
2015/12/11 14:24:31
The ID selector #canvas ends up matching two eleme
| |
7 display: table-cell; | |
mstensho (USE GERRIT)
2015/12/11 14:24:31
display:block would hurt less in my brain.
| |
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 id="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 canvas = document.getElementById("canvas") | |
22 var pre = document.getElementById("pre") | |
23 | |
24 // Make the pre element have inline children. | |
mstensho (USE GERRIT)
2015/12/11 14:24:31
"Block children". That's what you're fixing here,
| |
25 pre.appendChild(canvas.cloneNode()); | |
26 // Change the pre element so that it is now inline and folds into an adj acent anonymous block. | |
mstensho (USE GERRIT)
2015/12/11 14:24:31
It certainly doesn't become inline. It just become
| |
27 pre.style.position = 'absolute'; | |
28 // Destroy the float that should no longer be in the pre's float lists. | |
29 document.getElementById("container").style.display = "table"; | |
mstensho (USE GERRIT)
2015/12/11 14:24:30
This triggers a re-attach. display = "none" is als
| |
30 // Re-compute style, but don't layout. (Layout would rebuild float lists and avoid a crash.) | |
31 getComputedStyle(pre).color; | |
32 // Prompt the canvas to access the float destroyed above if it hasn't be en removed from pre's float lists. | |
33 document.body.style.zoom=0.50 | |
34 </script> | |
OLD | NEW |