diff --git a/layout/generic/nsAbsoluteContainingBlock.cpp b/layout/generic/nsAbsoluteContainingBlock.cpp index 9a8dac5d41a..65ac8befac7 100644 --- a/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/layout/generic/nsAbsoluteContainingBlock.cpp @@ -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);