Fix for bug 191339: M130A Trunk crashing while printing [@ nsLineLayout::ReflowFrame]

Modified nsBlockFrame::Reflow() so that it reparents the frames in the overflow placeholder list when handing it off to an

ancestor that does not already have an overflow placeholder list.

r+sr=dbaron@dbaron.org
This commit is contained in:
kin%netscape.com 2003-02-24 19:02:08 +00:00
parent 2d0ab6461d
commit fb56972528
2 changed files with 16 additions and 2 deletions

View File

@ -968,8 +968,15 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
ancestorPlace->AppendFrames(ancestor, overflowPlace->FirstChild());
}
else {
ancestorPlace = new nsFrameList(overflowPlace->FirstChild());
// ancestor doesn't have an overflow place holder list, so
// create one. Note that we use AppendFrames() to add the
// frames, instead of passing them into the constructor, so
// we can levarage the code in AppendFrames() which updates
// the parent for each frame in the list.
ancestorPlace = new nsFrameList();
if (ancestorPlace) {
ancestorPlace->AppendFrames(ancestor, overflowPlace->FirstChild());
((nsBlockFrame*)ancestor)->SetOverflowPlaceholders(aPresContext, ancestorPlace);
}
else

View File

@ -968,8 +968,15 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
ancestorPlace->AppendFrames(ancestor, overflowPlace->FirstChild());
}
else {
ancestorPlace = new nsFrameList(overflowPlace->FirstChild());
// ancestor doesn't have an overflow place holder list, so
// create one. Note that we use AppendFrames() to add the
// frames, instead of passing them into the constructor, so
// we can levarage the code in AppendFrames() which updates
// the parent for each frame in the list.
ancestorPlace = new nsFrameList();
if (ancestorPlace) {
ancestorPlace->AppendFrames(ancestor, overflowPlace->FirstChild());
((nsBlockFrame*)ancestor)->SetOverflowPlaceholders(aPresContext, ancestorPlace);
}
else