Allow PushLines to push the first line. b=185357 r+sr=roc

This commit is contained in:
dbaron%dbaron.org 2004-02-03 18:19:42 +00:00
Родитель df33b45fc1
Коммит 5eae4fdb0e
2 изменённых файлов: 10 добавлений и 4 удалений

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

@ -4194,7 +4194,9 @@ nsBlockFrame::PushLines(nsBlockReflowState& aState,
nsLineList::iterator aLineBefore)
{
nsLineList::iterator overBegin(aLineBefore.next());
NS_ASSERTION(overBegin != begin_lines(), "bad push");
// PushTruncatedPlaceholderLine sometimes pushes the first line. Ugh.
PRBool firstLine = overBegin == begin_lines();
if (overBegin != end_lines()) {
// XXXldb use presshell arena!
@ -4220,7 +4222,8 @@ nsBlockFrame::PushLines(nsBlockReflowState& aState,
}
// Break frame sibling list
aLineBefore->LastChild()->SetNextSibling(nsnull);
if (!firstLine)
aLineBefore->LastChild()->SetNextSibling(nsnull);
#ifdef DEBUG
VerifyOverflowSituation(aState.mPresContext);

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

@ -4194,7 +4194,9 @@ nsBlockFrame::PushLines(nsBlockReflowState& aState,
nsLineList::iterator aLineBefore)
{
nsLineList::iterator overBegin(aLineBefore.next());
NS_ASSERTION(overBegin != begin_lines(), "bad push");
// PushTruncatedPlaceholderLine sometimes pushes the first line. Ugh.
PRBool firstLine = overBegin == begin_lines();
if (overBegin != end_lines()) {
// XXXldb use presshell arena!
@ -4220,7 +4222,8 @@ nsBlockFrame::PushLines(nsBlockReflowState& aState,
}
// Break frame sibling list
aLineBefore->LastChild()->SetNextSibling(nsnull);
if (!firstLine)
aLineBefore->LastChild()->SetNextSibling(nsnull);
#ifdef DEBUG
VerifyOverflowSituation(aState.mPresContext);