Jacek Caban : mshtml: Store HTMLElement pointer in HTMLTextContainer.
Module: wine Branch: refs/heads/master Commit: 82676b999d85fd2c90f12820897879aa54bf6038 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=82676b999d85fd2c90f12820... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 1 14:49:57 2006 +0200 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 b557906..ceff7ed 100644 --- a/dlls/mshtml/htmlbody.c +++ b/dlls/mshtml/htmlbody.c @@ -441,7 +441,7 @@ void HTMLBodyElement_Create(HTMLElement 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 e104632..7f5816a 100644 --- a/dlls/mshtml/htmltextcont.c +++ b/dlls/mshtml/htmltextcont.c @@ -40,19 +40,19 @@ static HRESULT WINAPI HTMLTextContainer_ 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 HTML 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 2542836..e0c1c3c 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(HTMLElem 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**);
participants (1)
-
Alexandre Julliard