Index: LayoutTests/fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-margin-change.html |
diff --git a/LayoutTests/fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-margin-change.html b/LayoutTests/fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-margin-change.html |
index e432c6666bd20bb3c09577342fd11c19d4cdf46c..e04bcec42dba2c4cc396e5960f41f33c56b5ed35 100644 |
--- a/LayoutTests/fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-margin-change.html |
+++ b/LayoutTests/fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-margin-change.html |
@@ -7,23 +7,32 @@ |
width: -webkit-fit-content; |
position: relative; |
} |
+#fromFixedWidth { width: 100px; } |
svillar
2015/07/10 14:00:52
Would it be possible to use a different value so t
jfernandez
2015/07/10 15:07:24
Done.
|
#fromFixedHeight { height: 100px; } |
#fromMarginAuto { margin: auto; } |
</style> |
-<p>The grids below had initially 'stretched' items, but we have changed 'height' and 'margin' to values which don't allow stretch. This test verifies that the layout algorithm properly detects such changes and clear the override height accordingly.</p> |
+<p>The grids below had initially 'stretched' items, but we have changed 'height', 'width' and 'margin' to values which don't allow stretch. This test verifies that the layout algorithm properly detects such changes and clear the override height accordingly.</p> |
<div class="grid"> |
- <div id="toFixedHeight" class="firstRowFirstColumn" data-expected-height="100"></div> |
- <div class="firstRowSecondColumn" data-expected-height="200"></div> |
- <div class="secondRowFirstColumn" data-expected-height="200"></div> |
- <div id="fromFixedHeight" class="secondRowSecondColumn" data-expected-height="200"></div> |
+ <div id="toFixedHeight" class="firstRowFirstColumn" data-expected-width="200" data-expected-height="100"></div> |
+ <div class="firstRowSecondColumn" data-expected-width="200" data-expected-height="200"></div> |
+ <div class="secondRowFirstColumn" data-expected-width="200" data-expected-height="200"></div> |
+ <div id="fromFixedHeight" class="secondRowSecondColumn" data-expected-width="200" data-expected-height="200"></div> |
</div> |
<div class="grid"> |
- <div id="toMarginAuto" class="firstRowFirstColumn" data-expected-height="100"> |
+ <div id="toFixedWidth" class="firstRowFirstColumn" data-expected-width="100" data-expected-height="200"></div> |
+ <div class="firstRowSecondColumn" data-expected-width="200" data-expected-height="200"></div> |
+ <div class="secondRowFirstColumn" data-expected-width="200" data-expected-height="200"></div> |
+ <div id="fromFixedWidth" class="secondRowSecondColumn" data-expected-width="200" data-expected-height="200"></div> |
+</div> |
+<div class="grid"> |
+ <div id="toMarginAuto" class="firstRowFirstColumn" data-expected-width="100" data-expected-height="100"> |
+ <div style="width: 100px"></div> |
<div style="height: 100px"></div> |
</div> |
- <div class="firstRowSecondColumn" data-expected-height="200"></div> |
- <div class="secondRowFirstColumn" data-expected-height="200"></div> |
- <div id="fromMarginAuto" class="secondRowSecondColumn" data-expected-height="200"> |
+ <div class="firstRowSecondColumn" data-expected-width="200" data-expected-height="200"></div> |
+ <div class="secondRowFirstColumn" data-expected-width="200" data-expected-height="200"></div> |
+ <div id="fromMarginAuto" class="secondRowSecondColumn" data-expected-width="200" data-expected-height="200"> |
+ <div style="width: 100px"></div> |
<div style="height: 100px"></div> |
</div> |
</div> |
@@ -31,6 +40,8 @@ |
document.body.offsetLeft; |
document.getElementById("fromFixedHeight").style.height = "auto"; |
document.getElementById("toFixedHeight").style.height = "100px"; |
+document.getElementById("fromFixedWidth").style.width = "auto"; |
+document.getElementById("toFixedWidth").style.width = "100px"; |
document.getElementById("fromMarginAuto").style.margin = "0"; |
document.getElementById("toMarginAuto").style.margin = "auto"; |
checkLayout(".grid"); |