Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class=reftest-wait>
<link rel="match" href="../green-square-ref.html">
<meta name="assert" content="This test checks that orthogonal children do not produce baselines."/>
<style>
.test {
background: green;
padding: 0 10px;
width: 80px;
}
@supports (display: layout(test)) {
.test {
display: layout(test);
background: green;
}
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/worklet-reftest.js"></script>
<div class="test">
<div style="writing-mode: vertical-rl; color: green;">text</div>
</div>
<script id="code" type="text/worklet">
registerLayout('test', class {
async intrinsicSizes() {}
async layout(children) {
const childFragments = await Promise.all(children.map(child => child.layoutNextFragment({})));
if (childFragments[0].baseline)
return {autoBlockSize: 0, childFragments};
return {autoBlockSize: 100, childFragments};
}
});
</script>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
</script>
</html>