Fix the HTML serializer to not do fancy linebreaking when "raw" output is
requested. Use this in innerHTML. Bug 89780, r+sr=peterv git-svn-id: svn://10.0.0.236/trunk@168919 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -189,6 +189,12 @@ nsHTMLContentSerializer::AppendText(nsIDOMText* aText,
|
||||
if (mPreLevel > 0) {
|
||||
AppendToStringConvertLF(data, aStr);
|
||||
}
|
||||
else if (mFlags & nsIDocumentEncoder::OutputRaw) {
|
||||
PRInt32 lastNewlineOffset = data.RFindChar('\n');
|
||||
AppendToString(data, aStr);
|
||||
if (lastNewlineOffset != kNotFound)
|
||||
mColPos = data.Length() - lastNewlineOffset;
|
||||
}
|
||||
else if (!mDoFormat) {
|
||||
PRInt32 lastNewlineOffset = kNotFound;
|
||||
PRBool hasLongLines = HasLongLines(data, lastNewlineOffset);
|
||||
@@ -202,12 +208,6 @@ nsHTMLContentSerializer::AppendText(nsIDOMText* aText,
|
||||
AppendToStringConvertLF(data, aStr);
|
||||
}
|
||||
}
|
||||
else if (mFlags & nsIDocumentEncoder::OutputRaw) {
|
||||
PRInt32 lastNewlineOffset = data.RFindChar('\n');
|
||||
AppendToString(data, aStr);
|
||||
if (lastNewlineOffset != kNotFound)
|
||||
mColPos = data.Length() - lastNewlineOffset;
|
||||
}
|
||||
else {
|
||||
AppendToStringWrapped(data, aStr, PR_FALSE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user