Need to implement flex-flow: row-reverse
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Dec 2011 21:51:16 +0000 (21:51 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Dec 2011 21:51:16 +0000 (21:51 +0000)
commitc928233df46e2afb7751e92d86086f6fd7524823
treeabc0d6ea0bbb82ca7e76d9c7e164e55c898ece6e
parent206327a506e4d2fd418ffd983c69d0c3167480ac
Need to implement flex-flow: row-reverse
https://bugs.webkit.org/show_bug.cgi?id=70778

Reviewed by Ojan Vafai.

Source/WebCore:

We can't just change the direction of the FlexOrderIterator because we want the overflow to be
on the left side.  Instead, we apply similar logic as when we're laying out RTL content. Putting
the check in isLeftToRightFlow() lets us flip the flexbox's border and padding and the flexitems'
margins.  We then layout from right to left in layoutAndPlaceChildren.

Also remove 2 uncalled functions.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::isReverseFlow):
(WebCore::RenderFlexibleBox::isLeftToRightFlow):
* rendering/RenderFlexibleBox.h:

LayoutTests:

* css3/flexbox/flex-flow-expected.txt:
* css3/flexbox/flex-flow.html: Added test cases to make sure start and end still apply to the text flow direction.
* css3/flexbox/flex-flow-border-expected.txt:
* css3/flexbox/flex-flow-border.html: Single flexitem, so reverse does nothing
* css3/flexbox/flex-flow-margins-auto-size-expected.txt:
* css3/flexbox/flex-flow-margins-auto-size.html: Ditto.  The orthogonal tests fail, but they've always failed.
* css3/flexbox/flex-flow-margins-expected.txt:
* css3/flexbox/flex-flow-margins.html: Ditto.
* css3/flexbox/flex-flow-orientations-expected.txt:
* css3/flexbox/flex-flow-orientations.html: This test has 2 flexitems, the positions of which are now flipped.
* css3/flexbox/flex-flow-overflow-expected.txt:
* css3/flexbox/flex-flow-overflow.html: The overflow should go in the opposite direction. That is, the overflow
of rtl should be the same as row-reverse.
* css3/flexbox/flex-flow-padding-expected.txt:
* css3/flexbox/flex-flow-padding.html: Single flexitem, no change.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@101703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/flex-flow-border-expected.txt
LayoutTests/css3/flexbox/flex-flow-border.html
LayoutTests/css3/flexbox/flex-flow-expected.txt
LayoutTests/css3/flexbox/flex-flow-margins-auto-size-expected.txt
LayoutTests/css3/flexbox/flex-flow-margins-auto-size.html
LayoutTests/css3/flexbox/flex-flow-margins-expected.txt
LayoutTests/css3/flexbox/flex-flow-margins.html
LayoutTests/css3/flexbox/flex-flow-orientations-expected.txt
LayoutTests/css3/flexbox/flex-flow-orientations.html
LayoutTests/css3/flexbox/flex-flow-overflow-expected.txt
LayoutTests/css3/flexbox/flex-flow-overflow.html
LayoutTests/css3/flexbox/flex-flow-padding-expected.txt
LayoutTests/css3/flexbox/flex-flow-padding.html
LayoutTests/css3/flexbox/flex-flow.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h