mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests [css-layout-api] Custom layouts with only text as children It was discovered that creating a custom layout for an element with only text as children causes a crash. This reason being that these text children were not getting blockified. To fix this, LayoutNGCustom::AddChild()/RemoveChild() should go through LayoutBlock::AddChild()/RemoveChild() in the above case to ensure that the text children become blockified. (https://chromium-review.googlesource.com/c/chromium/src/+/1745396/12/third_party/blink/renderer/core/layout/custom/layout_custom.cc) Bug: 1038501 Change-Id: I0816dab025f70613634a7c968f3d8abfe46ae01c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992213 Reviewed-by: Ian Kilpatrick <[email protected]> Reviewed-by: Christian Biesinger <[email protected]> Commit-Queue: Alison Maher <[email protected]> Cr-Commit-Position: refs/heads/master@{#732462} -- wpt-commits: 3faaed70bad7ad97237f502b9f0654edfbbbb865 wpt-pr: 21115
45 lines
1.1 KiB
HTML
45 lines
1.1 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="../green-square-ref.html">
|
|
<meta name="assert" content="This test checks that text children are correctly blockified when no other children exist." />
|
|
|
|
<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;
|
|
width: 80px;
|
|
}
|
|
|
|
.test {
|
|
--child-expected: ["default"];
|
|
|
|
background: red;
|
|
color: green;
|
|
width: 80px;
|
|
--child: default;
|
|
}
|
|
|
|
@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>
|
|
</div>
|
|
|
|
<script>
|
|
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-worklet.js'});
|
|
</script>
|