Changeset 181141 in webkit


Ignore:
Timestamp:
Mar 6, 2015 12:55:53 AM (9 years ago)
Author:
svillar@igalia.com
Message:

[CSS Grid Layout] ASSERTION FAILED !track.growthLimitIsInfinite() in RenderGrid::computeUsedBreadthOfGridTracks
https://bugs.webkit.org/show_bug.cgi?id=142265

Reviewed by Darin Adler.

Source/WebCore:

The problem is that computeUsedBreadthOfGridTracks() could return

-1 for rows because we're calling computeContentLogicalHeight()
which can indeed return -1. In those cases we should clamp the
value to 0 the same as Flexbox does otherwise we could end up with
a negative value in the min track sizing function.

Test: fast/css-grid-layout/grid-indefinite-calculated-height-crash.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):

LayoutTests:

New test that crashes on Debug builds if we don't handle the case
of computeUsedBreadthOfGridTracks() returning -1.

  • fast/css-grid-layout/grid-indefinite-calculated-height-crash-expected.txt: Added.
  • fast/css-grid-layout/grid-indefinite-calculated-height-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r181135 r181141  
     12015-03-06  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        [CSS Grid Layout] ASSERTION FAILED !track.growthLimitIsInfinite() in RenderGrid::computeUsedBreadthOfGridTracks
     4        https://bugs.webkit.org/show_bug.cgi?id=142265
     5
     6        Reviewed by Darin Adler.
     7
     8        New test that crashes on Debug builds if we don't handle the case
     9        of computeUsedBreadthOfGridTracks() returning -1.
     10
     11        * fast/css-grid-layout/grid-indefinite-calculated-height-crash-expected.txt: Added.
     12        * fast/css-grid-layout/grid-indefinite-calculated-height-crash.html: Added.
     13
    1142015-03-05  Brent Fulgham  <bfulgham@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r181139 r181141  
     12015-03-06  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        [CSS Grid Layout] ASSERTION FAILED !track.growthLimitIsInfinite() in RenderGrid::computeUsedBreadthOfGridTracks
     4        https://bugs.webkit.org/show_bug.cgi?id=142265
     5
     6        Reviewed by Darin Adler.
     7
     8         The problem is that computeUsedBreadthOfGridTracks() could return
     9        -1 for rows because we're calling computeContentLogicalHeight()
     10        which can indeed return -1. In those cases we should clamp the
     11        value to 0 the same as Flexbox does otherwise we could end up with
     12        a negative value in the min track sizing function.
     13
     14        Test: fast/css-grid-layout/grid-indefinite-calculated-height-crash.html
     15
     16        * rendering/RenderGrid.cpp:
     17        (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
     18
    1192015-03-05  Simon Fraser  <simon.fraser@apple.com>
    220
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r180623 r181141  
    444444{
    445445    ASSERT(trackLength.isSpecified());
    446     return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight(style().logicalHeight()));
     446    return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : std::max(LayoutUnit(), computeContentLogicalHeight(style().logicalHeight())));
    447447}
    448448
Note: See TracChangeset for help on using the changeset viewer.