Bug 992077 patch 4 - Stop using OverflowChangedTracker::CHILDREN_AND_PARENT_CHANGED for the overflow area updates dealing with absolutely positioned elements contained by relatively positioned table parts. r=mats

The old code here was also updating overflow areas on more frames than
needed.  (Using CHILDREN_CHANGED on positionedPart itself causes test
failures because positionedPart's overflow area doesn't change in the
overflow updating process, so no overflow change is propagated to the
parent; it's the parent that actually needs the update.)
This commit is contained in:
L. David Baron 2015-02-16 16:34:29 +13:00
parent 07b011d0db
commit 0e1e1e216c

View File

@ -1951,14 +1951,21 @@ nsTableFrame::FixupPositionedTableParts(nsPresContext* aPresContext,
// FIXME: Unconditionally using NS_UNCONSTRAINEDSIZE for the height and
// ignoring any change to the reflow status aren't correct. We'll never
// paginate absolutely positioned frames.
overflowTracker.AddFrame(positionedPart,
OverflowChangedTracker::CHILDREN_AND_PARENT_CHANGED);
nsFrame* positionedFrame = static_cast<nsFrame*>(positionedPart);
positionedFrame->FinishReflowWithAbsoluteFrames(PresContext(),
desiredSize,
reflowState,
reflowStatus,
true);
// FinishReflowWithAbsoluteFrames has updated overflow on
// |positionedPart|. We need to make sure that update propagates
// through the intermediate frames between it and this frame.
nsIFrame* positionedFrameParent = positionedPart->GetParent();
if (positionedFrameParent != this) {
overflowTracker.AddFrame(positionedFrameParent,
OverflowChangedTracker::CHILDREN_CHANGED);
}
}
// Propagate updated overflow areas up the tree.