implement basic horizontal flexing
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Aug 2011 20:29:40 +0000 (20:29 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Aug 2011 20:29:40 +0000 (20:29 +0000)
commitaf1398cf15c544bf0fb7e0194731d3b012495625
tree7ef345820a3fe94e8bb30df975d352c3d173401d
parentecdc5d096af8c9568e225b6855d4aa087dbbcbf7
implement basic horizontal flexing
https://bugs.webkit.org/show_bug.cgi?id=65045

Reviewed by David Hyatt.

Source/WebCore:

Test: css3/flexbox/001.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidth):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::FlexibleBoxIterator::FlexibleBoxIterator): flexitem iterator
(WebCore::RenderFlexibleBox::FlexibleBoxIterator::first):
(WebCore::RenderFlexibleBox::FlexibleBoxIterator::next):
(WebCore::RenderFlexibleBox::FlexibleBoxIterator::reset):
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::preferredFlexItemContentWidth): Returns the intrinsic size of a flex item's content.
(WebCore::RenderFlexibleBox::layoutHorizontalBlock): Runs the flex algorithm
(WebCore::preferredSizeForMarginsAndPadding):
(WebCore::RenderFlexibleBox::computePreferredSize): Calculate the preferred size of the
    flex items.
* rendering/RenderFlexibleBox.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/style/RenderStyleConstants.h:

LayoutTests:

* css3/flexbox/001-expected.txt: Added.
* css3/flexbox/001.html: Added.
* css3/flexbox/resources/flexbox.js: Added. I plan on using this file for other tests.
(insertAfter):
(checkHorizontalBoxen):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/001-expected.txt [new file with mode: 0644]
LayoutTests/css3/flexbox/001.html [new file with mode: 0644]
LayoutTests/css3/flexbox/resources/flexbox.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/style/RenderStyleConstants.h