mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #27475 - servo-wpt-sync:wpt_update_01-08-2020, r=servo-wpt-sync
Sync WPT with upstream (01-08-2020) Automated downstream sync of changes from upstream as of 01-08-2020. [no-wpt-sync] r? @servo-wpt-sync
This commit is contained in:
commit
67ec1e1c19
58 changed files with 359 additions and 134 deletions
|
@ -4,7 +4,7 @@
|
|||
expected: TIMEOUT
|
||||
|
||||
[Opening a blob URL in a new window immediately before revoking it works.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Fetching a blob URL immediately before revoking it works in an iframe.]
|
||||
expected: FAIL
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-003.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-005.html]
|
||||
[Miss clipped float]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[matchMedia-display-none-iframe.html]
|
||||
expected: ERROR
|
|
@ -312,18 +312,9 @@
|
|||
[Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK]
|
||||
expected: NOTRUN
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -333,3 +324,15 @@
|
|||
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,3 +56,9 @@
|
|||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript;charset=windows-1252 error text/javascript]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript error]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,6 +11,3 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%2Cnosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_3.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[traverse_the_history_3.html]
|
||||
[traverse_the_history_5.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[cross-origin-objects-on-new-window.html]
|
||||
expected: TIMEOUT
|
|
@ -1,4 +1,5 @@
|
|||
[embedded-opener-remove-frame.html]
|
||||
expected: CRASH
|
||||
[opener of discarded nested browsing context]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-1.html]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-2.html]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-3.html]
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[DOMContentLoaded-defer.html]
|
||||
[The end: DOMContentLoaded and defer scripts]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[load-event-after-location-set-during-write.window.html]
|
||||
[Setting location from document.write() call should not trigger load event until that load completes]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[module-static-import-delayed.html]
|
||||
[document.write in an imported module]
|
||||
expected: FAIL
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
[promise-rejection-events.html]
|
||||
expected: TIMEOUT
|
||||
[delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[unhandledrejection: from createImageBitmap which is UA triggered]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[realtimeanalyser-fft-scaling.html]
|
||||
expected: TIMEOUT
|
||||
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[Opening a blob URL in a new window immediately before revoking it works.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Opening a blob URL in a noopener about:blank window immediately before revoking it works.]
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -302509,7 +302509,7 @@
|
|||
],
|
||||
"support": {
|
||||
"testing-utils.js": [
|
||||
"217b620463624e2feb294b320e7787f6c91f1932",
|
||||
"30b944265b463fb595f1cb50ae8527ff00291019",
|
||||
[]
|
||||
]
|
||||
}
|
||||
|
@ -367687,7 +367687,7 @@
|
|||
]
|
||||
],
|
||||
"idbobjectstore_putall.tentative.any.js": [
|
||||
"8bdc765906d86504bcb344e1e579a97f8f602c6e",
|
||||
"a312d71d03d59c5c9369afa1492aacd0e91e9a5d",
|
||||
[
|
||||
"IndexedDB/idbobjectstore_putall.tentative.any.html",
|
||||
{
|
||||
|
@ -396976,7 +396976,7 @@
|
|||
]
|
||||
],
|
||||
"grid-flex-track-intrinsic-sizes-003.html": [
|
||||
"81a5d14131078c214b59f236838043870dda2512",
|
||||
"13c968e9150674596088ac3e695fc81df3e951e7",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -396989,6 +396989,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"grid-intrinsic-track-sizes-001.html": [
|
||||
"15ca612c7cb5a639ba6da6931b2e55775e12d4dc",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"grid-item-margin-auto-columns-rows-001.html": [
|
||||
"6ae1c50c220cdd07c5fb1fb266e2e2bd11bf2a4e",
|
||||
[
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-003.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-005.html]
|
||||
[Miss clipped float]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[matchMedia-display-none-iframe.html]
|
||||
expected: ERROR
|
|
@ -312,18 +312,9 @@
|
|||
[fetch(): separate response Content-Type: text/plain ]
|
||||
expected: NOTRUN
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -333,3 +324,15 @@
|
|||
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,3 +56,9 @@
|
|||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript;charset=windows-1252 error text/javascript]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript error]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,6 +11,3 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%2Cnosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_2.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[traverse_the_history_2.html]
|
||||
[traverse_the_history_5.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[cross-origin-objects-on-new-window.html]
|
||||
expected: TIMEOUT
|
|
@ -1,4 +1,5 @@
|
|||
[embedded-opener-remove-frame.html]
|
||||
expected: CRASH
|
||||
[opener and "removed" embedded documents]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[iframe_sandbox_popups_escaping-1.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-2.html]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[DOMContentLoaded-defer.html]
|
||||
[The end: DOMContentLoaded and defer scripts]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[load-event-after-location-set-during-write.window.html]
|
||||
[Setting location from document.write() call should not trigger load event until that load completes]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[module-static-import-delayed.html]
|
||||
[document.write in an imported module]
|
||||
expected: FAIL
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
[promise-rejection-events.html]
|
||||
expected: TIMEOUT
|
||||
[delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[unhandledrejection: from createImageBitmap which is UA triggered]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[realtimeanalyser-fft-scaling.html]
|
||||
expected: TIMEOUT
|
||||
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-background.html]
|
||||
[Hit testing backgrounds of content should report the same element as the content]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit_test_multiple_sc.html]
|
||||
[Hit testing works for following stacking contexts]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit_test_pos_fixed.html]
|
||||
[Hit-test of an element with position: fixed should discard scroll offset]
|
||||
expected: FAIL
|
||||
|
|
@ -3,23 +3,24 @@
|
|||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, db => {
|
||||
const store = createBooksStore(testCase, db);
|
||||
let values = [
|
||||
{isbn: 'one', title: 'title1'},
|
||||
{isbn: 'two', title: 'title2'},
|
||||
{isbn: 'three', title: 'title3'}
|
||||
];
|
||||
const putAllRequests = store.putAll(values);
|
||||
putAllRequests.forEach(async request => {
|
||||
await promiseForRequest(testCase, request);
|
||||
});
|
||||
});
|
||||
|
||||
const txn = db.transaction(['books'], 'readonly');
|
||||
const txn = db.transaction(['books'], 'readwrite');
|
||||
const objectStore = txn.objectStore('books');
|
||||
const getRequest1 = objectStore.get('one');
|
||||
const getRequest2 = objectStore.get('two');
|
||||
const getRequest3 = objectStore.get('three');
|
||||
let values = [
|
||||
{isbn: 'one', title: 'title1'},
|
||||
{isbn: 'two', title: 'title2'},
|
||||
{isbn: 'three', title: 'title3'}
|
||||
];
|
||||
let putAllRequest = objectStore.putAll(values);
|
||||
await promiseForRequest(testCase, putAllRequest);
|
||||
await promiseForTransaction(testCase, txn);
|
||||
|
||||
const txn2 = db.transaction(['books'], 'readonly');
|
||||
const objectStore2 = txn2.objectStore('books');
|
||||
const getRequest1 = objectStore2.get('one');
|
||||
const getRequest2 = objectStore2.get('two');
|
||||
const getRequest3 = objectStore2.get('three');
|
||||
await promiseForTransaction(testCase, txn2);
|
||||
assert_array_equals(
|
||||
[getRequest1.result.title,
|
||||
getRequest2.result.title,
|
||||
|
@ -27,4 +28,4 @@ promise_test(async testCase => {
|
|||
['title1', 'title2', 'title3'],
|
||||
'All three retrieved titles should match those that were put.');
|
||||
db.close();
|
||||
}, 'Data can be successfully inputted into an object store using putAll.');
|
||||
}, 'Data can be successfully inputted into an object store using putAll.');
|
||||
|
|
|
@ -12,14 +12,14 @@ var TestingUtils = (function() {
|
|||
assert_in_array(getComputedStyle(element).gridTemplateRows, value, "gridTemplateRows");
|
||||
}
|
||||
|
||||
function testGridTemplateColumnsRows(gridId, columnsStyle, rowsStyle, columnsComputedValue, rowsComputedValue) {
|
||||
function testGridTemplateColumnsRows(gridId, columnsStyle, rowsStyle, columnsComputedValue, rowsComputedValue, label) {
|
||||
test(function() {
|
||||
var grid = document.getElementById(gridId);
|
||||
grid.style.gridTemplateColumns = columnsStyle;
|
||||
grid.style.gridTemplateRows = rowsStyle;
|
||||
checkGridTemplateColumns(grid, columnsComputedValue);
|
||||
checkGridTemplateRows(grid, rowsComputedValue);
|
||||
}, "'" + gridId + "' with: grid-template-columns: " + columnsStyle + "; and grid-template-rows: " + rowsStyle + ";");
|
||||
}, (label ? label + " " : "") + "'" + gridId + "' with: grid-template-columns: " + columnsStyle + "; and grid-template-rows: " + rowsStyle + ";");
|
||||
}
|
||||
|
||||
function checkGridTemplateAreas(element, value) {
|
||||
|
|
|
@ -3,14 +3,16 @@
|
|||
<title>CSS Grid Layout Test: Intrinsic contribution of an item with flex tracks</title>
|
||||
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
|
||||
<link rel="author" title="Tab Atkins-Bittner" href="mailto:jackalmage@gmail.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-spanning-items" title="11.5.3 Increase sizes to accommodate spanning items crossing content-sized tracks">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-spanning-flex-items" title="11.5.4 Increase sizes to accommodate spanning items crossing flexible tracks">
|
||||
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#algo-spanning-items">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#algo-spanning-flex-items">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#min-size-auto">
|
||||
<meta name="assert" content="This test checks that the intrinsic contribution of a single grid item is distributed correctly among the tracks it spans when flexible tracks are involved, and the item's size is determined by its children rather than explicitly.">
|
||||
<style>
|
||||
#grid {
|
||||
display: grid;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border: solid;
|
||||
}
|
||||
#item {
|
||||
|
@ -35,24 +37,81 @@
|
|||
<script src="../grid-definition/support/testing-utils.js"></script>
|
||||
<script>
|
||||
const item = document.getElementById("item");
|
||||
let testset = "unlabeled";
|
||||
function checkTrackSizes(span, trackList, expected) {
|
||||
item.style.gridColumn = item.style.gridRow = `span ${span}`;
|
||||
TestingUtils.testGridTemplateColumnsRows("grid", trackList, trackList, expected, expected);
|
||||
TestingUtils.testGridTemplateColumnsRows("grid", trackList, trackList, expected, expected, testset);
|
||||
}
|
||||
|
||||
// Item spanning an intrinsic flexible track
|
||||
// First check for distributing auto minimum ///////////////////////////////////
|
||||
testset = "auto min item";
|
||||
|
||||
// Item spanning an auto flexible track
|
||||
checkTrackSizes(1, "0fr", "100px");
|
||||
checkTrackSizes(1, "1fr", "100px");
|
||||
checkTrackSizes(1, "2fr", "100px");
|
||||
|
||||
// Item spanning a fixed flexible track
|
||||
checkTrackSizes(1, "minmax(0, 0fr)", "0px");
|
||||
checkTrackSizes(1, "minmax(0, .5fr)", "25px");
|
||||
checkTrackSizes(1, "minmax(0, 1fr)", "50px");
|
||||
checkTrackSizes(1, "minmax(0, 2fr)", "50px");
|
||||
checkTrackSizes(1, "minmax(0, .5fr)", "30px");
|
||||
checkTrackSizes(1, "minmax(0, 1fr)", "60px");
|
||||
checkTrackSizes(1, "minmax(0, 2fr)", "60px");
|
||||
checkTrackSizes(1, "minmax(75px, 1fr)", "75px");
|
||||
|
||||
// Item spanning 2 intrinsic flexible tracks
|
||||
// Item spanning 2 auto flexible tracks
|
||||
checkTrackSizes(2, "0fr 0fr", "0px 0px");
|
||||
checkTrackSizes(2, "0fr 1fr", "0px 60px");
|
||||
checkTrackSizes(2, "1fr 0fr", "60px 0px");
|
||||
checkTrackSizes(2, "1fr 1fr", "30px 30px");
|
||||
checkTrackSizes(2, "1fr 3fr", "15px 45px");
|
||||
checkTrackSizes(2, "0fr 0fr 1fr", "0px 0px 60px");
|
||||
|
||||
// Item spanning 2 fixed flexible tracks
|
||||
checkTrackSizes(2, "minmax(0, 0fr) minmax(0, 0fr)", "0px 0px");
|
||||
checkTrackSizes(2, "minmax(0, 0fr) minmax(0, 1fr)", "0px 60px");
|
||||
checkTrackSizes(2, "minmax(15px, 0fr) minmax(0, 1fr)", "15px 45px");
|
||||
checkTrackSizes(2, "minmax(20px, 1fr) minmax(0, 1fr)", "30px 30px");
|
||||
checkTrackSizes(2, "minmax(40px, 1fr) minmax(0, 1fr)", "40px 20px");
|
||||
|
||||
// Item spanning an auto flexible track and a fixed flexible track
|
||||
checkTrackSizes(2, "0fr minmax(0, 0fr)", "0px 0px");
|
||||
checkTrackSizes(2, "0fr minmax(0, 1fr)", "0px 60px");
|
||||
checkTrackSizes(2, "1fr minmax(0, 1fr)", "30px 30px");
|
||||
checkTrackSizes(2, "1fr minmax(25px, 1fr)", "30px 30px");
|
||||
|
||||
// Item spanning an auto flexible track and an intrinsic non-flexible track
|
||||
checkTrackSizes(2, "0fr min-content", "0px 0px");
|
||||
checkTrackSizes(2, "0fr auto", "0px 60px");
|
||||
checkTrackSizes(2, "0.5fr auto", "30px 30px");
|
||||
checkTrackSizes(2, "1fr auto", "60px 0px");
|
||||
checkTrackSizes(2, "1fr max-content", "60px 0px");
|
||||
checkTrackSizes(2, "1fr min-content", "60px 0px");
|
||||
|
||||
// Item spanning a fixed flexible track and an intrinsic non-flexible track
|
||||
checkTrackSizes(2, "minmax(0, 0fr) min-content", "0px 0px");
|
||||
checkTrackSizes(2, "minmax(0, 0fr) auto", "0px 60px");
|
||||
checkTrackSizes(2, "minmax(0, 1fr) auto", "60px 0px");
|
||||
checkTrackSizes(2, "minmax(25px, 0fr) auto", "25px 35px");
|
||||
checkTrackSizes(2, "minmax(25px, 1fr) auto", "60px 0px");
|
||||
|
||||
// Now check for distributing min content //////////////////////////////////////
|
||||
item.style.minWidth = "min-content"; // min-content = 100px > grid
|
||||
item.style.minHeight = "100px"; // min-content doesn't resolve in block axis (yet?)
|
||||
testset = "min-content min item";
|
||||
|
||||
// Item spanning an auto flexible track
|
||||
checkTrackSizes(1, "0fr", "100px");
|
||||
checkTrackSizes(1, "1fr", "100px");
|
||||
checkTrackSizes(1, "2fr", "100px");
|
||||
|
||||
// Item spanning a fixed flexible track
|
||||
checkTrackSizes(1, "minmax(0, 0fr)", "0px");
|
||||
checkTrackSizes(1, "minmax(0, .5fr)", "30px");
|
||||
checkTrackSizes(1, "minmax(0, 1fr)", "60px");
|
||||
checkTrackSizes(1, "minmax(0, 2fr)", "60px");
|
||||
checkTrackSizes(1, "minmax(75px, 1fr)", "75px");
|
||||
|
||||
// Item spanning 2 auto flexible tracks
|
||||
checkTrackSizes(2, "0fr 0fr", "50px 50px");
|
||||
checkTrackSizes(2, "0fr 1fr", "0px 100px");
|
||||
checkTrackSizes(2, "1fr 0fr", "100px 0px");
|
||||
|
@ -62,25 +121,82 @@ checkTrackSizes(2, "0fr 0fr 1fr", "50px 50px 0px");
|
|||
|
||||
// Item spanning 2 fixed flexible tracks
|
||||
checkTrackSizes(2, "minmax(0, 0fr) minmax(0, 0fr)", "0px 0px");
|
||||
checkTrackSizes(2, "minmax(0, 0fr) minmax(0, 1fr)", "0px 50px");
|
||||
checkTrackSizes(2, "minmax(15px, 0fr) minmax(0, 1fr)", "15px 35px");
|
||||
checkTrackSizes(2, "minmax(20px, 1fr) minmax(0, 1fr)", "25px 25px");
|
||||
checkTrackSizes(2, "minmax(30px, 1fr) minmax(0, 1fr)", "30px 20px");
|
||||
checkTrackSizes(2, "minmax(0, 0fr) minmax(0, 1fr)", "0px 60px");
|
||||
checkTrackSizes(2, "minmax(15px, 0fr) minmax(0, 1fr)", "15px 45px");
|
||||
checkTrackSizes(2, "minmax(20px, 1fr) minmax(0, 1fr)", "30px 30px");
|
||||
checkTrackSizes(2, "minmax(40px, 1fr) minmax(0, 1fr)", "40px 20px");
|
||||
|
||||
// Item spanning an intrinsic flexible track and a fixed flexible track
|
||||
// Item spanning an auto flexible track and a fixed flexible track
|
||||
checkTrackSizes(2, "0fr minmax(0, 0fr)", "100px 0px");
|
||||
checkTrackSizes(2, "0fr minmax(0, 1fr)", "100px 0px");
|
||||
checkTrackSizes(2, "1fr minmax(0, 1fr)", "100px 0px");
|
||||
checkTrackSizes(2, "1fr minmax(25px, 1fr)", "75px 25px");
|
||||
|
||||
// Item spanning an intrinsic flexible track and an intrinsic non-flexible track
|
||||
// Item spanning an auto flexible track and an intrinsic non-flexible track
|
||||
checkTrackSizes(2, "0fr min-content", "100px 0px");
|
||||
checkTrackSizes(2, "0fr auto", "100px 0px");
|
||||
checkTrackSizes(2, "0.5fr auto", "100px 0px");
|
||||
checkTrackSizes(2, "1fr auto", "100px 0px");
|
||||
checkTrackSizes(2, "1fr max-content", "100px 0px");
|
||||
checkTrackSizes(2, "1fr min-content", "100px 0px");
|
||||
|
||||
// Item spanning a fixed flexible track and an intrinsic non-flexible track
|
||||
checkTrackSizes(2, "minmax(0, 0fr) auto", "0px 100px");
|
||||
checkTrackSizes(2, "minmax(0, 1fr) auto", "0px 100px");
|
||||
checkTrackSizes(2, "minmax(25px, 0fr) auto", "25px 75px");
|
||||
checkTrackSizes(2, "minmax(25px, 1fr) auto", "25px 75px");
|
||||
checkTrackSizes(2, "minmax(0, 0fr) min-content", "0px 0px");
|
||||
checkTrackSizes(2, "minmax(0, 0fr) auto", "0px 60px");
|
||||
checkTrackSizes(2, "minmax(0, 1fr) auto", "60px 0px");
|
||||
checkTrackSizes(2, "minmax(25px, 0fr) auto", "25px 35px");
|
||||
checkTrackSizes(2, "minmax(25px, 1fr) auto", "60px 0px");
|
||||
|
||||
// Now check for distributing fixed min ////////////////////////////////////////
|
||||
item.style.minWidth = "50px"; // minimum < grid < min-content
|
||||
item.style.minHeight = "50px"; // minimum < grid < min-content
|
||||
testset = "50px min item";
|
||||
|
||||
// Item spanning an auto flexible track
|
||||
checkTrackSizes(1, "0fr", "50px");
|
||||
checkTrackSizes(1, "1fr", "60px");
|
||||
checkTrackSizes(1, "2fr", "60px");
|
||||
|
||||
// Item spanning a fixed flexible track
|
||||
checkTrackSizes(1, "minmax(0, 0fr)", "0px");
|
||||
checkTrackSizes(1, "minmax(0, .5fr)", "30px");
|
||||
checkTrackSizes(1, "minmax(0, 1fr)", "60px");
|
||||
checkTrackSizes(1, "minmax(0, 2fr)", "60px");
|
||||
checkTrackSizes(1, "minmax(75px, 1fr)", "75px");
|
||||
|
||||
// Item spanning 2 auto flexible tracks
|
||||
checkTrackSizes(2, "0fr 0fr", "25px 25px");
|
||||
checkTrackSizes(2, "0fr 1fr", "0px 60px");
|
||||
checkTrackSizes(2, "1fr 0fr", "60px 0px");
|
||||
checkTrackSizes(2, "1fr 1fr", "30px 30px");
|
||||
checkTrackSizes(2, "1fr 3fr", "15px 45px");
|
||||
checkTrackSizes(2, "0fr 0fr 1fr", "25px 25px 10px");
|
||||
|
||||
// Item spanning 2 fixed flexible tracks
|
||||
checkTrackSizes(2, "minmax(0, 0fr) minmax(0, 0fr)", "0px 0px");
|
||||
checkTrackSizes(2, "minmax(0, 0fr) minmax(0, 1fr)", "0px 60px");
|
||||
checkTrackSizes(2, "minmax(15px, 0fr) minmax(0, 1fr)", "15px 45px");
|
||||
checkTrackSizes(2, "minmax(20px, 1fr) minmax(0, 1fr)", "30px 30px");
|
||||
checkTrackSizes(2, "minmax(40px, 1fr) minmax(0, 1fr)", "40px 20px");
|
||||
|
||||
// Item spanning an auto flexible track and a fixed flexible track
|
||||
checkTrackSizes(2, "0fr minmax(0, 0fr)", "50px 0px");
|
||||
checkTrackSizes(2, "0fr minmax(0, 1fr)", "50px 10px");
|
||||
checkTrackSizes(2, "1fr minmax(0, 1fr)", "50px 10px");
|
||||
checkTrackSizes(2, "1fr minmax(25px, 1fr)", "30px 30px");
|
||||
|
||||
// Item spanning an auto flexible track and an intrinsic non-flexible track
|
||||
checkTrackSizes(2, "0fr min-content", "50px 0px");
|
||||
checkTrackSizes(2, "0fr auto", "50px 10px");
|
||||
checkTrackSizes(2, "0.5fr auto", "50px 10px");
|
||||
checkTrackSizes(2, "1fr auto", "60px 0px");
|
||||
checkTrackSizes(2, "1fr max-content", "60px 0px");
|
||||
checkTrackSizes(2, "1fr min-content", "60px 0px");
|
||||
|
||||
// Item spanning a fixed flexible track and an intrinsic non-flexible track
|
||||
checkTrackSizes(2, "minmax(0, 0fr) min-content", "0px 0px");
|
||||
checkTrackSizes(2, "minmax(0, 0fr) auto", "0px 60px");
|
||||
checkTrackSizes(2, "minmax(0, 1fr) auto", "60px 0px");
|
||||
checkTrackSizes(2, "minmax(25px, 0fr) auto", "25px 35px");
|
||||
checkTrackSizes(2, "minmax(25px, 1fr) auto", "60px 0px");
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: Intrinsic contribution of a small item to intrinsic tracks</title>
|
||||
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#algo-content">
|
||||
<meta name="assert" content="This test checks that the intrinsic contribution of a single grid item smaller than its container is distributed correctly among the tracks it spans when intrinsic tracks are involved.">
|
||||
<base href="https://wpt.live/css/css-grid/grid-definition/">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
#grid {
|
||||
display: grid;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border: solid;
|
||||
font: 10px/1 Ahem;
|
||||
}
|
||||
#item {
|
||||
background: blue;
|
||||
/* make min-content contribution differ from minimum contribution */
|
||||
min-width: 12px;
|
||||
min-height: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="grid">
|
||||
<div id="item">XXX XX<br>XX<br>XX</div>
|
||||
</div>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../grid-definition/support/testing-utils.js"></script>
|
||||
<script>
|
||||
const item = document.getElementById("item");
|
||||
function checkTrackSizes(span, trackList, expectedCols, expectedRows) {
|
||||
item.style.gridColumn = item.style.gridRow = `span ${span}`;
|
||||
if (!expectedRows) {
|
||||
expectedRows = expectedCols;
|
||||
}
|
||||
TestingUtils.testGridTemplateColumnsRows("grid", trackList, trackList, expectedCols, expectedRows);
|
||||
}
|
||||
|
||||
// Item spanning a single track
|
||||
checkTrackSizes(1, "auto", "120px");
|
||||
checkTrackSizes(1, "min-content", "30px", "40px");
|
||||
checkTrackSizes(1, "max-content", "60px", "30px");
|
||||
|
||||
checkTrackSizes(1, "minmax(0, auto)", "120px");
|
||||
checkTrackSizes(1, "minmax(0, min-content)", "30px", "40px");
|
||||
checkTrackSizes(1, "minmax(0, max-content)", "60px", "30px");
|
||||
|
||||
checkTrackSizes(1, "minmax(auto, 10px)", "12px");
|
||||
checkTrackSizes(1, "minmax(min-content, 10px)", "30px", "40px");
|
||||
checkTrackSizes(1, "minmax(max-content, 10px)", "60px", "30px");
|
||||
|
||||
// Item spanning two identical tracks
|
||||
|
||||
checkTrackSizes(2, "auto auto", "60px 60px");
|
||||
checkTrackSizes(2, "min-content min-content", "15px 15px", "20px 20px");
|
||||
checkTrackSizes(2, "max-content max-content", "30px 30px", "15px 15px");
|
||||
|
||||
checkTrackSizes(2, "minmax(0, auto) minmax(0, auto)", "60px 60px");
|
||||
checkTrackSizes(2, "minmax(0, min-content) minmax(0, min-content)", "15px 15px", "20px 20px");
|
||||
checkTrackSizes(2, "minmax(0, max-content) minmax(0, max-content)", "30px 30px", "15px 15px");
|
||||
|
||||
checkTrackSizes(2, "minmax(auto, 4px) minmax(auto, 4px)", "6px 6px");
|
||||
checkTrackSizes(2, "minmax(auto, 10px) minmax(auto, 10px)", "10px 10px");
|
||||
checkTrackSizes(2, "minmax(min-content, 10px) minmax(min-content, 10px)", "15px 15px", "20px 20px");
|
||||
checkTrackSizes(2, "minmax(max-content, 10px) minmax(max-content, 10px)", "30px 30px", "15px 15px");
|
||||
|
||||
// Item spanning a fixed track also
|
||||
checkTrackSizes(2, "20px auto", "20px 100px");
|
||||
checkTrackSizes(2, "20px min-content", "20px 10px", "20px 20px");
|
||||
checkTrackSizes(2, "20px max-content", "20px 40px", "20px 10px");
|
||||
|
||||
checkTrackSizes(2, "20px minmax(0, auto)", "20px 100px");
|
||||
checkTrackSizes(2, "20px minmax(0, min-content)", "20px 10px", "20px 20px");
|
||||
checkTrackSizes(2, "20px minmax(0, max-content)", "20px 40px", "20px 10px");
|
||||
|
||||
checkTrackSizes(2, "20px minmax(auto, 30px)", "20px 30px");
|
||||
checkTrackSizes(2, "20px minmax(min-content, 6px)", "20px 10px", "20px 20px");
|
||||
checkTrackSizes(2, "20px minmax(min-content, 40px)", "20px 40px", "20px 40px");
|
||||
checkTrackSizes(2, "20px minmax(max-content, 6px)", "20px 40px", "20px 10px");
|
||||
checkTrackSizes(2, "20px minmax(max-content, 30px)", "20px 40px", "20px 30px");
|
||||
|
||||
// Item spanning two mismatched intrinsic tracks
|
||||
checkTrackSizes(2, "max-content min-content", "45px 15px", "15px 15px");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue