Title: [215264] trunk/LayoutTests
- Revision
- 215264
- Author
- [email protected]
- Date
- 2017-04-12 03:14:30 -0700 (Wed, 12 Apr 2017)
Log Message
[css-grid] Replaced elements don't properly resolve percentage heights
https://bugs.webkit.org/show_bug.cgi?id=159670
Reviewed by Darin Adler.
The issue was fixed in r213149 (bug #168657), but the Blink test was not imported.
This patch only adds the test to avoid regressions in the future.
* fast/css-grid-layout/grid-item-with-percent-height-replaced-element-expected.txt: Added.
* fast/css-grid-layout/grid-item-with-percent-height-replaced-element.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (215263 => 215264)
--- trunk/LayoutTests/ChangeLog 2017-04-12 10:09:14 UTC (rev 215263)
+++ trunk/LayoutTests/ChangeLog 2017-04-12 10:14:30 UTC (rev 215264)
@@ -1,3 +1,16 @@
+2017-04-12 Manuel Rego Casasnovas <[email protected]>
+
+ [css-grid] Replaced elements don't properly resolve percentage heights
+ https://bugs.webkit.org/show_bug.cgi?id=159670
+
+ Reviewed by Darin Adler.
+
+ The issue was fixed in r213149 (bug #168657), but the Blink test was not imported.
+ This patch only adds the test to avoid regressions in the future.
+
+ * fast/css-grid-layout/grid-item-with-percent-height-replaced-element-expected.txt: Added.
+ * fast/css-grid-layout/grid-item-with-percent-height-replaced-element.html: Added.
+
2017-04-10 Antti Koivisto <[email protected]>
Cache small media resources in disk cache
Added: trunk/LayoutTests/fast/css-grid-layout/grid-item-with-percent-height-replaced-element-expected.txt (0 => 215264)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-with-percent-height-replaced-element-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-with-percent-height-replaced-element-expected.txt 2017-04-12 10:14:30 UTC (rev 215264)
@@ -0,0 +1,23 @@
+
+PASS .grid 1
+PASS .grid 2
+PASS .grid 3
+PASS .grid 4
+PASS .grid 5
+This test checks that percentage heights are properly resolved for grid items that are replaced elements. You shouldn't see any red if the test is working as expected.
+
+1) 100% height on the image (grid item) should be resolved against the height of the grid area (200px). Actually we don't need the 100% height in this case as the grid items are stretched by default.
+
+
+2) 100% height on the image (grid item's child) should be resolved against the height of the grid item, which is stretched by default to the height of the grid area (200px).
+
+
+3) 100% height on the image (grid item) should be resolved against the height of the grid area (200px). The grid item is not stretched in this case but the height percentage can be resolved anyway.
+
+
+4) 100% height on the image (grid item's child) should be resolved against the height of the grid item, as it's not stretched the grid item's height is indefinite, so the percentage cannot be resolved.
+
+
+5) 100% height on the image (grid item's child) should be resolved against the height of the grid item, which also has a 100% height that is resolved against the height of the grid area (200px).
+
+
Added: trunk/LayoutTests/fast/css-grid-layout/grid-item-with-percent-height-replaced-element.html (0 => 215264)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-with-percent-height-replaced-element.html (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-with-percent-height-replaced-element.html 2017-04-12 10:14:30 UTC (rev 215264)
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+
+<link href="" rel="stylesheet">
+<link href="" rel="stylesheet">
+<link href="" rel="stylesheet">
+
+<style>
+ .grid {
+ grid: 200px / 200px;
+ width: 200px;
+ }
+
+ .red {
+ background-color: red;
+ }
+
+ img {
+ height: 100%;
+ display: block;
+ }
+
+ .height100 {
+ height: 100%;
+ }
+</style>
+
+<script src=""
+<script src=""
+<script src=""
+
+<body _onload_="checkLayout('.grid')">
+<div id="log"></div>
+
+<p>This test checks that percentage heights are properly resolved for grid items that are replaced elements.
+You shouldn't see any red if the test is working as expected.</p>
+
+<p>1) 100% height on the image (grid item) should be resolved against the height of the grid area (200px).
+Actually we don't need the 100% height in this case as the grid items are stretched by default.</p>
+
+<div class="grid red">
+ <img src=""
+ data-expected-width="200" data-expected-height="200">
+</div>
+
+<p>2) 100% height on the image (grid item's child) should be resolved against the height of the grid item,
+which is stretched by default to the height of the grid area (200px).</p>
+
+
+<div class="grid red">
+ <div data-expected-width="200" data-expected-height="200">
+ <img src=""
+ data-expected-width="200" data-expected-height="200">
+ </div>
+</div>
+
+<p>3) 100% height on the image (grid item) should be resolved against the height of the grid area (200px).
+The grid item is not stretched in this case but the height percentage can be resolved anyway.</p>
+
+<div class="grid red alignItemsStart">
+ <img src=""
+ data-expected-width="200" data-expected-height="200">
+</div>
+
+<p>4) 100% height on the image (grid item's child) should be resolved against the height of the grid item,
+as it's not stretched the grid item's height is indefinite, so the percentage cannot be resolved.</p>
+
+<div class="grid alignItemsStart justifyItemsStart">
+ <div class="firstRowFirstColumn red" style="width: 100px; height: 100px;"
+ data-expected-width="100" data-expected-height="100">
+ </div>
+ <div class="firstRowFirstColumn">
+ <img src=""
+ data-expected-width="100" data-expected-height="100">
+ </div>
+</div>
+
+<p>5) 100% height on the image (grid item's child) should be resolved against the height of the grid item,
+which also has a 100% height that is resolved against the height of the grid area (200px).</p>
+
+<div class="grid red">
+ <div class="height100" data-expected-width="200" data-expected-height="200">
+ <img src=""
+ data-expected-width="200" data-expected-height="200">
+ </div>
+</div>
+
+</body>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes