Index: third_party/WebKit/LayoutTests/fast/multicol/zero-height-with-children.html |
diff --git a/third_party/WebKit/LayoutTests/fast/multicol/zero-height-with-children.html b/third_party/WebKit/LayoutTests/fast/multicol/zero-height-with-children.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1eee8ba13465148e6cff71b693ea089e9a119d92 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/multicol/zero-height-with-children.html |
@@ -0,0 +1,31 @@ |
+<!DOCTYPE html> |
+<style> |
+ .multicol { position:relative; margin-bottom:1px; columns:5; width:20px; column-gap:0; column-fill:auto; height:0; background:red; } |
+ .multicol > div { height:1px; background:blue; } |
+</style> |
+<p>There should be a small blue square below.</p> |
+<div style="display:flow-root; position:relative;"> |
+ <div class="multicol"><div></div><div></div></div> |
+ <div class="multicol"><div></div><div></div></div> |
+ <div class="multicol"><div></div><div></div></div> |
+ <div class="multicol"><div></div><div></div></div> |
+ <div class="multicol"><div></div><div></div></div> |
+ <div class="multicol"><div></div><div></div></div> |
+ <div class="multicol"><div></div><div></div></div> |
+ <div class="multicol"><div></div><div></div></div> |
+</div> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
+ test(() => { |
+ var multicols = document.getElementsByClassName("multicol"); |
+ var offset = 0; |
+ for (var i = 0; i < multicols.length; i++) { |
+ var multicol = multicols[i]; |
+ assert_equals(multicol.firstChild.offsetLeft, 0); |
+ assert_equals(multicol.firstChild.nextSibling.offsetLeft, 4); |
+ assert_equals(multicol.offsetTop, offset); |
+ offset++; |
+ } |
+ }, "Zero-height multicol should force 1px tall columns"); |
+</script> |