⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 191336 in webkit


Ignore:
Timestamp:
Oct 20, 2015, 2:57:23 AM (11 years ago)
Author:
svillar@igalia.com
Message:

ASSERTION FAILED: computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize) in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
https://bugs.webkit.org/show_bug.cgi?id=149459

Reviewed by Darin Adler.

Source/WebCore:

This was regressed after 189567 where min-height|width:auto
support was added to flex items. The merge from Blink changes
was not correctly done for assertions. In particular we were
asserting if the resolved main size was not strictly greater
than 0, but 0 is actually a valid value.

Test: fast/flexbox/crash-resolved-main-size-zero.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):

LayoutTests:

  • fast/flexbox/crash-resolved-main-size-zero-expected.txt: Added.
  • fast/flexbox/crash-resolved-main-size-zero.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r191331 r191336  
     12015-10-13  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        ASSERTION FAILED: computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize) in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
     4        https://bugs.webkit.org/show_bug.cgi?id=149459
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/flexbox/crash-resolved-main-size-zero-expected.txt: Added.
     9        * fast/flexbox/crash-resolved-main-size-zero.html: Added.
     10
    1112015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r191335 r191336  
     12015-10-13  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        ASSERTION FAILED: computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize) in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
     4        https://bugs.webkit.org/show_bug.cgi?id=149459
     5
     6        Reviewed by Darin Adler.
     7
     8        This was regressed after 189567 where min-height|width:auto
     9        support was added to flex items. The merge from Blink changes
     10        was not correctly done for assertions. In particular we were
     11        asserting if the resolved main size was not strictly greater
     12        than 0, but 0 is actually a valid value.
     13
     14        Test: fast/flexbox/crash-resolved-main-size-zero.html
     15
     16        * rendering/RenderFlexibleBox.cpp:
     17        (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
     18
    1192015-10-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>
    220
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r190834 r191336  
    870870        // items. For any other item the value should be 0, this also includes RenderFlexibleBox's derived clases
    871871        // (RenderButton, RenderFullScreen...) because that's just an implementation detail.
    872         LayoutUnit contentSize = computeMainAxisExtentForChild(child, MinSize, Length(MinContent)).valueOr(0);
    873         ASSERT(computeMainAxisExtentForChild(child, MinSize, Length(MinContent)));
     872        LayoutUnit contentSize = computeMainAxisExtentForChild(child, MinSize, Length(MinContent)).value();
     873        ASSERT(contentSize >= 0);
    874874        contentSize = std::min(contentSize, maxExtent.valueOr(contentSize));
    875875
    876876        Length mainSize = isHorizontalFlow() ? child.style().width() : child.style().height();
    877877        if (!mainAxisLengthIsIndefinite(mainSize)) {
    878             LayoutUnit resolvedMainSize = computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize).valueOr(0);
    879             ASSERT(computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize));
     878            LayoutUnit resolvedMainSize = computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize).value();
     879            ASSERT(resolvedMainSize >= 0);
    880880            LayoutUnit specifiedSize = std::min(resolvedMainSize, maxExtent.valueOr(resolvedMainSize));
    881881
Note: See TracChangeset for help on using the changeset viewer.