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

Unified Diff: third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html

Issue 2176533002: [css-grid] Implementing stretch alignment in orthogonal flows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applied suggested changes. Created 4 years, 5 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html
diff --git a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html
new file mode 100644
index 0000000000000000000000000000000000000000..0d84c53a9612db940bfd06fb26c125356b4085b0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html
@@ -0,0 +1,119 @@
+<!DOCTYPE html>
+<link href="resources/grid.css" rel="stylesheet">
+<link href="resources/grid-alignment.css" rel="stylesheet">
+<link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel="stylesheet">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/check-layout-th.js"></script>
+<style>
+body {
+ margin: 0;
+}
+.container {
+ position: relative;
+}
+.grid {
+ grid-template-columns: 100px 100px;
+ grid-template-rows: 150px 150px;
+ font: 10px/1 ahem;
+}
+.widthAndHeightSet {
+ width: 20px;
+ height: 40px;
+}
+.onlyWidthSet { width: 20px; }
+.onlyHeightSet { height: 40px; }
+.maxHeight { max-height: 160px; }
+.maxWidth { max-width: 90px; }
+.minWidth { min-width: 120px; }
+.minHeight { min-height: 220px; }
+.topAutoMargin { margin-top: auto; }
+.bottomAutoMargin { margin-bottom: auto; }
+.leftAutoMargin { margin-left: auto; }
+.rightAutoMargin { margin-right: auto; }
+</style>
+<body onload="checkLayout('.grid')">
+<div id="log"></div>
+<p>This test checks that stretching alignment works as expected with orthogonal flows.</p>
+
+<p>HORIZONTAL vs VERTICAL-RL</p>
+<p><b>row1/col1:</b> fixed width and height - <b>row1/col2:</b> fixed width and auto height - <b>row2/col1:</b> auto width and fixed height - <b>row2/col2:</b> auto width and height, but start.</p>
+<div class="container">
+ <div class="grid fit-content" data-expected-width="200" data-expected-height="300">
+ <div class="verticalRL firstRowFirstColumn selfStretch widthAndHeightSet " data-expected-width="20" data-expected-height="40">XXX</div>
+ <div class="verticalRL firstRowSecondColumn sefStretch onlyWidthSet " data-expected-width="20" data-expected-height="150">XXX</div>
+ <div class="verticalRL secondRowFirstColumn selfStretch onlyHeightSet " data-expected-width="100" data-expected-height="40">XXX</div>
+ <div class="verticalRL secondRowSecondColumn selfSelfStart " data-expected-width="10" data-expected-height="30">XXX</div>
+ </div>
+</div>
+<p><b>row1/co1l:</b> bottom auto margin - <b>row1/col2:</b> left auto margin - <b>row2/col1:</b> top auto margin - <b>row2/col2:</b> right auto margin.</p>
+<div class="container">
+ <div class="grid fit-content" data-expected-width="200" data-expected-height="300">
+ <div class="verticalRL firstRowFirstColumn selfStretch bottomAutoMargin " data-expected-width="100" data-expected-height="30">XXX</div>
+ <div class="verticalRL firstRowSecondColumn seffStretch leftAutoMargin " data-expected-width="10" data-expected-height="150">XXX</div>
+ <div class="verticalRL secondRowFirstColumn selffStretch topAutoMargin " data-expected-width="100" data-expected-height="30">XXX</div>
+ <div class="verticalRL secondRowSecondColumn selffStretch rightAutoMargin " data-expected-width="10" data-expected-height="150">XXX</div>
+ </div>
+</div>
+
+<p>HORIZONTAL vs VERTICAL-LR</p>
+<p><b>row1/col1:</b> fixed width and height - <b>row1/col2:</b> fixed width and auto height - <b>row2/col1:</b> auto width and fixed height - <b>row2/col2:</b> auto width and height, but start.</p>
+<div class="container">
+ <div class="grid fit-content" data-expected-width="200" data-expected-height="300">
+ <div class="verticalLR firstRowFirstColumn selfStretch widthAndHeightSet " data-expected-width="20" data-expected-height="40">XXX</div>
+ <div class="verticalLR firstRowSecondColumn sefStretch onlyWidthSet " data-expected-width="20" data-expected-height="150">XXX</div>
+ <div class="verticalLR secondRowFirstColumn selfStretch onlyHeightSet " data-expected-width="100" data-expected-height="40">XXX</div>
+ <div class="verticalLR secondRowSecondColumn selfSelfStart " data-expected-width="10" data-expected-height="30">XXX</div>
+ </div>
+</div>
+<p><b>row1/co1l:</b> bottom auto margin - <b>row1/col2:</b> left auto margin - <b>row2/col1:</b> top auto margin - <b>row2/col2:</b> right auto margin.</p>
+<div class="container">
+ <div class="grid fit-content" data-expected-width="200" data-expected-height="300">
+ <div class="verticalLR firstRowFirstColumn selfStretch bottomAutoMargin " data-expected-width="100" data-expected-height="30">XXX</div>
+ <div class="verticalLR firstRowSecondColumn seffStretch leftAutoMargin " data-expected-width="10" data-expected-height="150">XXX</div>
+ <div class="verticalLR secondRowFirstColumn selffStretch topAutoMargin " data-expected-width="100" data-expected-height="30">XXX</div>
+ <div class="verticalLR secondRowSecondColumn selffStretch rightAutoMargin " data-expected-width="10" data-expected-height="150">XXX</div>
+ </div>
+</div>
+
+<p>VERTICAL-RL vs HORIZONTAL</p>
+<p><b>row1/col1:</b> fixed width and height - <b>row1/col2:</b> fixed width and auto height - <b>row2/col1:</b> auto width and fixed height - <b>row2/col2:</b> auto width and height, but start.</p>
+<div class="container">
+ <div class="grid fit-content verticalRL" data-expected-width="300" data-expected-height="200">
+ <div class="horizonalTB firstRowFirstColumn selfStretch widthAndHeightSet " data-expected-width="20" data-expected-height="40">XXX</div>
+ <div class="horizonalTB firstRowSecondColumn sefStretch onlyWidthSet " data-expected-width="20" data-expected-height="100">XXX</div>
+ <div class="horizonalTB secondRowFirstColumn selfStretch onlyHeightSet " data-expected-width="150" data-expected-height="40">XXX</div>
+ <div class="horizonalTB secondRowSecondColumn selfSelfStart " data-expected-width="10" data-expected-height="30">XXX</div>
+ </div>
+</div>
+<p><b>row1/co1l:</b> bottom auto margin - <b>row1/col2:</b> left auto margin - <b>row2/col1:</b> top auto margin - <b>row2/col2:</b> right auto margin.</p>
+<div class="container">
+ <div class="grid fit-content verticalRL" data-expected-width="300" data-expected-height="200">
+ <div class="horizonalTB firstRowFirstColumn selfStretch bottomAutoMargin " data-expected-width="150" data-expected-height="30">XXX</div>
+ <div class="horizonalTB firstRowSecondColumn seffStretch leftAutoMargin " data-expected-width="10" data-expected-height="100">XXX</div>
+ <div class="horizonalTB secondRowFirstColumn selffStretch topAutoMargin " data-expected-width="150" data-expected-height="30">XXX</div>
+ <div class="horizonalTB secondRowSecondColumn selffStretch rightAutoMargin " data-expected-width="10" data-expected-height="100">XXX</div>
+ </div>
+</div>
+
+<p>VERTICAL-LR vs HORIZONTAL</p>
+<p><b>row1/col1:</b> fixed width and height - <b>row1/col2:</b> fixed width and auto height - <b>row2/col1:</b> auto width and fixed height - <b>row2/col2:</b> auto width and height, but start.</p>
+<div class="container">
+ <div class="grid fit-content verticalLR" data-expected-width="300" data-expected-height="200">
+ <div class="horizonalTB firstRowFirstColumn selfStretch widthAndHeightSet " data-expected-width="20" data-expected-height="40">XXX</div>
+ <div class="horizonalTB firstRowSecondColumn sefStretch onlyWidthSet " data-expected-width="20" data-expected-height="100">XXX</div>
+ <div class="horizonalTB secondRowFirstColumn selfStretch onlyHeightSet " data-expected-width="150" data-expected-height="40">XXX</div>
+ <div class="horizonalTB secondRowSecondColumn selfSelfStart " data-expected-width="10" data-expected-height="30">XXX</div>
+ </div>
+</div>
+<p><b>row1/co1l:</b> bottom auto margin - <b>row1/col2:</b> left auto margin - <b>row2/col1:</b> top auto margin - <b>row2/col2:</b> right auto margin.</p>
+<div class="container">
+ <div class="grid fit-content verticalLR" data-expected-width="300" data-expected-height="200">
+ <div class="horizonalTB firstRowFirstColumn selfStretch bottomAutoMargin " data-expected-width="150" data-expected-height="30">XXX</div>
+ <div class="horizonalTB firstRowSecondColumn seffStretch leftAutoMargin " data-expected-width="10" data-expected-height="100">XXX</div>
+ <div class="horizonalTB secondRowFirstColumn selffStretch topAutoMargin " data-expected-width="150" data-expected-height="30">XXX</div>
+ <div class="horizonalTB secondRowSecondColumn selffStretch rightAutoMargin " data-expected-width="10" data-expected-height="100">XXX</div>
+ </div>
+</div>
+
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698