changing -webkit-order should change the paint order of flex items
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2012 07:27:44 +0000 (07:27 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2012 07:27:44 +0000 (07:27 +0000)
commite06fce1995b3be60198919351a70b76c17d197b8
treef8ef1b2e86e030092be23b9a2a7a9d3a09245df3
parent8e056ae629c3470ad608be9ff60e1c9aad98fee3
changing -webkit-order should change the paint order of flex items
https://bugs.webkit.org/show_bug.cgi?id=92041

Reviewed by Ojan Vafai.

Source/WebCore:

Override paintChildren and use the flex order iterator to determine the order to paint the children.

Test: css3/flexbox/order-painting.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock): Save a reference to the order iterator.
(WebCore::RenderFlexibleBox::paintChildren):
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox): Hold a reference to the order iterator so we don't have to recreate it at paint time.
    Also mark all the virtual methods with OVERRIDE.

LayoutTests:

Use a ref test since this is testing paint behavior.

* css3/flexbox/order-painting-expected.html: Added.
* css3/flexbox/order-painting.html: Added.

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