Bug 407397. Don't 'optimize' by not reflowing when a 0x0 frame is removed. Bad Kipp. r+sr=dbaron

git-svn-id: svn://10.0.0.236/trunk@240766 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu 2007-12-11 01:14:25 +00:00
parent 12e465ddd8
commit 518e86507f
3 changed files with 16 additions and 16 deletions

View File

@ -198,24 +198,14 @@ nsContainerFrame::RemoveFrame(nsIAtom* aListName,
// If the frame we are removing is a brFrame, we need a reflow so
// the line the brFrame was on can attempt to pull up any frames
// that can fit from lines below it.
PRBool generateReflowCommand =
aOldFrame->GetType() == nsGkAtoms::brFrame;
PRBool generateReflowCommand = PR_TRUE;
#ifdef IBMBIDI
if (nsGkAtoms::nextBidi == aListName) {
generateReflowCommand = PR_FALSE;
}
#endif
nsContainerFrame* parent = static_cast<nsContainerFrame*>(aOldFrame->GetParent());
while (aOldFrame) {
#ifdef IBMBIDI
if (nsGkAtoms::nextBidi != aListName) {
#endif
// If the frame being removed has zero size then don't bother
// generating a reflow command, otherwise make sure we do.
nsRect bbox = aOldFrame->GetRect();
if (bbox.width || bbox.height) {
generateReflowCommand = PR_TRUE;
}
#ifdef IBMBIDI
}
#endif
// When the parent is an inline frame we have a simple task - just
// remove the frame from its parents list and generate a reflow
// command.

View File

@ -0,0 +1,5 @@
<html>
<body>
<div style="width:1px"><b>T</b>T</div>
</body>
</html>

View File

@ -0,0 +1,5 @@
<html>
<body onload="var d = document.getElementById('d'); d.removeChild(d.firstChild);">
<div style="width:1px"><b>T</b><span id="d"> </span>T</div>
</body>
</html>