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

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

Issue 1513303005: Clear child's floats when moving from parent with block children to parent with inline children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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-3-expected.txt » ('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-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..d98ea1e4f782de58d75dfad09d84d9bc364f8d9d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent-3.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<style>
+#container {
+ float: right;
+}
+canvas{
+ display: block;
+}
+</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></canvas>
+</div>
+<pre id="pre"></pre>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ document.body.offsetTop;
+ var pre = document.getElementById("pre")
+
+ // Make the pre element have block children.
+ pre.appendChild(document.createElement("canvas"));
+ // Change the pre element so that it is now out-of-flow and folds into an adjacent anonymous block.
+ pre.style.position = 'absolute';
+ // Destroy the float that should no longer be in the pre's float lists.
+ document.getElementById("container").style.display = "none";
+ // 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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/block/float/clear-intruding-floats-when-moving-to-inline-parent-3-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698