mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-06 00:10:25 +00:00
Make DOM inspector deal with a root Document object in the DOM view. Bug
201577, r=timeless, sr=peterv
This commit is contained in:
parent
fc176a0ffa
commit
d79ecc068f
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user