Bug 372703. Position child views whenever we place an abs-pos child; even if the child hasn't moved, this frame itself might have, so view offsets might have changed. r=eli,sr=dbaron

This commit is contained in:
2007-05-01 17:07:51 -07:00
parent 76aa755c47
commit c5083d186a

View File

@@ -418,11 +418,16 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
kidDesiredSize.width, kidDesiredSize.height);
aKidFrame->SetRect(rect);
// Size and position the view and set its opacity, visibility, content
// transparency, and clip
nsContainerFrame::SyncFrameViewAfterReflow(aPresContext, aKidFrame,
aKidFrame->GetView(),
&kidDesiredSize.mOverflowArea);
nsIView* view = aKidFrame->GetView();
if (view) {
// Size and position the view and set its opacity, visibility, content
// transparency, and clip
nsContainerFrame::SyncFrameViewAfterReflow(aPresContext, aKidFrame,
view,
&kidDesiredSize.mOverflowArea);
} else {
nsContainerFrame::PositionChildViews(aKidFrame);
}
if (oldRect.TopLeft() != rect.TopLeft() ||
(aDelegatingFrame->GetStateBits() & NS_FRAME_FIRST_REFLOW) ||
@@ -436,7 +441,6 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
aKidFrame->GetParent()->Invalidate(oldOverflowRect);
aKidFrame->GetParent()->Invalidate(kidDesiredSize.mOverflowArea +
rect.TopLeft());
nsContainerFrame::PositionChildViews(aKidFrame);
} else if (oldRect.Size() != rect.Size()) {
// Invalidate the area where the frame changed size.
nscoord innerWidth = PR_MIN(oldRect.width, rect.width);