r=vidur; bug=17372; found a case where a trailing shy character on a line would trigger an infinite loop iff the shy character was the only piece of text after a text frame had been continued

This commit is contained in:
kipp%netscape.com 1999-11-04 19:34:36 +00:00
Родитель 2728cb5577
Коммит ca39ca7b10
2 изменённых файлов: 10 добавлений и 0 удалений

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

@ -2826,6 +2826,10 @@ nsTextFrame::Reflow(nsIPresContext& aPresContext,
PRInt32 wordLen, contentLen;
bp = tx.GetNextWord(inWord, &wordLen, &contentLen, &isWhitespace);
if (nsnull == bp) {
// Advance the offset in case we just consumed a bunch of
// discarded characters. Otherwise, if this is the first piece
// of content for this frame we will attempt to break-before it.
offset += contentLen;
break;
}
lastWordLen = wordLen;
@ -2849,6 +2853,7 @@ nsTextFrame::Reflow(nsIPresContext& aPresContext,
// Only set flag when we actually do skip whitespace
mState |= TEXT_SKIP_LEADING_WS;
firstThing = PR_FALSE;
continue;
}
if ('\t' == bp[0]) {

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

@ -2826,6 +2826,10 @@ nsTextFrame::Reflow(nsIPresContext& aPresContext,
PRInt32 wordLen, contentLen;
bp = tx.GetNextWord(inWord, &wordLen, &contentLen, &isWhitespace);
if (nsnull == bp) {
// Advance the offset in case we just consumed a bunch of
// discarded characters. Otherwise, if this is the first piece
// of content for this frame we will attempt to break-before it.
offset += contentLen;
break;
}
lastWordLen = wordLen;
@ -2849,6 +2853,7 @@ nsTextFrame::Reflow(nsIPresContext& aPresContext,
// Only set flag when we actually do skip whitespace
mState |= TEXT_SKIP_LEADING_WS;
firstThing = PR_FALSE;
continue;
}
if ('\t' == bp[0]) {