Bug 917032 part 3: Move flex item physicalPosn computation up a bit higher. r=mats

This commit is contained in:
Daniel Holbert 2013-09-17 14:54:07 -07:00
Родитель 158e1f5c90
Коммит ccc1948ea0
1 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -2312,6 +2312,16 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
// we know its final size and position.
for (uint32_t i = 0; i < items.Length(); ++i) {
FlexItem& curItem = items[i];
nsPoint physicalPosn = axisTracker.PhysicalPositionFromLogicalPosition(
curItem.GetMainPosition(),
curItem.GetCrossPosition(),
contentBoxMainSize,
contentBoxCrossSize);
// Adjust physicalPosn to be relative to the container's border-box
// (i.e. its frame rect), instead of the container's content-box:
physicalPosn += containerContentBoxOrigin;
nsHTMLReflowState childReflowState(aPresContext, aReflowState,
curItem.Frame(),
nsSize(aReflowState.ComputedWidth(),
@ -2369,15 +2379,6 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
// after this point, because some of its methods (e.g. SetComputedWidth)
// internally call InitResizeFlags and stomp on mVResize & mHResize.
nsPoint physicalPosn = axisTracker.PhysicalPositionFromLogicalPosition(
curItem.GetMainPosition(),
curItem.GetCrossPosition(),
contentBoxMainSize,
contentBoxCrossSize);
// Adjust physicalPosn to be relative to the container's border-box
// (i.e. its frame rect), instead of the container's content-box:
physicalPosn += containerContentBoxOrigin;
nsHTMLReflowMetrics childDesiredSize;
nsReflowStatus childReflowStatus;
nsresult rv = ReflowChild(curItem.Frame(), aPresContext,