зеркало из https://github.com/mozilla/pjs.git
Fixing bug 230283. Don't notify the document about insertion of the document element when there is no document element. r=jonas@sicking.cc, sr+a=dbaron@dbaron.org.
This commit is contained in:
Родитель
632559f54a
Коммит
08a38d2790
|
@ -257,19 +257,21 @@ nsXMLContentSink::DidBuildModel()
|
|||
loader->RemoveObserver(this);
|
||||
}
|
||||
|
||||
// Notify document observers that all the content has been stuck
|
||||
// into the document.
|
||||
// XXX do we need to notify for things like PIs? Or just the
|
||||
// documentElement?
|
||||
NS_ASSERTION(mDocument->IndexOf(mDocElement) != -1,
|
||||
"mDocElement not in doc?");
|
||||
mDocument->BeginUpdate(UPDATE_CONTENT_MODEL);
|
||||
mDocument->ContentInserted(nsnull, mDocElement,
|
||||
// XXXbz is this last arg relevant if
|
||||
// the container is null?
|
||||
mDocument->IndexOf(mDocElement));
|
||||
mDocument->EndUpdate(UPDATE_CONTENT_MODEL);
|
||||
|
||||
if (mDocElement) {
|
||||
// Notify document observers that all the content has been stuck
|
||||
// into the document.
|
||||
// XXX do we need to notify for things like PIs? Or just the
|
||||
// documentElement?
|
||||
NS_ASSERTION(mDocument->IndexOf(mDocElement) != -1,
|
||||
"mDocElement not in doc?");
|
||||
mDocument->BeginUpdate(UPDATE_CONTENT_MODEL);
|
||||
mDocument->ContentInserted(nsnull, mDocElement,
|
||||
// XXXbz is this last arg relevant if
|
||||
// the container is null?
|
||||
mDocument->IndexOf(mDocElement));
|
||||
mDocument->EndUpdate(UPDATE_CONTENT_MODEL);
|
||||
}
|
||||
|
||||
// Check if we want to prettyprint
|
||||
MaybePrettyPrint();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче