mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02: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 <ikilpatrick@chromium.org> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Commit-Queue: Alison Maher <almaher@microsoft.com> Cr-Commit-Position: refs/heads/master@{#732462} -- wpt-commits: 3faaed70bad7ad97237f502b9f0654edfbbbb865 wpt-pr: 21115 --HG-- rename : testing/web-platform/tests/css/css-layout-api/layout-child/text.https.html => testing/web-platform/tests/css/css-layout-api/layout-child/text-01.https.html
51 lines
1.2 KiB
HTML
51 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="../green-square-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;
|
|
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>
|