Index: third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent-3.html |
diff --git a/third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent-3.html b/third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent-3.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0cc8307553a032ce4f911ded364d4280e8010dec |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent-3.html |
@@ -0,0 +1,34 @@ |
+<!DOCTYPE html> |
+<style> |
+ #container { |
mstensho (USE GERRIT)
2015/12/11 14:24:30
Is that a tab I see?
|
+ float: right; |
+ } |
+ #canvas{ |
mstensho (USE GERRIT)
2015/12/11 14:24:31
The ID selector #canvas ends up matching two eleme
|
+ display: table-cell; |
mstensho (USE GERRIT)
2015/12/11 14:24:31
display:block would hurt less in my brain.
|
+ } |
+</style> |
+<li></li> |
+crbug.com/568744: Ensure an element's floats are cleared when it becomes inline. This test shouldn't crash. |
+<div id="container"> |
+ <canvas id="canvas"></canvas> |
+</div> |
+<pre id="pre"></pre> |
+<script> |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+ document.body.offsetTop; |
+ var canvas = document.getElementById("canvas") |
+ var pre = document.getElementById("pre") |
+ |
+ // 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,
|
+ pre.appendChild(canvas.cloneNode()); |
+ // Change the pre element so that it is now inline and folds into an adjacent anonymous block. |
mstensho (USE GERRIT)
2015/12/11 14:24:31
It certainly doesn't become inline. It just become
|
+ pre.style.position = 'absolute'; |
+ // Destroy the float that should no longer be in the pre's float lists. |
+ document.getElementById("container").style.display = "table"; |
mstensho (USE GERRIT)
2015/12/11 14:24:30
This triggers a re-attach. display = "none" is als
|
+ // Re-compute style, but don't layout. (Layout would rebuild float lists and avoid a crash.) |
+ getComputedStyle(pre).color; |
+ // Prompt the canvas to access the float destroyed above if it hasn't been removed from pre's float lists. |
+ document.body.style.zoom=0.50 |
+</script> |