Changeset 98628 in webkit


Ignore:
Timestamp:
Oct 27, 2011 1:30:08 PM (13 years ago)
Author:
tony@chromium.org
Message:

fix sizing of auto sized flexbox
https://bugs.webkit.org/show_bug.cgi?id=70839

Reviewed by David Hyatt.

Source/WebCore:

Correctly set the height of the flexbox when we have a column flow
and the height is auto.

Tests: css3/flexbox/columns-auto-size.html

css3/flexbox/flex-flow-margins-auto-size.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::layoutBlock): Always computeLogicalHeight() after we're done placing children.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): Set the height as we place children.

LayoutTests:

  • css3/flexbox/columns-auto-size-expected.txt: Added.
  • css3/flexbox/columns-auto-size.html: Added.
  • css3/flexbox/flex-flow-margins-auto-size-expected.txt: Added.
  • css3/flexbox/flex-flow-margins-auto-size.html: Added.

A bunch of these cases fail, but that's because of bug 70769.

Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r98627 r98628  
     12011-10-27  Tony Chang  <tony@chromium.org>
     2
     3        fix sizing of auto sized flexbox
     4        https://bugs.webkit.org/show_bug.cgi?id=70839
     5
     6        Reviewed by David Hyatt.
     7
     8        * css3/flexbox/columns-auto-size-expected.txt: Added.
     9        * css3/flexbox/columns-auto-size.html: Added.
     10        * css3/flexbox/flex-flow-margins-auto-size-expected.txt: Added.
     11        * css3/flexbox/flex-flow-margins-auto-size.html: Added.
     12            A bunch of these cases fail, but that's because of bug 70769.
     13
    1142011-10-25  Vangelis Kokkevis  <vangelis@chromium.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r98627 r98628  
     12011-10-27  Tony Chang  <tony@chromium.org>
     2
     3        fix sizing of auto sized flexbox
     4        https://bugs.webkit.org/show_bug.cgi?id=70839
     5
     6        Reviewed by David Hyatt.
     7
     8        Correctly set the height of the flexbox when we have a column flow
     9        and the height is auto.
     10
     11        Tests: css3/flexbox/columns-auto-size.html
     12               css3/flexbox/flex-flow-margins-auto-size.html
     13
     14        * rendering/RenderFlexibleBox.cpp:
     15        (WebCore::RenderFlexibleBox::layoutBlock): Always computeLogicalHeight() after we're done placing children.
     16        (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): Set the height as we place children.
     17
    1182011-10-25  Vangelis Kokkevis  <vangelis@chromium.org>
    219
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r98594 r98628  
    184184    layoutInlineDirection(relayoutChildren);
    185185
    186     if (isColumnFlow())
    187         computeLogicalWidth();
    188     else
    189         computeLogicalHeight();
     186    computeLogicalHeight();
    190187
    191188    if (size() != previousSize)
     
    692689        if (hasPackingSpace(availableFreeSpace, totalPositiveFlexibility) && style()->flexPack() == PackJustify && childSizes.size() > 1)
    693690            startEdge += availableFreeSpace / (childSizes.size() - 1);
    694     }
    695 
     691
     692        if (isColumnFlow())
     693            setLogicalHeight(startEdge);
     694    }
    696695    alignChildrenBlockDirection(iterator, maxAscent);
    697696}
Note: See TracChangeset for help on using the changeset viewer.