diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2019-08-19 10:23:52 +0000 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2019-08-19 14:01:14 +0000 |
commit | 76712d7d25f8b48d78e6be87aaefd0e55d1f7d09 (patch) | |
tree | 58ad269a9cc1c534bd0022c591e52a489d754537 /tests/wpt/web-platform-tests/css/css-layout-api/support | |
parent | 00a9f307733fa98cea8160e96d404bce9a871c09 (diff) | |
download | servo-76712d7d25f8b48d78e6be87aaefd0e55d1f7d09.tar.gz servo-76712d7d25f8b48d78e6be87aaefd0e55d1f7d09.zip |
Update web-platform-tests to revision 82b73b315ce7ed1554e7a9b7bced66a5831e4ee5
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-layout-api/support')
6 files changed, 0 insertions, 165 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-block-size-quirky-body-iframe.html b/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-block-size-quirky-body-iframe.html deleted file mode 100644 index da770e6caf1..00000000000 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-block-size-quirky-body-iframe.html +++ /dev/null @@ -1,21 +0,0 @@ -<style> -body { - margin: 0; - --expected-block-size: 200; -} - -.child { - background: green; -} - -@supports (display: layout(test)) { - body { - display: layout(test); - } -} -</style> - -<!-- In Quirks mode, we should stretch to 100% of the inital containing block. --> -<body> -<div class="child"></div> -</body> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-block-size.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-block-size.js deleted file mode 100644 index 25d73ef6156..00000000000 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-block-size.js +++ /dev/null @@ -1,22 +0,0 @@ -registerLayout('test', class { - static get inputProperties() { - return ['--expected-block-size']; - } - - async intrinsicSizes() {} - async layout([child], edges, constraints, styleMap) { - let childFixedInlineSize = 0; - let childFixedBlockSize = 0; - if (constraints.fixedBlockSize === JSON.parse(styleMap.get('--expected-block-size'))) { - childFixedInlineSize = 100; - childFixedBlockSize = 100; - } - - const childFragments = [await child.layoutNextFragment({ - fixedInlineSize: childFixedInlineSize, - fixedBlockSize: childFixedBlockSize, - })]; - - return {childFragments}; - } -}); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-inline-size.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-inline-size.js deleted file mode 100644 index 3636f366547..00000000000 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-inline-size.js +++ /dev/null @@ -1,9 +0,0 @@ -registerLayout('test', class { - async intrinsicSizes() {} - async layout(children, edges, constraints, styleMap) { - if (constraints.fixedInlineSize !== 100) - return {autoBlockSize: 0}; - - return {autoBlockSize: 100}; - } -}); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-sizes-worklet.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-sizes-worklet.js deleted file mode 100644 index 5956c9a70c2..00000000000 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-sizes-worklet.js +++ /dev/null @@ -1,67 +0,0 @@ -import {areArraysEqual} from '/common/arrays.js'; - -function parseNumber(value) { - const num = parseInt(value.toString()); - if (isNaN(num)) return undefined; - return num; -} - -registerLayout('test', class { - static get childInputProperties() { - return [ - '--available-inline-size', - '--available-block-size', - '--fixed-inline-size', - '--fixed-block-size', - '--percentage-inline-size', - '--percentage-block-size', - '--inline-size-expected', - '--block-size-expected' - ]; - } - - 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')); - const fixedInlineSize = parseNumber(child.styleMap.get('--fixed-inline-size')); - const fixedBlockSize = parseNumber(child.styleMap.get('--fixed-block-size')); - const percentageInlineSize = parseNumber(child.styleMap.get('--percentage-inline-size')); - const percentageBlockSize = parseNumber(child.styleMap.get('--percentage-block-size')); - return child.layoutNextFragment({ - availableInlineSize, - availableBlockSize, - fixedInlineSize, - fixedBlockSize, - percentageInlineSize, - percentageBlockSize, - }); - })); - - const actual = childFragments.map((childFragment) => { - return { - inlineSize: childFragment.inlineSize, - blockSize: childFragment.blockSize, - }; - }); - - const expected = children.map((child) => { - return { - inlineSize: parseInt(child.styleMap.get('--inline-size-expected').toString()), - blockSize: parseInt(child.styleMap.get('--block-size-expected').toString()), - }; - }); - - const equalityFunc = (a, b) => { - return a.inlineSize == b.inlineSize && a.blockSize == b.blockSize; - }; - - if (!areArraysEqual(expected, actual, equalityFunc)) { - return {autoBlockSize: 0, childFragments}; - } - - return {autoBlockSize: 100, childFragments}; - } -}); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js deleted file mode 100644 index 70d1b7e4572..00000000000 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js +++ /dev/null @@ -1,26 +0,0 @@ -import {areArraysEqual} from '/common/arrays.js'; - -registerLayout('test', class { - static get inputProperties() { - return [ '--child-expected']; - } - - static get childInputProperties() { - return [ '--child' ]; - } - - 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 = await Promise.all(children.map(child => child.layoutNextFragment({}))); - - if (!areArraysEqual(expected, actual)) - return {autoBlockSize: 0, childFragments}; - - return {autoBlockSize: 100, childFragments}; - } -}); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-position-child-worklet.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-position-child-worklet.js deleted file mode 100644 index 7d5c494952d..00000000000 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-position-child-worklet.js +++ /dev/null @@ -1,20 +0,0 @@ -registerLayout('test', class { - static get childInputProperties() { - return [ - '--inline-offset', - '--block-offset', - ]; - } - - 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()); - childFragments[i].blockOffset = parseInt(children[i].styleMap.get('--block-offset').toString()); - } - - return {autoBlockSize: 0, childFragments}; - } -}); |