зеркало из https://github.com/mozilla/pjs.git
Formatting whitespace changes only
This commit is contained in:
Родитель
3504d7782a
Коммит
564cd21ad6
|
@ -360,7 +360,7 @@ nsHTMLContentSinkStream::InitEncoder()
|
||||||
res = mUnicodeEncoder->Init(charsetCString,
|
res = mUnicodeEncoder->Init(charsetCString,
|
||||||
nsISaveAsCharset::attr_EntityBeforeCharsetConv
|
nsISaveAsCharset::attr_EntityBeforeCharsetConv
|
||||||
| nsISaveAsCharset::attr_FallbackDecimalNCR,
|
| nsISaveAsCharset::attr_FallbackDecimalNCR,
|
||||||
nsIEntityConverter::html40);
|
nsIEntityConverter::html40);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,9 +380,6 @@ nsHTMLContentSinkStream::EncodeToBuffer(const nsString& aSrc)
|
||||||
if (!mUnicodeEncoder)
|
if (!mUnicodeEncoder)
|
||||||
InitEncoder();
|
InitEncoder();
|
||||||
|
|
||||||
// if (mBuffer)
|
|
||||||
// nsAllocator::Free(mBuffer);
|
|
||||||
|
|
||||||
if (mUnicodeEncoder)
|
if (mUnicodeEncoder)
|
||||||
{
|
{
|
||||||
// Call the converter to convert to the target charset.
|
// Call the converter to convert to the target charset.
|
||||||
|
@ -404,10 +401,11 @@ nsHTMLContentSinkStream::EncodeToBuffer(const nsString& aSrc)
|
||||||
encodedBuffer = aSrc.ToNewCString();
|
encodedBuffer = aSrc.ToNewCString();
|
||||||
}
|
}
|
||||||
mBufferLength = 0;
|
mBufferLength = 0;
|
||||||
if (encodedBuffer) {
|
if (encodedBuffer)
|
||||||
mBufferLength = nsCRT::strlen(encodedBuffer);
|
{
|
||||||
EnsureBufferSize(mBufferLength+1);
|
mBufferLength = nsCRT::strlen(encodedBuffer);
|
||||||
nsCRT::memcpy(mBuffer, encodedBuffer, mBufferLength+1);
|
EnsureBufferSize(mBufferLength+1);
|
||||||
|
nsCRT::memcpy(mBuffer, encodedBuffer, mBufferLength+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -360,7 +360,7 @@ nsHTMLContentSinkStream::InitEncoder()
|
||||||
res = mUnicodeEncoder->Init(charsetCString,
|
res = mUnicodeEncoder->Init(charsetCString,
|
||||||
nsISaveAsCharset::attr_EntityBeforeCharsetConv
|
nsISaveAsCharset::attr_EntityBeforeCharsetConv
|
||||||
| nsISaveAsCharset::attr_FallbackDecimalNCR,
|
| nsISaveAsCharset::attr_FallbackDecimalNCR,
|
||||||
nsIEntityConverter::html40);
|
nsIEntityConverter::html40);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,9 +380,6 @@ nsHTMLContentSinkStream::EncodeToBuffer(const nsString& aSrc)
|
||||||
if (!mUnicodeEncoder)
|
if (!mUnicodeEncoder)
|
||||||
InitEncoder();
|
InitEncoder();
|
||||||
|
|
||||||
// if (mBuffer)
|
|
||||||
// nsAllocator::Free(mBuffer);
|
|
||||||
|
|
||||||
if (mUnicodeEncoder)
|
if (mUnicodeEncoder)
|
||||||
{
|
{
|
||||||
// Call the converter to convert to the target charset.
|
// Call the converter to convert to the target charset.
|
||||||
|
@ -404,10 +401,11 @@ nsHTMLContentSinkStream::EncodeToBuffer(const nsString& aSrc)
|
||||||
encodedBuffer = aSrc.ToNewCString();
|
encodedBuffer = aSrc.ToNewCString();
|
||||||
}
|
}
|
||||||
mBufferLength = 0;
|
mBufferLength = 0;
|
||||||
if (encodedBuffer) {
|
if (encodedBuffer)
|
||||||
mBufferLength = nsCRT::strlen(encodedBuffer);
|
{
|
||||||
EnsureBufferSize(mBufferLength+1);
|
mBufferLength = nsCRT::strlen(encodedBuffer);
|
||||||
nsCRT::memcpy(mBuffer, encodedBuffer, mBufferLength+1);
|
EnsureBufferSize(mBufferLength+1);
|
||||||
|
nsCRT::memcpy(mBuffer, encodedBuffer, mBufferLength+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче