Bug 1679794 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The root cause is [this line](https://searchfox.org/mozilla-central/rev/1add3985d32470582ce83f40a212a976e4fc7da5/layout/generic/ReflowInput.cpp#1825-1826):
> nscoord autoBSize = cbSize.BSize(cbwm) - margin.BStartEnd(cbwm) - borderPadding.BStartEnd(cbwm) - offsets.BStartEnd(cbwm);

when `borderPadding.BStartEnd(cbwm)` is 1073741823, and `offsets.BStartEnd(cbwm)` is -2147483646, the result is just equal to `nscoord_MAX`. Perhaps Bug 1602669 can fix all the related issues. For now, perhaps just make sure BStartEnd() returns the value in the range of [nscoord_MIN, nscoord_MAX], so we don't make autoBSize be equal to `NS_UNCONSTRAINED`.
The root cause is [this line](https://searchfox.org/mozilla-central/rev/1add3985d32470582ce83f40a212a976e4fc7da5/layout/generic/ReflowInput.cpp#1825-1826):
> nscoord autoBSize = cbSize.BSize(cbwm) - margin.BStartEnd(cbwm) - borderPadding.BStartEnd(cbwm) - offsets.BStartEnd(cbwm);

when `borderPadding.BStartEnd(cbwm)` is 1073741823, and `offsets.BStartEnd(cbwm)` is -2147483646, the result is just equal to `nscoord_MAX`. Perhaps Bug 1602669 can fix all the related issues. For now, perhaps just make sure BStartEnd() returns the value in the range of [nscoord_MIN, nscoord_MAX], so we don't make autoBSize be equal to `NS_UNCONSTRAINEDSIZE`.

Back to Bug 1679794 Comment 2