Fix for bug 105716: Can't delete the input characters in the above form page

Modified RemoveFrame() to call mFloaters.DestroyFrame(aOldFrame) after
the line search. This insures that aOldFrame is destroyed even if it
isn't found in the line list.

r=dbaron@fas.harvard.edu  sr=waterson@netscape.com
This commit is contained in:
kin%netscape.com 2001-12-10 14:38:55 +00:00
Родитель f1623c011a
Коммит 566f781bf7
2 изменённых файлов: 4 добавлений и 8 удалений

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

@ -4807,18 +4807,16 @@ nsBlockFrame::RemoveFrame(nsIPresContext* aPresContext,
return mAbsoluteContainer.RemoveFrame(this, aPresContext, aPresShell, aListName, aOldFrame);
}
else if (nsLayoutAtoms::floaterList == aListName) {
// Remove floater from the floater list first
mFloaters.RemoveFrame(aOldFrame);
// Find which line contains the floater
line_iterator line = begin_lines(), line_end = end_lines();
for ( ; line != line_end; ++line) {
if (line->IsInline() && line->RemoveFloater(aOldFrame)) {
aOldFrame->Destroy(aPresContext);
break;
}
}
mFloaters.DestroyFrame(aPresContext, aOldFrame);
// Mark every line at and below the line where the floater was dirty
// XXXldb This could be done more efficiently.
for ( ; line != line_end; ++line) {

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

@ -4807,18 +4807,16 @@ nsBlockFrame::RemoveFrame(nsIPresContext* aPresContext,
return mAbsoluteContainer.RemoveFrame(this, aPresContext, aPresShell, aListName, aOldFrame);
}
else if (nsLayoutAtoms::floaterList == aListName) {
// Remove floater from the floater list first
mFloaters.RemoveFrame(aOldFrame);
// Find which line contains the floater
line_iterator line = begin_lines(), line_end = end_lines();
for ( ; line != line_end; ++line) {
if (line->IsInline() && line->RemoveFloater(aOldFrame)) {
aOldFrame->Destroy(aPresContext);
break;
}
}
mFloaters.DestroyFrame(aPresContext, aOldFrame);
// Mark every line at and below the line where the floater was dirty
// XXXldb This could be done more efficiently.
for ( ; line != line_end; ++line) {