Bug 1494362 [wpt PR 13226] - [css-grid] Properly align items next to collapsed tracks with gutters, a=testonly

Automatic update from web-platform-tests[css-grid] Properly align items next to collapsed tracks with gutters

GridAreaPositionForInFlowChild could return a wrong end position for
grid items adjacent to a collapsed track, because it didn't take into
account that gutters collapse in that case. Therefore, "center" or
"end" alignments displayed the item at the wrong position.

BUG=801881

TEST=external/wpt/css/css-grid/alignment/grid-gutters-013.html

Change-Id: I8223f102e3fd581ab0a2d6f23d18c188e23807c7
Reviewed-on: https://chromium-review.googlesource.com/1245727
Reviewed-by: Javier Fernandez <jfernandez@igalia.com>
Reviewed-by: Sergio Villar <svillar@igalia.com>
Reviewed-by: Manuel Rego <rego@igalia.com>
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/master@{#595045}

--

wpt-commits: c617da67a8710c84bbda3b71c149faad4f53b222
wpt-pr: 13226
This commit is contained in:
Oriol Brufau 2018-10-05 14:20:44 +00:00 коммит произвёл moz-wptsync-bot
Родитель e19fa6e785
Коммит 8542687138
1 изменённых файлов: 36 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,36 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Gutters adjacent to collapsed tracks also collapse</title>
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#gutters">
<link rel="help" href="https://www.w3.org/TR/css-align-3/#gap-shorthand">
<link rel="help" href="https://www.w3.org/TR/css-align-3/#gap-legacy">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#repeat-notation">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<meta name="assert" content="This test checks that gutters adjacent to collapsed tracks don't reduce the space available for aligning adjacent grid items." />
<style>
#grid {
display: grid;
margin-top: -50px;
margin-left: -50px;
width: 500px;
height: 500px;
grid-gap: 100px;
grid-template-rows: repeat(auto-fit, 200px);
grid-template-columns: repeat(auto-fit, 200px);
align-items: center;
justify-items: center;
background: linear-gradient(red, red) no-repeat 50px 50px / 100px 100px;
}
#grid > div {
background-color: green;
width: 50%;
height: 50%;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="grid">
<div></div>
</div>