Skip to content

Commit 307dedf

Browse files
committed
Bug 1554649 [wpt PR 17031] - [LayoutNG] Avoid indefinite CB inline-size when entering legacy child., a=testonly
Automatic update from web-platform-tests [LayoutNG] Avoid indefinite CB inline-size when entering legacy child. The constraint space has several resolution sizes, depending on what we're to resolve. There's "available size", "percentage resolution size" (and "replaced percentage resolution size"), and even "percentage resolution inline-size for parent writing mode". The latter is used when resolving percentage based margins and padding. This works when staying within LayoutNG, but when we need to enter legacy layout for some child, we convert all those values into something that legacy layout understands, and dumb down the number of values to basically 3 (plus two optional values); see BoxLayoutExtraInput. Avoid setting an indefinite containing block inline-size, since we use this value to resolve percentage padding and margins. The test included only *crashed* without this fix (it rendered correctly if DCHECKs were bypassed), but I figured it would be useful to have a test for correct rendering in this case as well. Bug: 966795 Change-Id: Ia2a2ede55a257b41dc38236a8bb0ff689e75a310 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1631370 Commit-Queue: Emil A Eklund <eaechromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrickchromium.org> Reviewed-by: Emil A Eklund <eaechromium.org> Cr-Commit-Position: refs/heads/master{#663800} -- wp5At-commits: a6a3a634c463305c0c8e81d069a2f89be78a3b75 wpt-pr: 17031 UltraBlame original commit: eecb752e82da5dac43fca674892e76a74b7417a0
1 parent 3282776 commit 307dedf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
3+
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/">
4+
<link rel="help" href="https://www.w3.org/TR/CSS22/box.html#propdef-padding-top">
5+
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=966795">
6+
<link rel="match" href="../reference/nothing.html">
7+
<meta name="assert" content="Percentage-padding is always resolved against the inline-size of the containing block, even if it's about block padding.">
8+
<p>There should be nothing below.</p>
9+
<div style="float:left;">
10+
<div style="display:flex; writing-mode:vertical-rl; padding:1000%; background:red;"></div>
11+
</div>

0 commit comments

Comments
 (0)