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

Unified Diff: third_party/WebKit/LayoutTests/fast/css-grid-layout/percent-resolution-grid-item-children.html

Issue 2039223002: [css-grid] Fix percentage height on grid item's children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New version using overrideLogicalContentHeight Created 4 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 | third_party/WebKit/Source/core/layout/LayoutBox.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/percent-resolution-grid-item-children.html
diff --git a/third_party/WebKit/LayoutTests/fast/css-grid-layout/percent-resolution-grid-item-children.html b/third_party/WebKit/LayoutTests/fast/css-grid-layout/percent-resolution-grid-item-children.html
new file mode 100644
index 0000000000000000000000000000000000000000..5da2920440255193ab7624e41ffc2578e53c1bfd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css-grid-layout/percent-resolution-grid-item-children.html
@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+<link href="resources/grid.css" rel="stylesheet">
+<link href="resources/grid-alignment.css" rel="stylesheet">
+<style>
+
+.grid {
+ grid: 100px / 200px;
+ position: relative;
+}
+
+.fixedSize350 {
+ width: 350px;
+ height: 350px;
+}
+
+.percentSize100 {
+ width: 100%;
+ height: 100%;
+}
+
+.percentSize50 {
+ width: 50%;
+ height: 50%;
+}
+
+.positioned {
+ position: absolute;
+ grid-column: 1 / 2;
+ grid-row: 1 / 2;
+}
+
+.offsets {
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+}
+
+</style>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/check-layout-th.js"></script>
+<body onload="checkLayout('.grid')">
+<div id="log"></div>
+
+<p>This test checks that percentages are properly resolved for grid items' children.</p>
+
+<div class="grid">
+ <div data-expected-width="200" data-expected-height="100">
+ <div class="percentSize100" data-expected-width="200" data-expected-height="100">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div data-expected-width="200" data-expected-height="100">
+ <div class="percentSize50" data-expected-width="100" data-expected-height="50">
+ </div>
+ </div>
+</div>
+
+<div class="grid itemsStart">
+ <div data-expected-width="0" data-expected-height="0">
+ <div class="percentSize100" data-expected-width="0" data-expected-height="0">
+ </div>
+ </div>
+</div>
+
+<div class="grid itemsStart">
+ <div data-expected-width="0" data-expected-height="0">
+ <div class="percentSize50" data-expected-width="0" data-expected-height="0">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div class="fixedSize350" data-expected-width="350" data-expected-height="350">
+ <div class="percentSize100" data-expected-width="350" data-expected-height="350">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div class="fixedSize350" data-expected-width="350" data-expected-height="350">
+ <div class="percentSize50" data-expected-width="175" data-expected-height="175">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div class="percentSize100" data-expected-width="200" data-expected-height="100">
+ <div class="percentSize100" data-expected-width="200" data-expected-height="100">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div class="percentSize100" data-expected-width="200" data-expected-height="100">
+ <div class="percentSize50" data-expected-width="100" data-expected-height="50">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div class="percentSize50" data-expected-width="100" data-expected-height="50">
+ <div class="percentSize100" data-expected-width="100" data-expected-height="50">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div class="percentSize50" data-expected-width="100" data-expected-height="50">
+ <div class="percentSize50" data-expected-width="50" data-expected-height="25">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div class="positioned" data-expected-width="0" data-expected-height="0">
+ <div class="percentSize100" data-expected-width="0" data-expected-height="0">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div class="positioned" data-expected-width="0" data-expected-height="0">
+ <div class="percentSize50" data-expected-width="0" data-expected-height="0">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div class="positioned offsets" data-expected-width="200" data-expected-height="100">
+ <div class="percentSize100" data-expected-width="200" data-expected-height="100">
+ </div>
+ </div>
+</div>
+
+<div class="grid">
+ <div class="positioned offsets" data-expected-width="200" data-expected-height="100">
+ <div class="percentSize50" data-expected-width="100" data-expected-height="50">
+ </div>
+ </div>
+</div>
+
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698