Index: LayoutTests/fast/css-grid-layout/grid-item-margin-resolution.html |
diff --git a/LayoutTests/fast/css-grid-layout/grid-item-margin-resolution.html b/LayoutTests/fast/css-grid-layout/grid-item-margin-resolution.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b63ca80c9c0ae143590cb4290192a4c5400117af |
--- /dev/null |
+++ b/LayoutTests/fast/css-grid-layout/grid-item-margin-resolution.html |
@@ -0,0 +1,97 @@ |
+<!DOCTYPE html> |
+<html> |
+<script src="../../resources/check-layout.js"></script> |
+<link href="resources/grid.css" rel="stylesheet"> |
+<style> |
+.grid { |
+ grid-definition-rows: 100px 100px; |
+ grid-definition-columns: 100px 100px; |
+ width: 200px; |
+} |
+ |
+.gridItem { |
+ margin: 20px 30px 40px 50px; |
+ width: 20px; |
+ height: 40px; |
+} |
+</style> |
+</head> |
+<body onload="checkLayout('.grid')"> |
+ |
+<div>This test checks that the grid items are shifted by theirs before and start margins inside their grid area.</div> |
+ |
+<div style="position: relative"> |
+ <div class="grid" data-expected-width="200" data-expected-height="200"> |
+ <div class="gridItem firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem firstRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <div class="grid verticalRL" data-expected-width="200" data-expected-height="200"> |
+ <div class="gridItem firstRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <div class="grid verticalLR" data-expected-width="200" data-expected-height="200"> |
+ <div class="gridItem firstRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem firstRowSecondColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowFirstColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <div class="grid horizontalBT" data-expected-width="200" data-expected-height="200"> |
+ <div class="gridItem firstRowFirstColumn" data-offset-x="50" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem firstRowSecondColumn" data-offset-x="150" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowFirstColumn" data-offset-x="50" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowSecondColumn" data-offset-x="150" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ </div> |
+</div> |
+ |
+<!-- rtl direction --> |
+<div style="position: relative"> |
+ <div class="grid directionRTL" data-expected-width="200" data-expected-height="200"> |
+ <div class="gridItem firstRowFirstColumn" data-offset-x="30" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem firstRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowFirstColumn" data-offset-x="30" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <div class="grid verticalRL directionRTL" data-expected-width="200" data-expected-height="200"> |
+ <div class="gridItem firstRowFirstColumn" data-offset-x="150" data-offset-y="40" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem firstRowSecondColumn" data-offset-x="150" data-offset-y="140" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowFirstColumn" data-offset-x="50" data-offset-y="40" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="20" data-expected-height="40"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <div class="grid verticalLR directionRTL" data-expected-width="200" data-expected-height="200"> |
+ <div class="gridItem firstRowFirstColumn" data-offset-x="50" data-offset-y="40" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem firstRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowFirstColumn" data-offset-x="150" data-offset-y="40" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowSecondColumn" data-offset-x="150" data-offset-y="140" data-expected-width="20" data-expected-height="40"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <div class="grid horizontalBT directionRTL" data-expected-width="200" data-expected-height="200"> |
+ <div class="gridItem firstRowFirstColumn" data-offset-x="30" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem firstRowSecondColumn" data-offset-x="130" data-offset-y="120" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowFirstColumn" data-offset-x="30" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ <div class="gridItem secondRowSecondColumn" data-offset-x="130" data-offset-y="20" data-expected-width="20" data-expected-height="40"></div> |
+ </div> |
+</div> |
+ |
+</body> |
+</html> |