Ensure that the buffer offset in nsTextTransformer::GetNextWord is correctly positioned after transforming ligatures. Bug 1888759, r/sr=rbs.

This commit is contained in:
smontagu%netscape.com 2003-02-27 01:47:44 +00:00
parent c47b8bed9d
commit 2a850617fd
2 changed files with 6 additions and 0 deletions

View File

@ -1081,9 +1081,12 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
if ((mTextTransform != NS_STYLE_TEXT_TRANSFORM_NONE) ||
(*aWordLenResult != *aContentLenResult)) {
*aWasTransformed = PR_TRUE;
mBufferPos = prevBufferPos + *aWordLenResult;
}
mOffset = offset;
NS_ASSERTION(mBufferPos == prevBufferPos + *aWordLenResult, "internal error");
return result;
}

View File

@ -1081,9 +1081,12 @@ nsTextTransformer::GetNextWord(PRBool aInWord,
if ((mTextTransform != NS_STYLE_TEXT_TRANSFORM_NONE) ||
(*aWordLenResult != *aContentLenResult)) {
*aWasTransformed = PR_TRUE;
mBufferPos = prevBufferPos + *aWordLenResult;
}
mOffset = offset;
NS_ASSERTION(mBufferPos == prevBufferPos + *aWordLenResult, "internal error");
return result;
}