зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1121748 - patch 2 - Use the flex-item frame's final size when computing its logical position within the flex container. r=smontagu
This commit is contained in:
Родитель
2df582470e
Коммит
d92097e485
|
@ -3676,8 +3676,12 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext,
|
|||
|
||||
//XXX Can we calculate the logical position more directly instead
|
||||
// of this double conversion?
|
||||
nsSize finalFlexedPhysicalSize =
|
||||
aAxisTracker.PhysicalSizeFromLogicalSizes(item->GetMainSize(),
|
||||
item->GetCrossSize());
|
||||
LogicalPoint framePos(outerWM, physicalPosn,
|
||||
containerWidth - item->Frame()->GetRect().width);
|
||||
containerWidth - finalFlexedPhysicalSize.width -
|
||||
item->GetBorderPadding().LeftRight());
|
||||
|
||||
// (Intentionally snapshotting this before ApplyRelativePositioning, to
|
||||
// maybe use for setting the flex container's baseline.)
|
||||
|
@ -3689,9 +3693,6 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext,
|
|||
if (item->HadMeasuringReflow()) {
|
||||
// We've already reflowed the child once. Was the size we gave it in
|
||||
// that reflow the same as its final (post-flexing/stretching) size?
|
||||
nsSize finalFlexedPhysicalSize =
|
||||
aAxisTracker.PhysicalSizeFromLogicalSizes(item->GetMainSize(),
|
||||
item->GetCrossSize());
|
||||
if (item->Frame()->GetSize() == finalFlexedPhysicalSize) {
|
||||
// It has the correct size --> no need to reflow! Just make sure it's
|
||||
// at the right position.
|
||||
|
|
Загрузка…
Ссылка в новой задаче