Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2281)

Unified Diff: third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent.html

Issue 1495033002: Clear intruding floats when moving child to inline parent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@558405-5
Patch Set: Updated Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent-2.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent.html
diff --git a/third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent.html b/third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent.html
new file mode 100644
index 0000000000000000000000000000000000000000..dcd6240e8e3a9810dc0c89458d717943c7bdc886
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent.html
@@ -0,0 +1,30 @@
+<!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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent-2.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698