Commit 8423450c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use stored nsdoc in exec_indent.

parent 08efe6de
......@@ -1746,7 +1746,6 @@ static HRESULT exec_indent(HTMLTxtRange *This, VARIANT *in, VARIANT *out)
{
nsIDOMDocumentFragment *fragment;
nsIDOMElement *blockquote_elem, *p_elem;
nsIDOMDocument *nsdoc;
nsIDOMNode *tmp;
nsAString tag_str;
......@@ -1755,18 +1754,19 @@ static HRESULT exec_indent(HTMLTxtRange *This, VARIANT *in, VARIANT *out)
TRACE("(%p)->(%p %p)\n", This, in, out);
nsIWebNavigation_GetDocument(This->doc->nscontainer->navigation, &nsdoc);
if(!This->doc->nsdoc) {
WARN("NULL nsdoc\n");
return E_NOTIMPL;
}
nsAString_Init(&tag_str, blockquoteW);
nsIDOMDocument_CreateElement(nsdoc, &tag_str, &blockquote_elem);
nsIDOMHTMLDocument_CreateElement(This->doc->nsdoc, &tag_str, &blockquote_elem);
nsAString_Finish(&tag_str);
nsAString_Init(&tag_str, pW);
nsIDOMDocument_CreateElement(nsdoc, &tag_str, &p_elem);
nsIDOMDocument_CreateElement(This->doc->nsdoc, &tag_str, &p_elem);
nsAString_Finish(&tag_str);
nsIDOMDocument_Release(nsdoc);
nsIDOMRange_ExtractContents(This->nsrange, &fragment);
nsIDOMElement_AppendChild(p_elem, (nsIDOMNode*)fragment, &tmp);
nsIDOMDocumentFragment_Release(fragment);
......
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