mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision b464d69274950c7707855c0b29729d58b9a8d492
This commit is contained in:
parent
93c31df551
commit
b505991695
92 changed files with 1750 additions and 119 deletions
|
@ -0,0 +1,198 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html><head>
|
||||
<title>Reference: abs.pos. subgrid edge cases</title>
|
||||
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
|
||||
<style>
|
||||
html,body {
|
||||
color:black; background-color:white; font:15px/1 monospace;
|
||||
}
|
||||
|
||||
body > div {
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
border: 1px solid;
|
||||
margin: 1px;
|
||||
vertical-align: top;
|
||||
}
|
||||
body > div > div { height: 20px; background: lightgrey; }
|
||||
body > div > div > div { height: 20px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
let results = [
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "lime" ],
|
||||
[ "50px", "0", "50px", "0", "10px", "lime" ],
|
||||
[ "50px", "0", "50px", "0", "10px", "lime" ],
|
||||
[ "50px", "0", "50px", "0", "50px", "lime" ],
|
||||
[ "50px", "0", "50px", "0", "10px", "lime" ],
|
||||
[ "50px", "0", "50px", "0", "10px", "lime" ],
|
||||
[ "50px", "0", "50px", "0", "50px", "lime" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "lime" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "lime" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "lime" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "lime" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "lime" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "lime" ],
|
||||
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "10px", "0", "10px", "0", "10px", "blue" ],
|
||||
[ "50px", "0", "50px", "0", "10px", "blue" ],
|
||||
[ "50px", "0", "50px", "0", "10px", "blue" ],
|
||||
[ "50px", "0", "50px", "0", "50px", "blue" ],
|
||||
[ "50px", "0", "50px", "0", "10px", "blue" ],
|
||||
[ "50px", "0", "50px", "0", "10px", "blue" ],
|
||||
[ "50px", "0", "50px", "0", "50px", "blue" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "blue" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "blue" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "blue" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "blue" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "blue" ],
|
||||
[ "50px", "0", "40px", "0", "40px", "blue" ],
|
||||
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "lime" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "30px", "lime" ],
|
||||
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "20px", "0", "20px", "0", "20px", "blue" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "30px", "blue" ],
|
||||
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "lime" ],
|
||||
[ "50px", "20px", "30px", "0", "10px", "lime" ],
|
||||
[ "50px", "20px", "30px", "0", "10px", "lime" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "lime" ],
|
||||
[ "50px", "20px", "30px", "0", "10px", "lime" ],
|
||||
[ "50px", "20px", "30px", "0", "10px", "lime" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "20px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "20px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "20px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "20px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "20px", "lime" ],
|
||||
[ "50px", "0", "0", "0", "20px", "lime" ],
|
||||
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "30px", "0", "30px", "0", "30px", "blue" ],
|
||||
[ "50px", "20px", "30px", "0", "10px", "blue" ],
|
||||
[ "50px", "20px", "30px", "0", "10px", "blue" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "blue" ],
|
||||
[ "50px", "20px", "30px", "0", "10px", "blue" ],
|
||||
[ "50px", "20px", "30px", "0", "10px", "blue" ],
|
||||
[ "50px", "0", "0", "20px", "30px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "20px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "20px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "20px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "20px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "20px", "blue" ],
|
||||
[ "50px", "0", "0", "0", "20px", "blue" ],
|
||||
];
|
||||
results.forEach(function(arr) {
|
||||
let grid_width, subgrid_width, subgrid_pos, item_pos, item_width, item_bg;
|
||||
[grid_width, subgrid_pos, subgrid_width, item_pos, item_width, item_bg] = arr;
|
||||
let grid = document.createElement('div');
|
||||
grid.style.width = grid_width;
|
||||
let subgrid = document.createElement('div');
|
||||
subgrid.style.width = subgrid_width;
|
||||
subgrid.style.marginLeft = subgrid_pos;
|
||||
let subgridItem = document.createElement('div');
|
||||
subgridItem.style.width = item_width;
|
||||
subgridItem.style.marginLeft = item_pos;
|
||||
subgridItem.style.backgroundColor = item_bg;
|
||||
subgrid.appendChild(subgridItem);
|
||||
grid.appendChild(subgrid);
|
||||
document.body.appendChild(grid);
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,104 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html><head>
|
||||
<title>CSS Grid Test: abs.pos. subgrid edge cases</title>
|
||||
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-2">
|
||||
<link rel="match" href="abs-pos-004-ref.html">
|
||||
<style>
|
||||
html,body {
|
||||
color:black; background-color:white; font:15px/1 monospace;
|
||||
}
|
||||
|
||||
.grid {
|
||||
position: relative;
|
||||
display: inline-grid;
|
||||
grid-auto-columns: 10px;
|
||||
grid-auto-rows: 20px;
|
||||
grid-auto-flow: column;
|
||||
border: 1px solid;
|
||||
margin: 1px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.subgrid {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: grid;
|
||||
background: lightgrey;
|
||||
}
|
||||
.t1 { grid: subgrid / subgrid; }
|
||||
.t2 { grid: none / subgrid; }
|
||||
.t3 { grid: subgrid / none; }
|
||||
|
||||
x {
|
||||
background: lime;
|
||||
grid-area: 1/1/-1/-1;
|
||||
}
|
||||
fail {
|
||||
background: red;
|
||||
}
|
||||
|
||||
.a {
|
||||
position: absolute;
|
||||
grid-area: 1/1/-1/-1;
|
||||
inset: 0;
|
||||
background: blue;
|
||||
}
|
||||
|
||||
.o { overflow: hidden; }
|
||||
|
||||
.start .subgrid {
|
||||
grid-column-start: 3;
|
||||
}
|
||||
.end .subgrid {
|
||||
grid-column-end: 1;
|
||||
}
|
||||
.start, .end {
|
||||
width: 50px;
|
||||
}
|
||||
.end {
|
||||
justify-content: end;
|
||||
}
|
||||
.start > fail, .end > fail {
|
||||
background: initial;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
function make_grids(items, abspos) {
|
||||
["", "o", "start", "end"].forEach(function(grid1) {
|
||||
["", "o"].forEach(function(subgrid1) {
|
||||
["t1", "t2", "t3"].forEach(function(subgrid2) {
|
||||
let grid = document.createElement('div');
|
||||
for (let i = 0; i < items; ++i) {
|
||||
grid.appendChild(document.createElement('fail'));
|
||||
}
|
||||
grid.className = "grid " + grid1;
|
||||
document.body.appendChild(grid);
|
||||
document.body.offsetHeight;
|
||||
let subgrid = document.createElement('div');
|
||||
subgrid.className = "subgrid " + subgrid1 + " " + subgrid2;
|
||||
let subgridItem = document.createElement('x');
|
||||
if (abspos) {
|
||||
subgridItem.className = "a";
|
||||
}
|
||||
subgrid.appendChild(subgridItem);
|
||||
grid.appendChild(subgrid);
|
||||
})
|
||||
})
|
||||
});
|
||||
}
|
||||
for (let i = 1; i <= 3; ++i) {
|
||||
make_grids(i, false);
|
||||
make_grids(i, true);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue