Index: LayoutTests/fast/css-grid-layout/relayout-align-items-changed.html |
diff --git a/LayoutTests/fast/css-grid-layout/relayout-align-items-changed.html b/LayoutTests/fast/css-grid-layout/relayout-align-items-changed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..559f9fca0d6567e39e7af14ad9d6931705e67e21 |
--- /dev/null |
+++ b/LayoutTests/fast/css-grid-layout/relayout-align-items-changed.html |
@@ -0,0 +1,36 @@ |
+<!DOCTYPE HTML> |
+<link href="resources/grid.css" rel="stylesheet"> |
+<style> |
+.grid { |
+ grid: 100px 100px / 150px; |
+ position: relative; |
+} |
+#fromStretch { align-items: stretch; } |
+#toStretch { align-items: end; } |
+</style> |
+<script src="../../resources/check-layout.js"></script> |
+<p>Tests how a align-items style change requires a relayout of the grid and previously stretched items.</p> |
+<p>The grid bellow had initially 'align-items: end' and was changed to 'stretch'.</p> |
+<div id="toStretch" class="grid"> |
+ <div style="width: 50px;" class="firstRowFirstColumn" data-expected-height="150" data-offset-y="0"> |
+ <div style="height: 50px"></div> |
+ </div> |
+ <div style="width: 50px;" class="firstRowSecondColumn" data-expected-height="150" data-offset-y="0"> |
+ <div style="height: 100px"></div> |
+ </div> |
+</div> |
+<p>The grid bellow was initially stretched and it has now 'align-items: center'.</p> |
+<div id="fromStretch" class="grid"> |
+ <div style="width: 50px;" class="firstRowFirstColumn" data-expected-height="50" data-offset-y="50"> |
+ <div style="height: 50px"></div> |
+ </div> |
+ <div style="width: 50px;" class="firstRowSecondColumn" data-expected-height="100" data-offset-y="25"> |
+ <div style="height: 100px"></div> |
+ </div> |
+</div> |
+<script> |
+document.body.offsetLeft; |
+document.getElementById("toStretch").style.alignItems = "stretch"; |
+document.getElementById("fromStretch").style.alignItems = "center"; |
+checkLayout(".grid"); |
+</script> |