mshtml: Use proper type for text node in exec_hyperlink.

This commit is contained in:
Jacek Caban 2014-09-30 10:30:33 +02:00 committed by Alexandre Julliard
parent 90e3312c8c
commit 07751840ac
1 changed files with 5 additions and 4 deletions

View File

@ -1170,13 +1170,14 @@ static HRESULT exec_hyperlink(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
/* create an element with text of URL */
if (insert_link_at_caret) {
nsIDOMNode *text_node, *unused_node;
nsIDOMNode *unused_node;
nsIDOMText *text_node;
nsIDOMHTMLDocument_CreateTextNode(This->doc_node->nsdoc, &ns_url, (nsIDOMText **)&text_node);
nsIDOMHTMLDocument_CreateTextNode(This->doc_node->nsdoc, &ns_url, &text_node);
/* wrap the <a> tags around the text element */
nsIDOMHTMLElement_AppendChild(anchor_elem, text_node, &unused_node);
nsIDOMNode_Release(text_node);
nsIDOMHTMLElement_AppendChild(anchor_elem, (nsIDOMNode*)text_node, &unused_node);
nsIDOMText_Release(text_node);
nsIDOMNode_Release(unused_node);
}