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

Unified Diff: third_party/WebKit/LayoutTests/fragmentation/overflow-crossing-boundary.html

Issue 2462643002: Be more restrictive about forcing relayout of children for pagination. (Closed)
Patch Set: No need to call updateFragmentationInfoForChild() when not paginated. Created 4 years, 2 months 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
Index: third_party/WebKit/LayoutTests/fragmentation/overflow-crossing-boundary.html
diff --git a/third_party/WebKit/LayoutTests/fragmentation/overflow-crossing-boundary.html b/third_party/WebKit/LayoutTests/fragmentation/overflow-crossing-boundary.html
new file mode 100644
index 0000000000000000000000000000000000000000..1795f9c2fd7cb239d707d6a23c5704361fa83e50
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fragmentation/overflow-crossing-boundary.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<div id="multicol" style="position:relative; columns:2; column-fill:auto; line-height:20px; orphans:1; widows:1; background:yellow;">
+ <div style="width:4em;">
+ <div style="height:20px; background:hotpink;"></div>
+ <div style="height:15px;">
+ <div id="child1">line</div>
+ <div id="child2">line</div>
+ <div id="child3">line</div>
+ <div id="child4">line</div>
+ <div id="child5">line</div>
+ </div>
+ </div>
+</div>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+test(() => {
+ var multicol = document.getElementById("multicol");
+ var child1 = document.getElementById("child1");
+ var child2 = document.getElementById("child2");
+ var child3 = document.getElementById("child3");
+ var child4 = document.getElementById("child4");
+ var child5 = document.getElementById("child5");
+
+ assert_equals(child1.offsetTop, 20);
+ assert_equals(child2.offsetTop, 40);
+ assert_equals(child3.offsetTop, 0);
+ assert_equals(child4.offsetTop, 20);
+ assert_equals(child5.offsetTop, 40);
+
+ multicol.style.height = "90px";
+ assert_equals(child3.offsetTop, 60);
+ assert_equals(child4.offsetTop, 0);
+ assert_equals(child5.offsetTop, 20);
+
+ multicol.style.height = "80px";
+ assert_equals(child3.offsetTop, 60);
+ assert_equals(child4.offsetTop, 0);
+ assert_equals(child5.offsetTop, 20);
+
+ multicol.style.height = "110px";
+ assert_equals(child3.offsetTop, 60);
+ assert_equals(child4.offsetTop, 80);
+ assert_equals(child5.offsetTop, 0);
+
+ multicol.style.height = "200px";
+ assert_equals(child3.offsetTop, 60);
+ assert_equals(child4.offsetTop, 80);
+ assert_equals(child5.offsetTop, 100);
+
+ multicol.style.height = "100px";
+ assert_equals(child3.offsetTop, 60);
+ assert_equals(child4.offsetTop, 80);
+ assert_equals(child5.offsetTop, 0);
+
+}, "Overflow should also be fragmented.");
+</script>

Powered by Google App Engine
This is Rietveld 408576698