зеркало из https://github.com/mozilla/pjs.git
Fixed percolation of nbsp's into the transformed buffer (bug 16886)
This commit is contained in:
Родитель
5ff3bcc409
Коммит
a74943d540
|
@ -206,6 +206,9 @@ nsTextTransformer::ScanNormalAsciiText_F(PRInt32* aWordLen)
|
|||
if (XP_IS_SPACE(ch)) {
|
||||
break;
|
||||
}
|
||||
if (CH_NBSP == ch) {
|
||||
ch = ' ';
|
||||
}
|
||||
if (bp == endbp) {
|
||||
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
|
||||
nsresult rv = mTransformBuf.GrowBy(1000);
|
||||
|
@ -336,6 +339,9 @@ nsTextTransformer::ScanPreData_F(PRInt32* aWordLen)
|
|||
if ((ch == '\t') || (ch == '\n')) {
|
||||
break;
|
||||
}
|
||||
if (CH_NBSP == ch) {
|
||||
ch = ' ';
|
||||
}
|
||||
if (ch > MAX_UNIBYTE) mHasMultibyte = PR_TRUE;
|
||||
if (bp == endbp) {
|
||||
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
|
||||
|
@ -371,6 +377,9 @@ nsTextTransformer::ScanPreAsciiData_F(PRInt32* aWordLen)
|
|||
cp--;
|
||||
break;
|
||||
}
|
||||
if (CH_NBSP == ch) {
|
||||
ch = ' ';
|
||||
}
|
||||
if (bp == endbp) {
|
||||
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
|
||||
nsresult rv = mTransformBuf.GrowBy(1000);
|
||||
|
@ -517,6 +526,9 @@ nsTextTransformer::ScanNormalAsciiText_B(PRInt32* aWordLen)
|
|||
if (XP_IS_SPACE(ch)) {
|
||||
break;
|
||||
}
|
||||
if (CH_NBSP == ch) {
|
||||
ch = ' ';
|
||||
}
|
||||
if (bp == startbp) {
|
||||
PRInt32 oldLength = mTransformBuf.mBufferLen;
|
||||
nsresult rv = mTransformBuf.GrowBy(1000);
|
||||
|
@ -643,6 +655,9 @@ nsTextTransformer::ScanPreData_B(PRInt32* aWordLen)
|
|||
if ((ch == '\t') || (ch == '\n')) {
|
||||
break;
|
||||
}
|
||||
if (CH_NBSP == ch) {
|
||||
ch = ' ';
|
||||
}
|
||||
if (ch > MAX_UNIBYTE) mHasMultibyte = PR_TRUE;
|
||||
if (bp == startbp) {
|
||||
PRInt32 oldLength = mTransformBuf.mBufferLen;
|
||||
|
|
|
@ -206,6 +206,9 @@ nsTextTransformer::ScanNormalAsciiText_F(PRInt32* aWordLen)
|
|||
if (XP_IS_SPACE(ch)) {
|
||||
break;
|
||||
}
|
||||
if (CH_NBSP == ch) {
|
||||
ch = ' ';
|
||||
}
|
||||
if (bp == endbp) {
|
||||
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
|
||||
nsresult rv = mTransformBuf.GrowBy(1000);
|
||||
|
@ -336,6 +339,9 @@ nsTextTransformer::ScanPreData_F(PRInt32* aWordLen)
|
|||
if ((ch == '\t') || (ch == '\n')) {
|
||||
break;
|
||||
}
|
||||
if (CH_NBSP == ch) {
|
||||
ch = ' ';
|
||||
}
|
||||
if (ch > MAX_UNIBYTE) mHasMultibyte = PR_TRUE;
|
||||
if (bp == endbp) {
|
||||
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
|
||||
|
@ -371,6 +377,9 @@ nsTextTransformer::ScanPreAsciiData_F(PRInt32* aWordLen)
|
|||
cp--;
|
||||
break;
|
||||
}
|
||||
if (CH_NBSP == ch) {
|
||||
ch = ' ';
|
||||
}
|
||||
if (bp == endbp) {
|
||||
PRInt32 oldLength = bp - mTransformBuf.GetBuffer();
|
||||
nsresult rv = mTransformBuf.GrowBy(1000);
|
||||
|
@ -517,6 +526,9 @@ nsTextTransformer::ScanNormalAsciiText_B(PRInt32* aWordLen)
|
|||
if (XP_IS_SPACE(ch)) {
|
||||
break;
|
||||
}
|
||||
if (CH_NBSP == ch) {
|
||||
ch = ' ';
|
||||
}
|
||||
if (bp == startbp) {
|
||||
PRInt32 oldLength = mTransformBuf.mBufferLen;
|
||||
nsresult rv = mTransformBuf.GrowBy(1000);
|
||||
|
@ -643,6 +655,9 @@ nsTextTransformer::ScanPreData_B(PRInt32* aWordLen)
|
|||
if ((ch == '\t') || (ch == '\n')) {
|
||||
break;
|
||||
}
|
||||
if (CH_NBSP == ch) {
|
||||
ch = ' ';
|
||||
}
|
||||
if (ch > MAX_UNIBYTE) mHasMultibyte = PR_TRUE;
|
||||
if (bp == startbp) {
|
||||
PRInt32 oldLength = mTransformBuf.mBufferLen;
|
||||
|
|
Загрузка…
Ссылка в новой задаче