зеркало из https://github.com/mozilla/pjs.git
Bug 251686 Old body not deleted when switching out of HTML source mode r=glazou sr=dmose
This commit is contained in:
Родитель
60207aab25
Коммит
21a01376bf
|
@ -1844,10 +1844,6 @@ nsHTMLEditor::RebuildDocumentFromSource(const nsAString& aSourceString)
|
|||
// Time to change the document
|
||||
nsAutoEditBatch beginBatching(this);
|
||||
|
||||
// Try to replace body contents first
|
||||
res = SelectAll();
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
nsReadingIterator<PRUnichar> endtotal;
|
||||
aSourceString.EndReading(endtotal);
|
||||
|
||||
|
@ -1877,6 +1873,9 @@ nsHTMLEditor::RebuildDocumentFromSource(const nsAString& aSourceString)
|
|||
}
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
res = SelectAll();
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
if (!foundbody) {
|
||||
NS_NAMED_LITERAL_STRING(body, "<body>");
|
||||
// XXX Without recourse to some parser/content sink/docshell hackery
|
||||
|
|
Загрузка…
Ссылка в новой задаче