mshtml: Store HTMLElement pointer in HTMLTextContainer.

This commit is contained in:
Jacek Caban 2006-08-01 14:49:57 +02:00 committed by Alexandre Julliard
parent c6e513dc72
commit 82676b999d
3 changed files with 8 additions and 8 deletions

View File

@ -441,7 +441,7 @@ void HTMLBodyElement_Create(HTMLElement *element)
ret->lpHTMLBodyElementVtbl = &HTMLBodyElementVtbl; ret->lpHTMLBodyElementVtbl = &HTMLBodyElementVtbl;
ret->element = element; ret->element = element;
HTMLTextContainer_Init(&ret->text_container, (IUnknown*)HTMLBODY(ret)); HTMLTextContainer_Init(&ret->text_container, element);
nsres = nsIDOMHTMLElement_QueryInterface(element->nselem, &IID_nsIDOMHTMLBodyElement, nsres = nsIDOMHTMLElement_QueryInterface(element->nselem, &IID_nsIDOMHTMLBodyElement,
(void**)&ret->nsbody); (void**)&ret->nsbody);

View File

@ -40,19 +40,19 @@ static HRESULT WINAPI HTMLTextContainer_QueryInterface(IHTMLTextContainer *iface
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface); HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
return IUnknown_QueryInterface(This->impl, riid, ppv); return IHTMLElement_QueryInterface(HTMLELEM(This->element), riid, ppv);
} }
static ULONG WINAPI HTMLTextContainer_AddRef(IHTMLTextContainer *iface) static ULONG WINAPI HTMLTextContainer_AddRef(IHTMLTextContainer *iface)
{ {
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface); HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
return IUnknown_AddRef(This->impl); return IHTMLElement_AddRef(HTMLELEM(This->element));
} }
static ULONG WINAPI HTMLTextContainer_Release(IHTMLTextContainer *iface) static ULONG WINAPI HTMLTextContainer_Release(IHTMLTextContainer *iface)
{ {
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface); HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
return IUnknown_Release(This->impl); return IHTMLElement_Release(HTMLELEM(This->element));
} }
static HRESULT WINAPI HTMLTextContainer_GetTypeInfoCount(IHTMLTextContainer *iface, UINT *pctinfo) static HRESULT WINAPI HTMLTextContainer_GetTypeInfoCount(IHTMLTextContainer *iface, UINT *pctinfo)
@ -175,8 +175,8 @@ static const IHTMLTextContainerVtbl HTMLTextContainerVtbl = {
HTMLTextContainer_get_onscroll HTMLTextContainer_get_onscroll
}; };
void HTMLTextContainer_Init(HTMLTextContainer *This, IUnknown *impl) void HTMLTextContainer_Init(HTMLTextContainer *This, HTMLElement *elem)
{ {
This->lpHTMLTextContainerVtbl = &HTMLTextContainerVtbl; This->lpHTMLTextContainerVtbl = &HTMLTextContainerVtbl;
This->impl = impl; This->element = elem;
} }

View File

@ -204,7 +204,7 @@ typedef struct {
typedef struct { typedef struct {
const IHTMLTextContainerVtbl *lpHTMLTextContainerVtbl; const IHTMLTextContainerVtbl *lpHTMLTextContainerVtbl;
IUnknown *impl; HTMLElement *element;
} HTMLTextContainer; } HTMLTextContainer;
#define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl) #define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl)
@ -316,7 +316,7 @@ void HTMLTextAreaElement_Create(HTMLElement*);
void HTMLElement2_Init(HTMLElement*); void HTMLElement2_Init(HTMLElement*);
void HTMLTextContainer_Init(HTMLTextContainer*,IUnknown*); void HTMLTextContainer_Init(HTMLTextContainer*,HTMLElement*);
HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**); HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**);
HRESULT HTMLElement_QI(HTMLElement*,REFIID,void**); HRESULT HTMLElement_QI(HTMLElement*,REFIID,void**);