REGRESSION (r191336): RenderFlexibleBox::adjustChildSizeForMinAndMax crashes in std...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Sep 2018 03:41:11 +0000 (03:41 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Sep 2018 03:41:11 +0000 (03:41 +0000)
commit6c84ae4d6a052164a5fc6ac3dbc536bb1080882d
treece42eeec3b6c2c389bcf04b07cd4230f42742415
parentfad8aeb34e169ee3c4d89114758b44598335f3a9
REGRESSION (r191336): RenderFlexibleBox::adjustChildSizeForMinAndMax crashes in std::optional<>::value()
https://bugs.webkit.org/show_bug.cgi?id=189232
<rdar://problem/43886373>

Reviewed by Brent Fulgham.

Source/WebCore:

It's not guaranteed that RenderFlexibleBox::computeMainAxisExtentForChild() always returns with a valid value.

Test: fast/flexbox/crash-when-min-max-content-is-not-computed.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):

LayoutTests:

* fast/flexbox/crash-when-min-max-content-is-not-computed-expected.txt: Added.
* fast/flexbox/crash-when-min-max-content-is-not-computed.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/flexbox/crash-when-min-max-content-is-not-computed-expected.txt [new file with mode: 0644]
LayoutTests/fast/flexbox/crash-when-min-max-content-is-not-computed.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp