From 08efe6de3e340429acfaefad787a566bb156e00e Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 9 Oct 2008 15:25:15 -0500 Subject: [PATCH] mshtml: Use stored nsdoc in IHTMLTxtRange::expand. --- dlls/mshtml/txtrange.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index c35834fde35..ff355683779 100644 --- a/dlls/mshtml/txtrange.c +++ b/dlls/mshtml/txtrange.c @@ -1308,22 +1308,10 @@ static HRESULT WINAPI HTMLTxtRange_expand(IHTMLTxtRange *iface, BSTR Unit, VARIA } case RU_TEXTEDIT: { - nsIDOMDocument *nsdoc; - nsIDOMHTMLDocument *nshtmldoc; nsIDOMHTMLElement *nsbody = NULL; nsresult nsres; - nsres = nsIWebNavigation_GetDocument(This->doc->nscontainer->navigation, &nsdoc); - if(NS_FAILED(nsres) || !nsdoc) { - ERR("GetDocument failed: %08x\n", nsres); - break; - } - - nsIDOMDocument_QueryInterface(nsdoc, &IID_nsIDOMHTMLDocument, (void**)&nshtmldoc); - nsIDOMDocument_Release(nsdoc); - - nsres = nsIDOMHTMLDocument_GetBody(nshtmldoc, &nsbody); - nsIDOMHTMLDocument_Release(nshtmldoc); + nsres = nsIDOMHTMLDocument_GetBody(This->doc->nsdoc, &nsbody); if(NS_FAILED(nsres) || !nsbody) { ERR("Could not get body: %08x\n", nsres); break; -- 2.11.4.GIT