Changeset 104313 in webkit
- Timestamp:
- Jan 6, 2012 12:05:06 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r104309 r104313 1 2012-01-06 Tony Chang <tony@chromium.org> 2 3 Need to relayout when stretching the height of a flex item 4 https://bugs.webkit.org/show_bug.cgi?id=75661 5 6 Reviewed by Ojan Vafai. 7 8 * css3/flexbox/flex-align-stretch-expected.txt: Added. 9 * css3/flexbox/flex-align-stretch.html: Added. 10 1 11 2012-01-06 Dmitry Lomov <dslomov@google.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r104312 r104313 1 2012-01-06 Tony Chang <tony@chromium.org> 2 3 Need to relayout when stretching the height of a flex item 4 https://bugs.webkit.org/show_bug.cgi?id=75661 5 6 Reviewed by Ojan Vafai. 7 8 Test: css3/flexbox/flex-align-stretch.html 9 10 * rendering/RenderFlexibleBox.cpp: 11 (WebCore::RenderFlexibleBox::computePreferredMainAxisExtent): Always clear the override size since 12 it may be set when aligning. 13 (WebCore::RenderFlexibleBox::alignChildren): Only relayout if the height changed. 14 1 15 2012-01-06 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r102837 r104313 489 489 LayoutUnit flexboxAvailableContentExtent = mainAxisContentExtent(); 490 490 for (RenderBox* child = iterator.first(); child; child = iterator.next()) { 491 child->clearOverrideSize(); 491 492 if (mainAxisLengthForChild(child).isAuto()) { 492 child->clearOverrideSize();493 493 if (!relayoutChildren) 494 494 child->setChildNeedsLayout(true); … … 699 699 case AlignStretch: { 700 700 if (!isColumnFlow() && child->style()->logicalHeight().isAuto()) { 701 LayoutUnit logicalHeightBefore = child->logicalHeight(); 701 702 LayoutUnit stretchedLogicalHeight = child->logicalHeight() + RenderFlexibleBox::availableAlignmentSpaceForChild(child); 702 703 child->setLogicalHeight(stretchedLogicalHeight); 703 704 child->computeLogicalHeight(); 704 // FIXME: We need to relayout if the height changed. 705 706 if (child->logicalHeight() != logicalHeightBefore) { 707 child->setOverrideHeight(child->logicalHeight()); 708 child->setLogicalHeight(0); 709 child->setChildNeedsLayout(true); 710 child->layoutIfNeeded(); 711 } 705 712 } 706 713 break;
Note: See TracChangeset
for help on using the changeset viewer.