Bug 600970 - Serializer shouldn't update all its states when it is serializing for raw, non-formatter output., r=laurent, a=jst

--HG--
extra : rebase_source : 993b9fb0c0a19b98f1ee7231e693b9a81936a40c
This commit is contained in:
Olli Pettay 2010-10-15 21:01:45 +03:00
parent c13d58b221
commit 2bbb77fa1e

View File

@ -1359,19 +1359,7 @@ nsXMLContentSerializer::AppendToStringConvertLF(const nsAString& aStr,
}
if (mDoRaw) {
nsDependentString str(aStr);
PRInt32 lastNewlineOffset = str.RFindChar('\n');
AppendToString(aStr, aOutputStr);
if (lastNewlineOffset != kNotFound) {
// the string contains at least a line break,
// so we should update the mColPos property with
// the number of characters between the last line
// break and the end of the string
mColPos = aStr.Length() - lastNewlineOffset;
}
mIsIndentationAddedOnCurrentLine = (mColPos != 0);
}
else {
// Convert line-endings to mLineBreak