Commit 543cdbc7 authored by Gyuyoung Kim's avatar Gyuyoung Kim Committed by Commit Bot

[css-grid] Migrate grid-container-width-should-include-scroll-bar-width.html to WPT

This CL migrates
grid-container-width-should-include-scroll-bar-width.html
from fast/css-grid-layout to
external/wpt/css/css-grid/grid-model with WPT styles,
adding links to the relevant specs, and test description.

Additionally, this test is renamed to
grid-scrollbars-sizing-002.html to be align with existing
tests.

Bug: 1063749
Change-Id: Iec5c026bdcbf8d23cdef4a4789ee4c68c87e40ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2153456
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Reviewed-by: default avatarManuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#760443}
parent 516e2447
<!DOCTYPE html>
<title>CSS Grid Layout Test: Intrinsic logical width with scrollbars</title>
<link rel="author" title="Sunil Ratnu" href="mailto:sunil.ratnu@samsung.com">
<link rel="issue" href="https://codereview.chromium.org/535913002"/>
<link rel="help" href="https://drafts.csswg.org/css-grid/#overflow"/>
<link rel="stylesheet" href="/css/support/grid.css">
<link rel="stylesheet" href="/css/support/width-keyword-classes.css">
<link rel="match" href="../reference/grid-container-scrollbars-sizing-002-ref.html">
<meta name="assert" content="This test ensures that the grid container considers the scrollbars when computing the intrinsic logical widths."/>
<style>
.grid, .inline-grid {
overflow: scroll;
}
.gridItem {
width: 100px;
height: 100px;
background: green;
}
</style>
<body>
<div class='grid fit-content'>
<span class='gridItem'></span>
</div>
<div class='grid fit-content' style='overflow-y: hidden'>
<span class='gridItem'></span>
</div>
<div class='inline-grid fit-content'>
<span class='gridItem'></span>
</div>
<div class='inline-grid fit-content' style='overflow-y: hidden'>
<span class='gridItem'></span>
</div>
</body>
<!DOCTYPE html>
<style>
.grid {
display: block;
background-color: grey;
overflow: scroll;
}
.inline-grid {
display: inline-block;
background-color: grey;
overflow: scroll;
}
.gridItem {
display: block;
width: 100px;
height: 100px;
background: green;
}
.fit-content {
width: -moz-fit-content;
width: fit-content;
}
</style>
<body>
<div class='grid fit-content'>
<span class='gridItem'></span>
</div>
<div class='grid fit-content' style='overflow-y: hidden'>
<span class='gridItem'></span>
</div>
<div class='inline-grid fit-content'>
<span class='gridItem'></span>
</div>
<div class='inline-grid fit-content' style='overflow-y: hidden'>
<span class='gridItem'></span>
</div>
</body>
Test that scrollbar width is added to the width of the grid container.
PASS
PASS
PASS
PASS
<!DOCTYPE html>
<link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel="stylesheet">
<link href="resources/grid.css" rel="stylesheet">
<style>
.grid, .inline-grid {
overflow: scroll;
}
.gridItem {
width: 100px;
height: 100px;
background: green;
}
</style>
<script src='../../resources/check-layout.js'></script>
<body onload="checkLayout('.grid'); checkLayout('.inline-grid');">
Test that scrollbar width is added to the width of the grid container.
<div class='grid fit-content' data-expected-width='115'>
<span class='gridItem'></span>
</div>
<div class='grid fit-content' style='left: 150px; overflow-y: hidden' data-expected-width='100'>
<span class='gridItem'></span>
</div>
<div class='inline-grid fit-content' style='left: 300px' data-expected-width='115'>
<span class='gridItem'></span>
</div>
<div class='inline-grid fit-content' style='left: 450px; overflow-y: hidden' data-expected-width='100'>
<span class='gridItem'></span>
</div>
</body>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment