зеркало из https://github.com/mozilla/gecko-dev.git
Bug 407397. Don't 'optimize' by not reflowing when a 0x0 frame is removed. Bad Kipp. r+sr=dbaron
This commit is contained in:
Родитель
ec43f5990d
Коммит
0df022faac
|
@ -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.
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<html>
|
||||
<body>
|
||||
<div style="width:1px"><b>T</b>T</div>
|
||||
</body>
|
||||
</html>
|
|
@ -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>
|
|
@ -511,4 +511,4 @@ random == 403134-1.html 403134-1-ref.html # bug 405377
|
|||
== 406568-1.html 406568-1-ref.html
|
||||
== 407111-1.html 407111-1-ref.html
|
||||
== 407227-1.html 407227-1-ref.html
|
||||
|
||||
== 407937-1.html 407937-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче