take padding/border on flexbox into account with direction:rtl
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2011 21:45:54 +0000 (21:45 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2011 21:45:54 +0000 (21:45 +0000)
commitdc783b1546318ba476d8ab5abb172a950f1ee70b
treede660d50f718693d5d21a65aca9e8d4f728d61fc
parentcd325b1242acd4d3feda9b6d3862b529fc37d261
take padding/border on flexbox into account with direction:rtl
https://bugs.webkit.org/show_bug.cgi?id=68846

Reviewed by David Hyatt.

Source/WebCore:

Use the logicalWidth of the flexbox instead of it's availableLogicalWidth
so that we include the flexbox's border and padding.

Also, change all uses of availableLogicalWidth to contentLogicalWidth.
The former takes multi-column into account. Multi-column flexboxes don't
make any sense, so there's no point in calling availableLogicalWidth.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::flowAwareLogicalWidth):
(WebCore::RenderFlexibleBox::flowAwareContentLogicalWidth):
(WebCore::RenderFlexibleBox::computePreferredLogicalWidth):
(WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmInlineDirection):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection):
* rendering/RenderFlexibleBox.h:

LayoutTests:

* css3/flexbox/writing-modes-expected.txt:
* css3/flexbox/writing-modes.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/writing-modes-expected.txt
LayoutTests/css3/flexbox/writing-modes.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h