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

Unified Diff: third_party/WebKit/LayoutTests/fragmentation/become-unfragmented-with-float.html

Issue 2512163002: Force re-layout of a float when we just became unfragmented. (Closed)
Patch Set: Created 4 years, 1 month 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/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fragmentation/become-unfragmented-with-float.html
diff --git a/third_party/WebKit/LayoutTests/fragmentation/become-unfragmented-with-float.html b/third_party/WebKit/LayoutTests/fragmentation/become-unfragmented-with-float.html
new file mode 100644
index 0000000000000000000000000000000000000000..546ffa31ec77f21c3cb980913948a36264a0ac34
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fragmentation/become-unfragmented-with-float.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<p>There should be green square below, and no red.</p>
+<div id="multicol" style="position:relative; columns:2; column-fill:auto; height:60px; line-height:20px;">
+ <div style="width:40px;">
+ <div>
+ <div style="height:30px;"></div>
+ <div id="floater" style="float:left; width:100%; orphans:1; widows:1; background:red;">
+ <div id="child1" style="background:green;"><br></div>
+ <div id="child2" style="background:green;"><br></div>
+ </div>
+ </div>
+ </div>
+</div>
+<div style="clear:both;"></div>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+test(() => {
+ var multicol = document.getElementById("multicol");
+ var floater = document.getElementById("floater");
+ var child1 = document.getElementById("child1");
+ var child2 = document.getElementById("child2");
+ document.body.offsetTop;
+ multicol.style.columns = "auto";
+ multicol.style.height = "auto";
+ assert_equals(floater.offsetTop, 30);
+ assert_equals(child1.offsetTop, 30);
+ assert_equals(child1.offsetHeight, 20);
+ assert_equals(child2.offsetTop, 50);
+ assert_equals(child2.offsetHeight, 20);
+ assert_equals(floater.offsetHeight, 40);
+}, "Become unfragmented with float at fragmentainer boundary");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698