Changeset 192513 in webkit


Ignore:
Timestamp:
Nov 17, 2015 2:13:19 AM (8 years ago)
Author:
svillar@igalia.com
Message:

ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
https://bugs.webkit.org/show_bug.cgi?id=151025

Reviewed by Darin Adler.

Source/WebCore:

Negative margins could make RenderFlexibleBox compute negative
intrinsic sizes. Clamp intrinsic sizes to 0.

Test: css3/flexbox/negative-margins-assert.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):

LayoutTests:

  • css3/flexbox/negative-margins-assert-expected.txt: Added.
  • css3/flexbox/negative-margins-assert.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r192512 r192513  
     12015-11-17  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
     4        https://bugs.webkit.org/show_bug.cgi?id=151025
     5
     6        Reviewed by Darin Adler.
     7
     8        * css3/flexbox/negative-margins-assert-expected.txt: Added.
     9        * css3/flexbox/negative-margins-assert.html: Added.
     10
    1112015-11-17  Sergio Villar Senin  <svillar@igalia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r192512 r192513  
     12015-11-17  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
     4        https://bugs.webkit.org/show_bug.cgi?id=151025
     5
     6        Reviewed by Darin Adler.
     7
     8        Negative margins could make RenderFlexibleBox compute negative
     9        intrinsic sizes. Clamp intrinsic sizes to 0.
     10
     11        Test: css3/flexbox/negative-margins-assert.html
     12
     13        * rendering/RenderFlexibleBox.cpp:
     14        (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
     15
    1162015-11-17  Sergio Villar Senin  <svillar@igalia.com>
    217
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r191336 r192513  
    124124    }
    125125
     126    // Due to negative margins, it is possible that we calculated a negative intrinsic width.
     127    // Make sure that we never return a negative width.
     128    minLogicalWidth = std::max(LayoutUnit(), minLogicalWidth);
    126129    maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth);
    127130
Note: See TracChangeset for help on using the changeset viewer.