Need to handle absolutely positioned elements inside flexboxes
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jan 2012 23:52:56 +0000 (23:52 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jan 2012 23:52:56 +0000 (23:52 +0000)
commit55cb9a41bd142fc266c80dd630427587b5f08e67
treed94d04e293795bd20fd353a77d9391cb71f1d3e5
parentb172d5119c582b9f0edb1da49c9d724824dd7f10
Need to handle absolutely positioned elements inside flexboxes
https://bugs.webkit.org/show_bug.cgi?id=70793

Reviewed by David Hyatt.

Source/WebCore:

Tests: css3/flexbox/insert-text-crash.html
       css3/flexbox/position-absolute-child.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computePreferredMainAxisExtent): Skip the size of positioned elements.
(WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithm): Add placeholders for positioned elements.
(WebCore::RenderFlexibleBox::prepareChildForPositionedLayout): Positions the layer for the positioned child.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Handle positioned elements.
(WebCore::RenderFlexibleBox::layoutColumnReverse): Adjust the main axis offset of the layer for positioned elements.
* rendering/RenderFlexibleBox.h:

LayoutTests:

* css3/flexbox/insert-text-crash-expected.txt: Added.
* css3/flexbox/insert-text-crash.html: Added.
* css3/flexbox/position-absolute-child-expected.txt: Added.
* css3/flexbox/position-absolute-child.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@104645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/insert-text-crash-expected.txt [new file with mode: 0644]
LayoutTests/css3/flexbox/insert-text-crash.html [new file with mode: 0644]
LayoutTests/css3/flexbox/position-absolute-child-expected.txt [new file with mode: 0644]
LayoutTests/css3/flexbox/position-absolute-child.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h