зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2728cb5577
Коммит
ca39ca7b10
|
@ -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]) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче