Ignore:
Timestamp:
Oct 14, 2013, 2:00:50 AM (12 years ago)
Author:
[email protected]
Message:

[CSS Grid Layout] 2 span positions are not resolved correctly
https://bugs.webkit.org/show_bug.cgi?id=119717

Reviewed by Andreas Kling.

From Blink r155397 by <[email protected]>

Source/WebCore:

Test: fast/css-grid-layout/grid-item-bad-resolution-double-span.html

Two opposite 'span' or 'auto' positions should be resolved using
the auto placement algorithm. We were only checking for the 'auto'
case. This also covers the case of other positions that, according
to the spec, should be treated as 'auto'.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::resolveGridPositionsFromStyle):

LayoutTests:

Added a new test case to check bad grid items resolution with two
opposite span positions. Also added a real grid container to check
also the resolution code path in some other tests.

  • fast/css-grid-layout/grid-item-area-get-set.html: Added a grid container.
  • fast/css-grid-layout/grid-item-bad-resolution-double-span-expected.txt: Added.
  • fast/css-grid-layout/grid-item-bad-resolution-double-span.html: Added.
  • fast/css-grid-layout/grid-item-end-after-get-set.html: Added a grid container.
  • fast/css-grid-layout/grid-item-start-before-get-set.html: Ditto.
File:
1 edited

Legend:

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

    r157211 r157389  
    730730    ASSERT(!initialPosition.isSpan() || !finalPosition.isSpan());
    731731
    732     if (initialPosition.isAuto() && finalPosition.isAuto()) {
     732    if (initialPosition.shouldBeResolvedAgainstOppositePosition() && finalPosition.shouldBeResolvedAgainstOppositePosition()) {
    733733        if (style()->gridAutoFlow() == AutoFlowNone)
    734734            return adoptPtr(new GridSpan(0, 0));
Note: See TracChangeset for help on using the changeset viewer.