mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 0d4300c5045a5587c2eb3d1416b11ffeecf5dadc
This commit is contained in:
parent
555fa75b2c
commit
9f1d1e8b63
111 changed files with 1744 additions and 631 deletions
|
@ -3,8 +3,8 @@ registerLayout('test', class {
|
|||
return ['--expected-block-size'];
|
||||
}
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout([child], edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout([child], edges, constraints, styleMap) {
|
||||
let childFixedInlineSize = 0;
|
||||
let childFixedBlockSize = 0;
|
||||
if (constraints.fixedBlockSize === JSON.parse(styleMap.get('--expected-block-size'))) {
|
||||
|
@ -12,7 +12,7 @@ registerLayout('test', class {
|
|||
childFixedBlockSize = 100;
|
||||
}
|
||||
|
||||
const childFragments = [yield child.layoutNextFragment({
|
||||
const childFragments = [await child.layoutNextFragment({
|
||||
fixedInlineSize: childFixedInlineSize,
|
||||
fixedBlockSize: childFixedBlockSize,
|
||||
})];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
registerLayout('test', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
if (constraints.fixedInlineSize !== 100)
|
||||
return {autoBlockSize: 0};
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ registerLayout('test', class {
|
|||
];
|
||||
}
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = yield children.map((child) => {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = await Promise.all(children.map((child) => {
|
||||
const childConstraints = {};
|
||||
const availableInlineSize = parseNumber(child.styleMap.get('--available-inline-size'));
|
||||
const availableBlockSize = parseNumber(child.styleMap.get('--available-block-size'));
|
||||
|
@ -38,7 +38,7 @@ registerLayout('test', class {
|
|||
percentageInlineSize,
|
||||
percentageBlockSize,
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
const actual = childFragments.map((childFragment) => {
|
||||
return {
|
||||
|
|
|
@ -9,14 +9,14 @@ registerLayout('test', class {
|
|||
return [ '--child' ];
|
||||
}
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
const expected = JSON.parse(styleMap.get('--child-expected').toString());
|
||||
const actual = children.map((child) => {
|
||||
return child.styleMap.get('--child').toString().trim();
|
||||
});
|
||||
|
||||
const childFragments = yield children.map((child) => { return child.layoutNextFragment({}); });
|
||||
const childFragments = await Promise.all(children.map(child => child.layoutNextFragment({})));
|
||||
|
||||
if (!areArraysEqual(expected, actual))
|
||||
return {autoBlockSize: 0, childFragments};
|
||||
|
|
|
@ -6,11 +6,9 @@ registerLayout('test', class {
|
|||
];
|
||||
}
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = yield children.map((child) => {
|
||||
return child.layoutNextFragment({});
|
||||
});
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = await Promise.all(children.map((child) => child.layoutNextFragment({})));
|
||||
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
childFragments[i].inlineOffset = parseInt(children[i].styleMap.get('--inline-offset').toString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue