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

Unified Diff: third_party/WebKit/LayoutTests/fragmentation/float-margin-top.html

Issue 2479483002: Properly avoid breaking inside a float's top margin. (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
Index: third_party/WebKit/LayoutTests/fragmentation/float-margin-top.html
diff --git a/third_party/WebKit/LayoutTests/fragmentation/float-margin-top.html b/third_party/WebKit/LayoutTests/fragmentation/float-margin-top.html
new file mode 100644
index 0000000000000000000000000000000000000000..a372733bb40d7b5978b484b0a540e0157fd0aa52
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fragmentation/float-margin-top.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<p>There should be a hotpink square in the bottom right corner of a black square.</p>
+<div style="position:relative; columns:2; column-gap:0; column-fill:auto; width:100px; height:100px; background:black;">
+ <div style="height:60px;"></div>
+ <div id="elm" style="float:left; margin-top:50px; width:100%; height:50px; background:hotpink;"></div>
+</div>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+test(() => {
+ var elm = document.getElementById("elm");
+ assert_equals(elm.offsetTop, 50);
+ assert_equals(elm.offsetLeft, 50);
+}, "Should not split the top margin of a float.");
+</script>

Powered by Google App Engine
This is Rietveld 408576698