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:
roc+%cs.cmu.edu 2007-05-02 00:07:51 +00:00
Родитель 1d056773d4
Коммит 23c362d19c
1 изменённых файлов: 10 добавлений и 6 удалений

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

@ -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);