On 09/30/2014 10:12 AM, Jacek Caban wrote:
> --- dlls/mshtml/editor.c | 7 ++++--- 1 file changed, 4
> insertions(+), 3 deletions(-)
>
>
>
> 0001-mshtml-Use-proper-type-for-text-node-in-exec_hyperlin.diff
>
>
> diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c index
> 14aab53..779dcc7 100644 --- a/dlls/mshtml/editor.c +++
> b/dlls/mshtml/editor.c @@ -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);
Jacek, you don't need the above cast anymore.
> /* 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); }
bye
michael