Bug 333659. nsLineBreaker fixes. Not Part Of The Build, used by new-textframe only.

This commit is contained in:
roc+@cs.cmu.edu 2007-03-22 16:45:02 -07:00
Родитель 405f02eb73
Коммит 6e752fb3b8
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -85,7 +85,7 @@ nsLineBreaker::FlushCurrentWord()
if (!mCurrentWordContainsCJK) {
// Just set everything internal to "no break"!
memset(breakState.Elements(), 0, mCurrentWord.Length());
memset(breakState.Elements(), PR_FALSE, mCurrentWord.Length());
} else {
nsContentUtils::LineBreaker()->
GetJISx4051Breaks(mCurrentWord.Elements(), mCurrentWord.Length(), breakState.Elements());
@ -105,7 +105,10 @@ nsLineBreaker::FlushCurrentWord()
memset(breakState.Elements() + offset + exclude, PR_FALSE, ti->mLength - exclude);
}
PRUint32 skipSet = i > 0 ? 1 : 0;
// Don't set the break state for the first character of the word, because
// it was already set correctly earlier and we don't know what the true
// value should be.
PRUint32 skipSet = i == 0 ? 1 : 0;
ti->mSink->SetBreaks(ti->mSinkOffset + skipSet, ti->mLength - skipSet,
breakState.Elements() + offset + skipSet);
offset += ti->mLength;