Changeset 145457 in webkit
- Timestamp:
- Mar 11, 2013, 6:39:24 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r145453 r145457 1 2013-03-11 Tony Chang <tony@chromium.org> 2 3 Small code cleanup in RenderFlexibleBox 4 https://bugs.webkit.org/show_bug.cgi?id=112076 5 6 Reviewed by Ojan Vafai. 7 8 No new tests, this is a refactor and existing tests in css3/flexbox should pass. 9 10 * rendering/RenderFlexibleBox.cpp: 11 (WebCore::RenderFlexibleBox::layoutBlock): Remove unused param from repositionLogicalHeightDependentFlexItems. 12 (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Remove unused param from repositionLogicalHeightDependentFlexItems. 13 The clientLogicalBottom can't have changed in this time (the only thing we've done is align children). 14 (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Just call layout() if we marked the flexitem as needing layout. 15 (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Just call layout() if we marked the flexitem as needing layout. 16 * rendering/RenderFlexibleBox.h: 17 (RenderFlexibleBox): Remove unused param from repositionLogicalHeightDependentFlexItems. 18 1 19 2013-03-11 Jochen Eisinger <jochen@chromium.org> 2 20 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r144497 r145457 358 358 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); 359 359 updateLogicalHeight(); 360 repositionLogicalHeightDependentFlexItems(lineContexts , oldClientAfterEdge);360 repositionLogicalHeightDependentFlexItems(lineContexts); 361 361 362 362 RenderBlock::finishDelayUpdateScrollInfo(); … … 418 418 } 419 419 420 void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineContext>& lineContexts , LayoutUnit& oldClientAfterEdge)420 void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineContext>& lineContexts) 421 421 { 422 422 LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? LayoutUnit() : lineContexts[0].crossAxisOffset; … … 429 429 alignChildren(lineContexts); 430 430 431 if (style()->flexWrap() == FlexWrapReverse) { 432 if (isHorizontalFlow()) 433 oldClientAfterEdge = clientLogicalBottom(); 431 if (style()->flexWrap() == FlexWrapReverse) 434 432 flipForWrapReverse(lineContexts, crossAxisStartEdge); 435 }436 433 437 434 // direction:rtl + flex-direction:column means the cross-axis direction is flipped. … … 894 891 if (hasOrthogonalFlow(child) && (flexBasisForChild(child).isAuto() || childMainAxisMin.isAuto())) { 895 892 child->setChildNeedsLayout(true, MarkOnlyThis); 896 child->layout IfNeeded();893 child->layout(); 897 894 } 898 895 … … 1386 1383 child->setLogicalHeight(0); 1387 1384 child->setChildNeedsLayout(true, MarkOnlyThis); 1388 child->layout IfNeeded();1385 child->layout(); 1389 1386 } 1390 1387 } … … 1398 1395 child->setOverrideLogicalContentWidth(childWidth - child->borderAndPaddingLogicalWidth()); 1399 1396 child->setChildNeedsLayout(true, MarkOnlyThis); 1400 child->layout IfNeeded();1397 child->layout(); 1401 1398 } 1402 1399 } -
trunk/Source/WebCore/rendering/RenderFlexibleBox.h
r144104 r145457 146 146 bool hasAutoMarginsInCrossAxis(RenderBox* child) const; 147 147 bool updateAutoMarginsInCrossAxis(RenderBox* child, LayoutUnit availableAlignmentSpace); 148 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>& , LayoutUnit& oldClientAfterEdge);148 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&); 149 149 void appendChildFrameRects(ChildFrameRects&); 150 150 void repaintChildrenDuringLayoutIfMoved(const ChildFrameRects&);
Note:
See TracChangeset
for help on using the changeset viewer.