Title: [145457] trunk/Source/WebCore
- Revision
- 145457
- Author
- t...@chromium.org
- Date
- 2013-03-11 18:39:24 -0700 (Mon, 11 Mar 2013)
Log Message
Small code cleanup in RenderFlexibleBox
https://bugs.webkit.org/show_bug.cgi?id=112076
Reviewed by Ojan Vafai.
No new tests, this is a refactor and existing tests in css3/flexbox should pass.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock): Remove unused param from repositionLogicalHeightDependentFlexItems.
(WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Remove unused param from repositionLogicalHeightDependentFlexItems.
The clientLogicalBottom can't have changed in this time (the only thing we've done is align children).
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Just call layout() if we marked the flexitem as needing layout.
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Just call layout() if we marked the flexitem as needing layout.
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox): Remove unused param from repositionLogicalHeightDependentFlexItems.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (145456 => 145457)
--- trunk/Source/WebCore/ChangeLog 2013-03-12 01:25:33 UTC (rev 145456)
+++ trunk/Source/WebCore/ChangeLog 2013-03-12 01:39:24 UTC (rev 145457)
@@ -1,3 +1,21 @@
+2013-03-11 Tony Chang <t...@chromium.org>
+
+ Small code cleanup in RenderFlexibleBox
+ https://bugs.webkit.org/show_bug.cgi?id=112076
+
+ Reviewed by Ojan Vafai.
+
+ No new tests, this is a refactor and existing tests in css3/flexbox should pass.
+
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutBlock): Remove unused param from repositionLogicalHeightDependentFlexItems.
+ (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Remove unused param from repositionLogicalHeightDependentFlexItems.
+ The clientLogicalBottom can't have changed in this time (the only thing we've done is align children).
+ (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Just call layout() if we marked the flexitem as needing layout.
+ (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Just call layout() if we marked the flexitem as needing layout.
+ * rendering/RenderFlexibleBox.h:
+ (RenderFlexibleBox): Remove unused param from repositionLogicalHeightDependentFlexItems.
+
2013-03-11 Jochen Eisinger <joc...@chromium.org>
Rename DefinitelyProcessingUserGesture to DefinitelyProcessingNewUserGesture
Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (145456 => 145457)
--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2013-03-12 01:25:33 UTC (rev 145456)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2013-03-12 01:39:24 UTC (rev 145457)
@@ -357,7 +357,7 @@
LayoutUnit oldClientAfterEdge = clientLogicalBottom();
updateLogicalHeight();
- repositionLogicalHeightDependentFlexItems(lineContexts, oldClientAfterEdge);
+ repositionLogicalHeightDependentFlexItems(lineContexts);
RenderBlock::finishDelayUpdateScrollInfo();
@@ -417,7 +417,7 @@
}
}
-void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineContext>& lineContexts, LayoutUnit& oldClientAfterEdge)
+void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineContext>& lineContexts)
{
LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? LayoutUnit() : lineContexts[0].crossAxisOffset;
alignFlexLines(lineContexts);
@@ -428,11 +428,8 @@
lineContexts[0].crossAxisExtent = crossAxisContentExtent();
alignChildren(lineContexts);
- if (style()->flexWrap() == FlexWrapReverse) {
- if (isHorizontalFlow())
- oldClientAfterEdge = clientLogicalBottom();
+ if (style()->flexWrap() == FlexWrapReverse)
flipForWrapReverse(lineContexts, crossAxisStartEdge);
- }
// direction:rtl + flex-direction:column means the cross-axis direction is flipped.
flipForRightToLeftColumn();
@@ -893,7 +890,7 @@
Length childMainAxisMin = isHorizontalFlow() ? child->style()->minWidth() : child->style()->minHeight();
if (hasOrthogonalFlow(child) && (flexBasisForChild(child).isAuto() || childMainAxisMin.isAuto())) {
child->setChildNeedsLayout(true, MarkOnlyThis);
- child->layoutIfNeeded();
+ child->layout();
}
// Before running the flex algorithm, 'auto' has a margin of 0.
@@ -1385,7 +1382,7 @@
child->setOverrideLogicalContentHeight(desiredLogicalHeight - child->borderAndPaddingLogicalHeight());
child->setLogicalHeight(0);
child->setChildNeedsLayout(true, MarkOnlyThis);
- child->layoutIfNeeded();
+ child->layout();
}
}
} else if (isColumnFlow() && child->style()->logicalWidth().isAuto()) {
@@ -1397,7 +1394,7 @@
if (childWidth != child->logicalWidth()) {
child->setOverrideLogicalContentWidth(childWidth - child->borderAndPaddingLogicalWidth());
child->setChildNeedsLayout(true, MarkOnlyThis);
- child->layoutIfNeeded();
+ child->layout();
}
}
}
Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.h (145456 => 145457)
--- trunk/Source/WebCore/rendering/RenderFlexibleBox.h 2013-03-12 01:25:33 UTC (rev 145456)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.h 2013-03-12 01:39:24 UTC (rev 145457)
@@ -145,7 +145,7 @@
void updateAutoMarginsInMainAxis(RenderBox* child, LayoutUnit autoMarginOffset);
bool hasAutoMarginsInCrossAxis(RenderBox* child) const;
bool updateAutoMarginsInCrossAxis(RenderBox* child, LayoutUnit availableAlignmentSpace);
- void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&, LayoutUnit& oldClientAfterEdge);
+ void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&);
void appendChildFrameRects(ChildFrameRects&);
void repaintChildrenDuringLayoutIfMoved(const ChildFrameRects&);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes