Changeset 119015 in webkit
- Timestamp:
- May 30, 2012 6:37:04 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r119014 r119015 1 2012-05-30 Ojan Vafai <ojan@chromium.org> 2 3 Avoid second layout for flex-direction:row, flex-basis:auto flex items 4 https://bugs.webkit.org/show_bug.cgi?id=87901 5 6 Reviewed by Tony Chang. 7 8 No new tests. This is strictly a performance optimization and has no other 9 web visible changes. 10 11 Also, add FIXMEs for other cases where we could avoid doing layouts. 12 13 * rendering/RenderFlexibleBox.cpp: 14 (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): 15 (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): 16 (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): 17 1 18 2012-05-30 Zhenyao Mo <zmo@google.com> 2 19 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r118971 r119015 758 758 759 759 child->clearOverrideSize(); 760 if (preferredLengthForChild(child).isAuto()) { 760 // Only need to layout here if we will need to get the logicalHeight of the child in computeNextFlexLine. 761 if (hasOrthogonalFlow(child) && preferredLengthForChild(child).isAuto()) { 761 762 if (!relayoutChildren) 762 763 child->setChildNeedsLayout(true); … … 992 993 LayoutUnit childPreferredSize = childSizes[i] + mainAxisBorderAndPaddingExtentForChild(child); 993 994 setLogicalOverrideSize(child, childPreferredSize); 995 // FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905. 994 996 child->setChildNeedsLayout(true); 995 997 child->layoutIfNeeded(); … … 1214 1216 child->computeLogicalHeight(); 1215 1217 1218 // FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905. 1216 1219 if (child->logicalHeight() != logicalHeightBefore) { 1217 1220 child->setOverrideHeight(child->logicalHeight());
Note: See TracChangeset
for help on using the changeset viewer.