mshtml: Use stored nsdoc in prev_node.

This commit is contained in:
Jacek Caban 2008-10-08 13:30:03 -05:00 committed by Alexandre Julliard
parent f1ff6b0993
commit 16f2965eb9
1 changed files with 1 additions and 8 deletions

View File

@ -325,16 +325,9 @@ static nsIDOMNode *prev_node(HTMLTxtRange *This, nsIDOMNode *iter)
nsresult nsres;
if(!iter) {
nsIDOMHTMLDocument *nshtmldoc;
nsIDOMHTMLElement *nselem;
nsIDOMDocument *nsdoc;
nsIWebNavigation_GetDocument(This->doc->nscontainer->navigation, &nsdoc);
nsIDOMDocument_QueryInterface(nsdoc, &IID_nsIDOMHTMLDocument, (void**)&nshtmldoc);
nsIDOMDocument_Release(nsdoc);
nsIDOMHTMLDocument_GetBody(nshtmldoc, &nselem);
nsIDOMHTMLDocument_Release(nshtmldoc);
nsIDOMHTMLDocument_GetBody(This->doc->nsdoc, &nselem);
nsIDOMElement_GetLastChild(nselem, &tmp);
if(!tmp)
return (nsIDOMNode*)nselem;