Make DOM inspector deal with a root Document object in the DOM view. Bug
201577, r=timeless, sr=peterv
This commit is contained in:
Родитель
84a12b9277
Коммит
e0dbaacb24
|
@ -185,12 +185,13 @@ inDOMView::SetRootNode(nsIDOMNode* aNode)
|
|||
|
||||
// store an owning reference to document so that it isn't
|
||||
// destroyed before we are
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
aNode->GetOwnerDocument(getter_AddRefs(domDoc));
|
||||
mRootDocument = domDoc;
|
||||
mRootDocument = do_QueryInterface(aNode);
|
||||
if (!mRootDocument) {
|
||||
aNode->GetOwnerDocument(getter_AddRefs(mRootDocument));
|
||||
}
|
||||
|
||||
// add document observer
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
|
||||
nsCOMPtr<nsIDocument> doc(do_QueryInterface(mRootDocument));
|
||||
if (doc)
|
||||
doc->AddObserver(this);
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче