From 82676b999d85fd2c90f12820897879aa54bf6038 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 1 Aug 2006 14:49:57 +0200 Subject: [PATCH] mshtml: Store HTMLElement pointer in HTMLTextContainer. --- dlls/mshtml/htmlbody.c | 2 +- dlls/mshtml/htmltextcont.c | 10 +++++----- dlls/mshtml/mshtml_private.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c index b557906251c..ceff7edd2cc 100644 --- a/dlls/mshtml/htmlbody.c +++ b/dlls/mshtml/htmlbody.c @@ -441,7 +441,7 @@ void HTMLBodyElement_Create(HTMLElement *element) ret->lpHTMLBodyElementVtbl = &HTMLBodyElementVtbl; ret->element = element; - HTMLTextContainer_Init(&ret->text_container, (IUnknown*)HTMLBODY(ret)); + HTMLTextContainer_Init(&ret->text_container, element); nsres = nsIDOMHTMLElement_QueryInterface(element->nselem, &IID_nsIDOMHTMLBodyElement, (void**)&ret->nsbody); diff --git a/dlls/mshtml/htmltextcont.c b/dlls/mshtml/htmltextcont.c index e10463207b9..7f5816afc55 100644 --- a/dlls/mshtml/htmltextcont.c +++ b/dlls/mshtml/htmltextcont.c @@ -40,19 +40,19 @@ static HRESULT WINAPI HTMLTextContainer_QueryInterface(IHTMLTextContainer *iface REFIID riid, void **ppv) { 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) { HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface); - return IUnknown_AddRef(This->impl); + return IHTMLElement_AddRef(HTMLELEM(This->element)); } static ULONG WINAPI HTMLTextContainer_Release(IHTMLTextContainer *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) @@ -175,8 +175,8 @@ static const IHTMLTextContainerVtbl HTMLTextContainerVtbl = { HTMLTextContainer_get_onscroll }; -void HTMLTextContainer_Init(HTMLTextContainer *This, IUnknown *impl) +void HTMLTextContainer_Init(HTMLTextContainer *This, HTMLElement *elem) { This->lpHTMLTextContainerVtbl = &HTMLTextContainerVtbl; - This->impl = impl; + This->element = elem; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 254283644f4..e0c1c3c3890 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -204,7 +204,7 @@ typedef struct { typedef struct { const IHTMLTextContainerVtbl *lpHTMLTextContainerVtbl; - IUnknown *impl; + HTMLElement *element; } HTMLTextContainer; #define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl) @@ -316,7 +316,7 @@ void HTMLTextAreaElement_Create(HTMLElement*); void HTMLElement2_Init(HTMLElement*); -void HTMLTextContainer_Init(HTMLTextContainer*,IUnknown*); +void HTMLTextContainer_Init(HTMLTextContainer*,HTMLElement*); HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**); HRESULT HTMLElement_QI(HTMLElement*,REFIID,void**); -- 2.11.4.GIT