[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 <eae@chromium.org> Reviewed-by:Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by:
Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#663800}
Showing
Please register or sign in to comment