support overflow:auto and overflow:scroll in new flexbox
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 19:27:54 +0000 (19:27 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 19:27:54 +0000 (19:27 +0000)
commitff48606755a9ae7b27fa8370d0c475e502aa8350
tree1e7ff40645f437813b9cc24ab3adacf4509eced6
parent5ba814ecd779c272a2459dec79bdbe47124b6c39
support overflow:auto and overflow:scroll in new flexbox
https://bugs.webkit.org/show_bug.cgi?id=76953

Reviewed by David Hyatt.

Source/WebCore:

Tests: css3/flexbox/flexbox-overflow-auto-expected.html
       css3/flexbox/flexbox-overflow-auto.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::addLayoutOverflow): In the case of reverse flexboxen, we can overflow up or to the left (like horizontal-bt or rtl content).
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock): Call updateScrollInfoAfterLayout() to add overflow scrollbars.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): In row-reverse, offset the start of the content by the scrollbar.
(WebCore::RenderFlexibleBox::layoutColumnReverse): In column-reverse, offset the start of the content by the scrollbar.
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox): Make isHorizontalFlow public.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyleBitfields::isReverseFlexDirection): Convenience method.

LayoutTests:

* css3/flexbox/flexbox-overflow-auto-expected.html: Added.
* css3/flexbox/flexbox-overflow-auto.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/flexbox-overflow-auto-expected.html [new file with mode: 0644]
LayoutTests/css3/flexbox/flexbox-overflow-auto.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h
Source/WebCore/rendering/style/RenderStyle.h