mshtml: Call HTMLDOMNode_Init directly in HTMLCommentElement_Create.
This commit is contained in:
parent
cf35bbd261
commit
8c396ed437
|
@ -200,9 +200,7 @@ HRESULT HTMLCommentElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTM
|
||||||
ret->IHTMLCommentElement_iface.lpVtbl = &HTMLCommentElementVtbl;
|
ret->IHTMLCommentElement_iface.lpVtbl = &HTMLCommentElementVtbl;
|
||||||
|
|
||||||
HTMLElement_Init(&ret->element, doc, NULL, &HTMLCommentElement_dispex);
|
HTMLElement_Init(&ret->element, doc, NULL, &HTMLCommentElement_dispex);
|
||||||
|
HTMLDOMNode_Init(doc, &ret->element.node, nsnode);
|
||||||
nsIDOMNode_AddRef(nsnode);
|
|
||||||
ret->element.node.nsnode = nsnode;
|
|
||||||
|
|
||||||
*elem = &ret->element;
|
*elem = &ret->element;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
|
@ -1776,6 +1776,7 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElemen
|
||||||
nsIDOMHTMLElement_AddRef(nselem);
|
nsIDOMHTMLElement_AddRef(nselem);
|
||||||
This->nselem = nselem;
|
This->nselem = nselem;
|
||||||
|
|
||||||
|
if(nselem)
|
||||||
HTMLDOMNode_Init(doc, &This->node, (nsIDOMNode*)nselem);
|
HTMLDOMNode_Init(doc, &This->node, (nsIDOMNode*)nselem);
|
||||||
|
|
||||||
ConnectionPointContainer_Init(&This->cp_container, (IUnknown*)&This->IHTMLElement_iface);
|
ConnectionPointContainer_Init(&This->cp_container, (IUnknown*)&This->IHTMLElement_iface);
|
||||||
|
|
Loading…
Reference in New Issue