mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 11:37:43 -10:00
Automatic update from web-platform-tests[css-layout-api] Populate children, and pass into layout() function This introduces the LayoutChild API surface, (which only has a styleMap accessor currently). Each LayoutBox which is a child of a LayoutCustom will hold onto a LayoutChild object, acting as the script interface for the web developer. Bug: 726125 Change-Id: Iecdb01a38c0712dcda063b485c4207bde59f3995 Reviewed-on: https://chromium-review.googlesource.com/933092 Commit-Queue: Ian Kilpatrick <[email protected]> Reviewed-by: Morten Stenshorne <[email protected]> Reviewed-by: Rune Lillesveen <[email protected]> Reviewed-by: Koji Ishii <[email protected]> Cr-Commit-Position: refs/heads/master@{#539928} wpt-commits: 41ab079dfcde76aebbde5660fe3e417447e61f80 wpt-pr: 9680 wpt-commits: 41ab079dfcde76aebbde5660fe3e417447e61f80 wpt-pr: 9680
53 lines
1.2 KiB
HTML
53 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html class=reftest-wait>
|
|
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#layout-children">
|
|
<link rel="match" href="layout-child-ref.html">
|
|
<meta name="assert" content="This test checks that text children are correctly blockified." />
|
|
|
|
<style>
|
|
/* We have a wrapper in this test to ensure that any text that is positioned
|
|
* slightly outside the "test" box doesn't affect the rendering.
|
|
* This wrapper has a 10px inline padding which does the trick. */
|
|
.wrapper {
|
|
background: green;
|
|
padding: 0 10px;
|
|
margin: 10px;
|
|
width: 80px;
|
|
}
|
|
|
|
.test {
|
|
--child-expected: ["default", "2", "default"];
|
|
|
|
background: red;
|
|
color: green;
|
|
width: 80px;
|
|
--child: default;
|
|
}
|
|
|
|
.inflow {
|
|
visibility: hidden;
|
|
--child: 2;
|
|
}
|
|
|
|
@supports (display: layout(test)) {
|
|
.test {
|
|
background: green;
|
|
display: layout(test);
|
|
}
|
|
}
|
|
</style>
|
|
<script src="/common/reftest-wait.js"></script>
|
|
<script src="/common/worklet-reftest.js"></script>
|
|
|
|
<div class="wrapper">
|
|
<div class="test">
|
|
Text text text
|
|
<div class="inflow"></div>
|
|
Text text text
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-worklet.js'});
|
|
</script>
|