fune/testing/web-platform/tests/css/css-layout-api/constraints-fixed-block-size-fixed-min.https.html
Ian Kilpatrick df1cc99a60 Bug 1465661 [wpt PR 11260] - [css-layout-api] Adds passing of LayoutConstraints#fixedBlockSize., a=testonly
Automatic update from web-platform-tests[css-layout-api] Adds passing of LayoutConstraints#fixedBlockSize.

This passes a fixed block size constraint into the layout function if:
 - It has a fixed/percentage/calc block-size.
 - The abs-pos constraints will make a fixed block size.
 - It is a quirky body/document (which stretches to fit the viewport).
 - It has a fixed block-size constraint from a parent layout.

The tests all behave the same way. The layout which we are interested
in testing looks at the received fixedBlockSize, and if correct performs
layout on the only child with a 100x100 fixed size.

Bug: 726125
Change-Id: I4eec86a843d58a791c9df071e16b71bf2f5d80ee
Reviewed-on: https://chromium-review.googlesource.com/1073636
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563668}

--

wpt-commits: ff4d0553835102b2f68c7bf8dafb205bd3cacb89
wpt-pr: 11260
2018-06-17 15:18:33 +00:00

34 lines
862 B
HTML

<!DOCTYPE html>
<html class=reftest-wait>
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedblocksize">
<link rel="match" href="green-square-ref.html">
<meta name="assert" content="This test checks that LayoutConstraints#fixedBlockSize is passed into the layout function correctly." />
<style>
.test {
background: red;
--expected-block-size: 70;
width: 100px;
height: 60px;
min-height: 70px;
}
.child {
background: green;
}
@supports (display: layout(test)) {
.test {
display: layout(test);
}
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/worklet-reftest.js"></script>
<div class="test">
<div class="child"></div>
</div>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-block-size.js'});
</script>