Commit 502532ee authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use stored nsdoc in HTMLCurrentStyle_Create.

parent 408024a2
...@@ -888,19 +888,16 @@ HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p) ...@@ -888,19 +888,16 @@ HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
nsIDOMDocumentView *nsdocview; nsIDOMDocumentView *nsdocview;
nsIDOMAbstractView *nsview; nsIDOMAbstractView *nsview;
nsIDOMViewCSS *nsviewcss; nsIDOMViewCSS *nsviewcss;
nsIDOMDocument *nsdoc;
nsAString nsempty_str; nsAString nsempty_str;
HTMLCurrentStyle *ret; HTMLCurrentStyle *ret;
nsresult nsres; nsresult nsres;
nsres = nsIWebNavigation_GetDocument(elem->node.doc->nscontainer->navigation, &nsdoc); if(!elem->node.doc->nsdoc) {
if(NS_FAILED(nsres)) { WARN("NULL nsdoc\n");
ERR("GetDocument failed: %08x\n", nsres); return E_UNEXPECTED;
return E_FAIL;
} }
nsres = nsIDOMDocument_QueryInterface(nsdoc, &IID_nsIDOMDocumentView, (void**)&nsdocview); nsres = nsIDOMHTMLDocument_QueryInterface(elem->node.doc->nsdoc, &IID_nsIDOMDocumentView, (void**)&nsdocview);
nsIDOMDocument_Release(nsdoc);
if(NS_FAILED(nsres)) { if(NS_FAILED(nsres)) {
ERR("Could not get nsIDOMDocumentView: %08x\n", nsres); ERR("Could not get nsIDOMDocumentView: %08x\n", nsres);
return E_FAIL; return E_FAIL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment