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

Unified Diff: LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution.html

Issue 18516007: Add support for 'order' on grid items (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Squashed the 2 constructors per Ojan's review comment Created 7 years, 6 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 | LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution.html
diff --git a/LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution.html b/LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution.html
new file mode 100644
index 0000000000000000000000000000000000000000..ae08939df7d0f1270512221200d83aae0e0b6405
--- /dev/null
+++ b/LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<html>
+<script>
+if (window.testRunner)
+ testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1);
+</script>
+<link href="resources/grid.css" rel="stylesheet">
+<style>
+.grid {
+ grid-definition-columns: 50px 100px;
+ grid-definition-rows: 50px 100px;
+}
+
+.negativeOrder {
+ order: -1;
+}
+
+.positiveOrder {
+ order: 10;
+}
+</style>
+</head>
+<script src="../../resources/check-layout.js"></script>
+<body onload="checkLayout('.grid')">
+ <p>This test checks that the auto-placement algorithm takes 'order' into account when placing grid items.</p>
+
+ <!-- Step 1, grid item with a major-axis position that is not 'auto'. -->
+ <div style="position: relative">
+ <div class="grid gridAutoFlowRow">
+ <div class="sizedToGridArea firstRowAutoColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
+ <div class="sizedToGridArea firstRowAutoColumn negativeOrder" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div>
+ </div>
+ </div>
+
+ <div style="position: relative">
+ <div class="grid gridAutoFlowRow">
+ <div class="sizedToGridArea firstRowAutoColumn positiveOrder" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
+ <div class="sizedToGridArea firstRowAutoColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div>
+ </div>
+ </div>
+
+ <!-- Step 4.1, grid items with a minor-axis position that is not 'auto'. -->
+ <div style="position: relative">
+ <div class="grid gridAutoFlowColumn">
+ <div class="sizedToGridArea secondRowAutoColumn" data-offset-x="50" data-offset-y="50" data-expected-width="100" data-expected-height="100"></div>
+ <div class="sizedToGridArea secondRowAutoColumn negativeOrder" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div>
+ </div>
+ </div>
+
+ <div style="position: relative">
+ <div class="grid gridAutoFlowColumn">
+ <div class="sizedToGridArea secondRowAutoColumn positiveOrder" data-offset-x="50" data-offset-y="50" data-expected-width="100" data-expected-height="100"></div>
+ <div class="sizedToGridArea secondRowAutoColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div>
+ </div>
+ </div>
+
+ <!-- Step 4.2, both minor and major-axis position are 'auto'. -->
+ <div style="position: relative">
+ <div class="grid gridAutoFlowColumn">
+ <div class="sizedToGridArea" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div>
+ <div class="sizedToGridArea negativeOrder" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div>
+ </div>
+ </div>
+
+ <div style="position: relative">
+ <div class="grid gridAutoFlowColumn">
+ <div class="sizedToGridArea positiveOrder" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div>
+ <div class="sizedToGridArea" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div>
+ </div>
+ </div>
+
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698