Fix for bug #92215: [Table Printing] Mozilla crashes when printing the front page of slashdot

Modified nsBlockFrame::ReflowDirtyLines() so that it
removes any floaters on it's continuing frames list,
if they are on lines that are being pulled up.

r=dbaron@fas.harvard.edu  sr=waterson@netscape.com
This commit is contained in:
kin%netscape.com 2001-09-21 13:41:52 +00:00
Родитель 711a573ed1
Коммит df98e67e74
2 изменённых файлов: 40 добавлений и 0 удалений

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

@ -2144,6 +2144,26 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
aState.mPrevChild->SetNextSibling(line->mFirstChild);
}
// If line contains floaters, remove them from aState.mNextInFlow's
// floater list. They will be pushed onto this blockframe's floater
// list, via BuildFloaterList(), when we are done reflowing dirty lines.
//
// XXX: If the call to BuildFloaterList() is removed from
// nsBlockFrame::Reflow(), we'll probably need to manually
// append the floaters to |this|'s floater list.
if (line->HasFloaters()) {
nsFloaterCache* fc = line->GetFirstFloater();
while (fc) {
if (fc->mPlaceholder) {
nsIFrame* floater = fc->mPlaceholder->GetOutOfFlowFrame();
if (floater)
aState.mNextInFlow->mFloaters.RemoveFrame(floater);
}
fc = fc->Next();
}
}
// Now reflow it and any lines that it makes during it's reflow
// (we have to loop here because reflowing the line may case a new
// line to be created; see SplitLine's callers for examples of

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

@ -2144,6 +2144,26 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
aState.mPrevChild->SetNextSibling(line->mFirstChild);
}
// If line contains floaters, remove them from aState.mNextInFlow's
// floater list. They will be pushed onto this blockframe's floater
// list, via BuildFloaterList(), when we are done reflowing dirty lines.
//
// XXX: If the call to BuildFloaterList() is removed from
// nsBlockFrame::Reflow(), we'll probably need to manually
// append the floaters to |this|'s floater list.
if (line->HasFloaters()) {
nsFloaterCache* fc = line->GetFirstFloater();
while (fc) {
if (fc->mPlaceholder) {
nsIFrame* floater = fc->mPlaceholder->GetOutOfFlowFrame();
if (floater)
aState.mNextInFlow->mFloaters.RemoveFrame(floater);
}
fc = fc->Next();
}
}
// Now reflow it and any lines that it makes during it's reflow
// (we have to loop here because reflowing the line may case a new
// line to be created; see SplitLine's callers for examples of