Commit b6cfd581 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Share nstextarea reference with nsnode.

parent 1f5b201e
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
*/ */
#include <stdarg.h> #include <stdarg.h>
#include <assert.h>
#define COBJMACROS #define COBJMACROS
...@@ -398,15 +399,6 @@ static HRESULT HTMLTextAreaElement_QI(HTMLDOMNode *iface, REFIID riid, void **pp ...@@ -398,15 +399,6 @@ static HRESULT HTMLTextAreaElement_QI(HTMLDOMNode *iface, REFIID riid, void **pp
return HTMLElement_QI(&This->element.node, riid, ppv); return HTMLElement_QI(&This->element.node, riid, ppv);
} }
static void HTMLTextAreaElement_destructor(HTMLDOMNode *iface)
{
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
nsIDOMHTMLTextAreaElement_Release(This->nstextarea);
HTMLElement_destructor(&This->element.node);
}
static HRESULT HTMLTextAreaElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v) static HRESULT HTMLTextAreaElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
{ {
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface); HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
...@@ -421,7 +413,7 @@ static HRESULT HTMLTextAreaElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_ ...@@ -421,7 +413,7 @@ static HRESULT HTMLTextAreaElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_
static const NodeImplVtbl HTMLTextAreaElementImplVtbl = { static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
HTMLTextAreaElement_QI, HTMLTextAreaElement_QI,
HTMLTextAreaElement_destructor, HTMLElement_destructor,
HTMLElement_clone, HTMLElement_clone,
HTMLElement_get_attr_col, HTMLElement_get_attr_col,
NULL, NULL,
...@@ -456,15 +448,14 @@ HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nse ...@@ -456,15 +448,14 @@ HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nse
ret->IHTMLTextAreaElement_iface.lpVtbl = &HTMLTextAreaElementVtbl; ret->IHTMLTextAreaElement_iface.lpVtbl = &HTMLTextAreaElementVtbl;
ret->element.node.vtbl = &HTMLTextAreaElementImplVtbl; ret->element.node.vtbl = &HTMLTextAreaElementImplVtbl;
HTMLElement_Init(&ret->element, doc, nselem, &HTMLTextAreaElement_dispex);
nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTextAreaElement, nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTextAreaElement,
(void**)&ret->nstextarea); (void**)&ret->nstextarea);
if(NS_FAILED(nsres)) {
ERR("Could not get nsDOMHTMLInputElement: %08x\n", nsres);
heap_free(ret);
return E_FAIL;
}
HTMLElement_Init(&ret->element, doc, nselem, &HTMLTextAreaElement_dispex); /* Share nstextarea reference with nsnode */
assert(nsres == NS_OK && (nsIDOMNode*)ret->nstextarea == ret->element.node.nsnode);
nsIDOMNode_Release(ret->element.node.nsnode);
*elem = &ret->element; *elem = &ret->element;
return S_OK; return S_OK;
......
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