Changeset 183739 in webkit


Ignore:
Timestamp:
May 4, 2015 1:37:03 AM (9 years ago)
Author:
Manuel Rego Casasnovas
Message:

[CSS Grid Layout] Wrong computed style for named grid lines in implicit tracks
https://bugs.webkit.org/show_bug.cgi?id=144449

Reviewed by Sergio Villar Senin.

Source/WebCore:

If there're implicit tracks then trackPositions is bigger than
trackSizes, so we need to use the proper index to append the trailing
<ident>s in valueForGridTrackList().

Test: fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForGridTrackList):

LayoutTests:

  • fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks-expected.txt: Added.
  • fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r183732 r183739  
     12015-05-04  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [CSS Grid Layout] Wrong computed style for named grid lines in implicit tracks
     4        https://bugs.webkit.org/show_bug.cgi?id=144449
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        * fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks-expected.txt: Added.
     9        * fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html: Added.
     10
    1112015-05-02  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r183735 r183739  
     12015-05-04  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [CSS Grid Layout] Wrong computed style for named grid lines in implicit tracks
     4        https://bugs.webkit.org/show_bug.cgi?id=144449
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        If there're implicit tracks then trackPositions is bigger than
     9        trackSizes, so we need to use the proper index to append the trailing
     10        <ident>s in valueForGridTrackList().
     11
     12        Test: fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html
     13
     14        * css/CSSComputedStyleDeclaration.cpp:
     15        (WebCore::valueForGridTrackList):
     16
    1172015-05-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
    218
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r183591 r183739  
    10541054
    10551055    auto list = CSSValueList::createSpaceSeparated();
     1056    unsigned insertionIndex;
    10561057    if (isRenderGrid) {
    10571058        const Vector<LayoutUnit>& trackPositions = direction == ForColumns ? downcast<RenderGrid>(*renderer).columnPositions() : downcast<RenderGrid>(*renderer).rowPositions();
     
    10641065            list.get().append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i], style));
    10651066        }
     1067        insertionIndex = trackPositions.size() - 1;
    10661068    } else {
    10671069        for (unsigned i = 0; i < trackSizes.size(); ++i) {
     
    10691071            list.get().append(specifiedValueForGridTrackSize(trackSizes[i], style));
    10701072        }
     1073        insertionIndex = trackSizes.size();
    10711074    }
    10721075
    10731076    // Those are the trailing <ident>* allowed in the syntax.
    1074     addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, trackSizes.size(), list.get());
     1077    addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, insertionIndex, list.get());
    10751078    return WTF::move(list);
    10761079}
Note: See TracChangeset for help on using the changeset viewer.