Ignore:
Timestamp:
Feb 12, 2015, 12:00:50 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r179987.
https://bugs.webkit.org/show_bug.cgi?id=141525

caused debug tests to fail (Requested by alexchristensen on
#webkit).

Reverted changeset:

"[CSS Grid Layout] Invalid initialization of track sizes with
non spanning grid items"
https://bugs.webkit.org/show_bug.cgi?id=140763
http://trac.webkit.org/changeset/179987

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r179987 r180003  
    585585    RenderBox& gridItem() const { return m_gridItem; }
    586586    GridCoordinate coordinate() const { return m_coordinate; }
    587 #if !ASSERT_DISABLED
    588     size_t span() const { return m_span; }
    589 #endif
    590587
    591588    bool operator<(const GridItemWithSpan other) const
     
    623620    for (auto trackIndex : sizingData.contentSizedTracksIndex) {
    624621        GridIterator iterator(m_grid, direction, trackIndex);
    625         GridTrack& track = (direction == ForColumns) ? sizingData.columnTracks[trackIndex] : sizingData.rowTracks[trackIndex];
    626622
    627623        while (RenderBox* gridItem = iterator.nextGridItem()) {
    628624            if (itemsSet.add(gridItem).isNewEntry) {
    629625                const GridCoordinate& coordinate = cachedGridCoordinate(*gridItem);
    630                 if (integerSpanForDirection(coordinate, direction) == 1)
    631                     resolveContentBasedTrackSizingFunctionsForNonSpanningItems(direction, coordinate, *gridItem, track, sizingData.columnTracks);
    632                 else if (!spanningItemCrossesFlexibleSizedTracks(coordinate, direction))
     626                // We should not include items spanning more than one track that span tracks with flexible sizing functions.
     627                if (integerSpanForDirection(coordinate, direction) == 1 || !spanningItemCrossesFlexibleSizedTracks(coordinate, direction))
    633628                    sizingData.itemsSortedByIncreasingSpan.append(GridItemWithSpan(*gridItem, coordinate, direction));
    634629            }
     
    651646}
    652647
    653 void RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems(GridTrackSizingDirection direction, const GridCoordinate& coordinate, RenderBox& gridItem, GridTrack& track, Vector<GridTrack>& columnTracks)
    654 {
    655     const GridResolvedPosition trackPosition = (direction == ForColumns) ? coordinate.columns.resolvedInitialPosition : coordinate.rows.resolvedInitialPosition;
    656     GridTrackSize trackSize = gridTrackSize(direction, trackPosition.toInt());
    657 
    658     if (trackSize.hasMinContentMinTrackBreadth())
    659         track.setBaseSize(std::max(track.baseSize(), minContentForChild(gridItem, direction, columnTracks)));
    660     else if (trackSize.hasMaxContentMinTrackBreadth())
    661         track.setBaseSize(std::max(track.baseSize(), maxContentForChild(gridItem, direction, columnTracks)));
    662 
    663     if (trackSize.hasMinContentMaxTrackBreadth())
    664         track.setGrowthLimit(std::max(track.growthLimit(), minContentForChild(gridItem, direction, columnTracks)));
    665     else if (trackSize.hasMaxContentMaxTrackBreadth())
    666         track.setGrowthLimit(std::max(track.growthLimit(), maxContentForChild(gridItem, direction, columnTracks)));
    667 }
    668 
    669648void RenderGrid::resolveContentBasedTrackSizingFunctionsForItems(GridTrackSizingDirection direction, GridSizingData& sizingData, GridItemWithSpan& gridItemWithSpan, FilterFunction filterFunction, SizingFunction sizingFunction, AccumulatorGetter trackGetter, AccumulatorGrowFunction trackGrowthFunction, FilterFunction growAboveMaxBreadthFilterFunction)
    670649{
    671     ASSERT(gridItemWithSpan.span() > 1);
    672650    const GridCoordinate& coordinate = gridItemWithSpan.coordinate();
    673651    const GridResolvedPosition initialTrackPosition = (direction == ForColumns) ? coordinate.columns.resolvedInitialPosition : coordinate.rows.resolvedInitialPosition;
Note: See TracChangeset for help on using the changeset viewer.