mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
mshtml: Use stored nsdoc in exec_indent.
This commit is contained in:
parent
08efe6de3e
commit
8423450ccf
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user