diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp index 1dcef36f15..65990f2746 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp @@ -36,7 +36,8 @@ namespace WebCore { class FlexBoxIterator { public: - FlexBoxIterator(RenderFlexibleBox* parent) { + FlexBoxIterator(RenderFlexibleBox* parent) + { box = parent; if (box->style()->boxOrient() == HORIZONTAL && box->style()->direction() == RTL) forward = box->style()->boxDirection() != BNORMAL; @@ -56,17 +57,20 @@ public: reset(); } - void reset() { + void reset() + { current = 0; currentOrdinal = forward ? 0 : lastOrdinal+1; } - RenderBox* first() { + RenderBox* first() + { reset(); return next(); } - RenderBox* next() { + RenderBox* next() + { do { if (!current) { if (forward) { @@ -336,7 +340,9 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren) } child = iterator.next(); } - + + RenderBlock::startDelayUpdateScrollInfo(); + // We do 2 passes. The first pass is simply to lay everyone out at // their preferred widths. The second pass handles flexing the children. do { @@ -561,7 +567,9 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren) } while (haveFlex); m_flexingChildren = false; - + + RenderBlock::finishDelayUpdateScrollInfo(); + if (remainingSpace > 0 && ((style()->direction() == LTR && style()->boxPack() != BSTART) || (style()->direction() == RTL && style()->boxPack() != BEND))) { // Children must be repositioned. @@ -648,7 +656,7 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren) { int xPos = borderLeft() + paddingLeft(); int yPos = borderTop() + paddingTop(); - if( style()->direction() == RTL ) + if (style()->direction() == RTL) xPos = width() - paddingRight() - borderRight(); int toAdd = borderBottom() + paddingBottom() + horizontalScrollbarHeight(); bool heightSpecified = false; @@ -789,6 +797,8 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren) } } + RenderBlock::startDelayUpdateScrollInfo(); + // We do 2 passes. The first pass is simply to lay everyone out at // their preferred widths. The second pass handles flexing the children. // Our first pass is done without flexing. We simply lay the children @@ -977,6 +987,8 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren) } } while (haveFlex); + RenderBlock::finishDelayUpdateScrollInfo(); + if (style()->boxPack() != BSTART && remainingSpace > 0) { // Children must be repositioned. int offset = 0; |