Need to implement flex-line-pack
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2012 17:16:39 +0000 (17:16 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2012 17:16:39 +0000 (17:16 +0000)
commitedb2aa3fdef36d5ca82c759e8cac324bdc596aa6
tree67dcd39b48c9be039fbcd5fec21942b8b64b3e10
parente22f12d55111d0628b1ad975db761548461652d3
Need to implement flex-line-pack
https://bugs.webkit.org/show_bug.cgi?id=70794

Reviewed by Ojan Vafai.

Source/WebCore:

Tests: css3/flexbox/multiline-line-pack-horizontal-column.html
       css3/flexbox/multiline-line-pack.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
(WebCore::initialLinePackingOffset): Similar to initialPackingOffset.
(WebCore):
(WebCore::linePackingSpaceBetweenChildren): Similar to packingSpaceBetweenChildren.
(WebCore::RenderFlexibleBox::packFlexLines): Move lines based on flex-line-pack.
    Note that we don't need to relayout on stretch because
    alignChildren will do that for us (only auto size needs stretching).
(WebCore::RenderFlexibleBox::flipForWrapReverse): Pull out the initial
    cross axis offset before calling packFlexLines because we can
    move the the line contexts.
* rendering/RenderFlexibleBox.h:

LayoutTests:

Updated the old multiline tests to have -webkit-flex-line-pack: start,
which was the previous default behavior. The correct default behavior
is stretch.

* css3/flexbox/multiline-align.html:
* css3/flexbox/multiline-column-auto.html:
* css3/flexbox/multiline-line-pack-expected.txt: Added.
* css3/flexbox/multiline-line-pack-horizontal-column-expected.txt: Added.
* css3/flexbox/multiline-line-pack-horizontal-column.html: Added.
* css3/flexbox/multiline-line-pack.html: Added.
* css3/flexbox/multiline-pack.html:
* css3/flexbox/multiline-reverse-wrap-overflow.html:
* css3/flexbox/multiline-shrink-to-fit.html:
* css3/flexbox/multiline.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/multiline-align.html
LayoutTests/css3/flexbox/multiline-column-auto.html
LayoutTests/css3/flexbox/multiline-line-pack-expected.txt [new file with mode: 0644]
LayoutTests/css3/flexbox/multiline-line-pack-horizontal-column-expected.txt [new file with mode: 0644]
LayoutTests/css3/flexbox/multiline-line-pack-horizontal-column.html [new file with mode: 0644]
LayoutTests/css3/flexbox/multiline-line-pack.html [new file with mode: 0644]
LayoutTests/css3/flexbox/multiline-pack.html
LayoutTests/css3/flexbox/multiline-reverse-wrap-overflow.html
LayoutTests/css3/flexbox/multiline-shrink-to-fit.html
LayoutTests/css3/flexbox/multiline.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h