mshtml: Moved IHTMLFrameBase to separated object to allow sharing implementation with HTMLFrame.

This commit is contained in:
Jacek Caban 2009-11-01 19:17:17 +01:00 committed by Alexandre Julliard
parent d3a9f162e8
commit 4ffd64ddeb
4 changed files with 292 additions and 228 deletions

View File

@ -25,6 +25,7 @@ C_SRCS = \
htmlelem3.c \
htmlelemcol.c \
htmlevent.c \
htmlframebase.c \
htmlgeneric.c \
htmliframe.c \
htmlimg.c \

269
dlls/mshtml/htmlframebase.c Normal file
View File

@ -0,0 +1,269 @@
/*
* Copyright 2008 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mshtml_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define HTMLFRAMEBASE_THIS(iface) DEFINE_THIS(HTMLFrameBase, IHTMLFrameBase, iface)
static HRESULT WINAPI HTMLFrameBase_QueryInterface(IHTMLFrameBase *iface, REFIID riid, void **ppv)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
}
static ULONG WINAPI HTMLFrameBase_AddRef(IHTMLFrameBase *iface)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
}
static ULONG WINAPI HTMLFrameBase_Release(IHTMLFrameBase *iface)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
}
static HRESULT WINAPI HTMLFrameBase_GetTypeInfoCount(IHTMLFrameBase *iface, UINT *pctinfo)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
}
static HRESULT WINAPI HTMLFrameBase_GetTypeInfo(IHTMLFrameBase *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
}
static HRESULT WINAPI HTMLFrameBase_GetIDsOfNames(IHTMLFrameBase *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames,
cNames, lcid, rgDispId);
}
static HRESULT WINAPI HTMLFrameBase_Invoke(IHTMLFrameBase *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLFrameBase_put_src(IHTMLFrameBase *iface, BSTR v)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_get_src(IHTMLFrameBase *iface, BSTR *p)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_put_name(IHTMLFrameBase *iface, BSTR v)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_get_name(IHTMLFrameBase *iface, BSTR *p)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_put_border(IHTMLFrameBase *iface, VARIANT v)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_get_border(IHTMLFrameBase *iface, VARIANT *p)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_put_frameBorder(IHTMLFrameBase *iface, BSTR v)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_get_frameBorder(IHTMLFrameBase *iface, BSTR *p)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_put_frameSpacing(IHTMLFrameBase *iface, VARIANT v)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_get_frameSpacing(IHTMLFrameBase *iface, VARIANT *p)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_put_marginWidth(IHTMLFrameBase *iface, VARIANT v)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_get_marginWidth(IHTMLFrameBase *iface, VARIANT *p)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_put_marginHeight(IHTMLFrameBase *iface, VARIANT v)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_get_marginHeight(IHTMLFrameBase *iface, VARIANT *p)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_put_noResize(IHTMLFrameBase *iface, VARIANT_BOOL v)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_get_noResize(IHTMLFrameBase *iface, VARIANT_BOOL *p)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_put_scrolling(IHTMLFrameBase *iface, BSTR v)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLFrameBase_get_scrolling(IHTMLFrameBase *iface, BSTR *p)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static const IHTMLFrameBaseVtbl HTMLFrameBaseVtbl = {
HTMLFrameBase_QueryInterface,
HTMLFrameBase_AddRef,
HTMLFrameBase_Release,
HTMLFrameBase_GetTypeInfoCount,
HTMLFrameBase_GetTypeInfo,
HTMLFrameBase_GetIDsOfNames,
HTMLFrameBase_Invoke,
HTMLFrameBase_put_src,
HTMLFrameBase_get_src,
HTMLFrameBase_put_name,
HTMLFrameBase_get_name,
HTMLFrameBase_put_border,
HTMLFrameBase_get_border,
HTMLFrameBase_put_frameBorder,
HTMLFrameBase_get_frameBorder,
HTMLFrameBase_put_frameSpacing,
HTMLFrameBase_get_frameSpacing,
HTMLFrameBase_put_marginWidth,
HTMLFrameBase_get_marginWidth,
HTMLFrameBase_put_marginHeight,
HTMLFrameBase_get_marginHeight,
HTMLFrameBase_put_noResize,
HTMLFrameBase_get_noResize,
HTMLFrameBase_put_scrolling,
HTMLFrameBase_get_scrolling
};
HRESULT HTMLFrameBase_QI(HTMLFrameBase *This, REFIID riid, void **ppv)
{
if(IsEqualGUID(&IID_IHTMLFrameBase, riid)) {
TRACE("(%p)->(IID_IHTMLFrameBase %p)\n", This, ppv);
*ppv = HTMLFRAMEBASE(This);
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
void HTMLFrameBase_destructor(HTMLFrameBase *This)
{
HTMLElement_destructor(&This->element.node);
}
void HTMLFrameBase_Init(HTMLFrameBase *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
dispex_static_data_t *dispex_data)
{
This->lpIHTMLFrameBaseVtbl = &HTMLFrameBaseVtbl;
HTMLElement_Init(&This->element, doc, nselem, dispex_data);
}

View File

@ -32,8 +32,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
typedef struct {
HTMLElement element;
const IHTMLFrameBaseVtbl *lpIHTMLFrameBaseVtbl;
HTMLFrameBase framebase;
const IHTMLFrameBase2Vtbl *lpIHTMLFrameBase2Vtbl;
LONG ref;
@ -42,241 +41,29 @@ typedef struct {
HTMLWindow *content_window;
} HTMLIFrame;
#define HTMLFRAMEBASE(x) (&(x)->lpIHTMLFrameBaseVtbl)
#define HTMLFRAMEBASE2(x) (&(x)->lpIHTMLFrameBase2Vtbl)
#define HTMLFRAMEBASE_THIS(iface) DEFINE_THIS(HTMLIFrame, IHTMLFrameBase, iface)
static HRESULT WINAPI HTMLIFrameBase_QueryInterface(IHTMLFrameBase *iface, REFIID riid, void **ppv)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
}
static ULONG WINAPI HTMLIFrameBase_AddRef(IHTMLFrameBase *iface)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
}
static ULONG WINAPI HTMLIFrameBase_Release(IHTMLFrameBase *iface)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
}
static HRESULT WINAPI HTMLIFrameBase_GetTypeInfoCount(IHTMLFrameBase *iface, UINT *pctinfo)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
}
static HRESULT WINAPI HTMLIFrameBase_GetTypeInfo(IHTMLFrameBase *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
}
static HRESULT WINAPI HTMLIFrameBase_GetIDsOfNames(IHTMLFrameBase *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames,
cNames, lcid, rgDispId);
}
static HRESULT WINAPI HTMLIFrameBase_Invoke(IHTMLFrameBase *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLIFrameBase_put_src(IHTMLFrameBase *iface, BSTR v)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_get_src(IHTMLFrameBase *iface, BSTR *p)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_put_name(IHTMLFrameBase *iface, BSTR v)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_get_name(IHTMLFrameBase *iface, BSTR *p)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_put_border(IHTMLFrameBase *iface, VARIANT v)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_get_border(IHTMLFrameBase *iface, VARIANT *p)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_put_frameBorder(IHTMLFrameBase *iface, BSTR v)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_get_frameBorder(IHTMLFrameBase *iface, BSTR *p)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_put_frameSpacing(IHTMLFrameBase *iface, VARIANT v)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_get_frameSpacing(IHTMLFrameBase *iface, VARIANT *p)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_put_marginWidth(IHTMLFrameBase *iface, VARIANT v)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_get_marginWidth(IHTMLFrameBase *iface, VARIANT *p)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_put_marginHeight(IHTMLFrameBase *iface, VARIANT v)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_get_marginHeight(IHTMLFrameBase *iface, VARIANT *p)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_put_noResize(IHTMLFrameBase *iface, VARIANT_BOOL v)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_get_noResize(IHTMLFrameBase *iface, VARIANT_BOOL *p)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_put_scrolling(IHTMLFrameBase *iface, BSTR v)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLIFrameBase_get_scrolling(IHTMLFrameBase *iface, BSTR *p)
{
HTMLIFrame *This = HTMLFRAMEBASE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static const IHTMLFrameBaseVtbl HTMLIFrameBaseVtbl = {
HTMLIFrameBase_QueryInterface,
HTMLIFrameBase_AddRef,
HTMLIFrameBase_Release,
HTMLIFrameBase_GetTypeInfoCount,
HTMLIFrameBase_GetTypeInfo,
HTMLIFrameBase_GetIDsOfNames,
HTMLIFrameBase_Invoke,
HTMLIFrameBase_put_src,
HTMLIFrameBase_get_src,
HTMLIFrameBase_put_name,
HTMLIFrameBase_get_name,
HTMLIFrameBase_put_border,
HTMLIFrameBase_get_border,
HTMLIFrameBase_put_frameBorder,
HTMLIFrameBase_get_frameBorder,
HTMLIFrameBase_put_frameSpacing,
HTMLIFrameBase_get_frameSpacing,
HTMLIFrameBase_put_marginWidth,
HTMLIFrameBase_get_marginWidth,
HTMLIFrameBase_put_marginHeight,
HTMLIFrameBase_get_marginHeight,
HTMLIFrameBase_put_noResize,
HTMLIFrameBase_get_noResize,
HTMLIFrameBase_put_scrolling,
HTMLIFrameBase_get_scrolling
};
#define HTMLFRAMEBASE2_THIS(iface) DEFINE_THIS(HTMLIFrame, IHTMLFrameBase2, iface)
static HRESULT WINAPI HTMLIFrameBase2_QueryInterface(IHTMLFrameBase2 *iface, REFIID riid, void **ppv)
{
HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->framebase.element.node), riid, ppv);
}
static ULONG WINAPI HTMLIFrameBase2_AddRef(IHTMLFrameBase2 *iface)
{
HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->framebase.element.node));
}
static ULONG WINAPI HTMLIFrameBase2_Release(IHTMLFrameBase2 *iface)
{
HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->framebase.element.node));
}
static HRESULT WINAPI HTMLIFrameBase2_GetTypeInfoCount(IHTMLFrameBase2 *iface, UINT *pctinfo)
@ -422,7 +209,7 @@ static const IHTMLFrameBase2Vtbl HTMLIFrameBase2Vtbl = {
HTMLIFrameBase2_get_allowTransparency
};
#define HTMLIFRAME_NODE_THIS(iface) DEFINE_THIS2(HTMLIFrame, element.node, iface)
#define HTMLIFRAME_NODE_THIS(iface) DEFINE_THIS2(HTMLIFrame, framebase.element.node, iface)
static HRESULT HTMLIFrame_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
{
@ -430,14 +217,11 @@ static HRESULT HTMLIFrame_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
*ppv = NULL;
if(IsEqualGUID(&IID_IHTMLFrameBase, riid)) {
TRACE("(%p)->(IID_IHTMLFrameBase %p)\n", This, ppv);
*ppv = HTMLFRAMEBASE(This);
}else if(IsEqualGUID(&IID_IHTMLFrameBase2, riid)) {
if(IsEqualGUID(&IID_IHTMLFrameBase2, riid)) {
TRACE("(%p)->(IID_IHTMLFrameBase2 %p)\n", This, ppv);
*ppv = HTMLFRAMEBASE2(This);
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
return HTMLFrameBase_QI(&This->framebase, riid, ppv);
}
IUnknown_AddRef((IUnknown*)*ppv);
@ -453,7 +237,7 @@ static void HTMLIFrame_destructor(HTMLDOMNode *iface)
if(This->nsiframe)
nsIDOMHTMLIFrameElement_Release(This->nsiframe);
HTMLElement_destructor(&This->element.node);
HTMLFrameBase_destructor(&This->framebase);
}
#undef HTMLIFRAME_NODE_THIS
@ -488,15 +272,14 @@ HTMLElement *HTMLIFrame_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem)
ret = heap_alloc_zero(sizeof(HTMLIFrame));
ret->lpIHTMLFrameBaseVtbl = &HTMLIFrameBaseVtbl;
ret->lpIHTMLFrameBase2Vtbl = &HTMLIFrameBase2Vtbl;
ret->element.node.vtbl = &HTMLIFrameImplVtbl;
ret->framebase.element.node.vtbl = &HTMLIFrameImplVtbl;
HTMLElement_Init(&ret->element, doc, nselem, &HTMLIFrame_dispex);
HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLIFrame_dispex);
nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLIFrameElement, (void**)&ret->nsiframe);
if(NS_FAILED(nsres))
ERR("Could not get nsIDOMHTMLIFrameElement iface: %08x\n", nsres);
return &ret->element;
return &ret->framebase.element;
}

View File

@ -460,6 +460,12 @@ typedef struct {
ConnectionPoint cp;
} HTMLTextContainer;
typedef struct {
HTMLElement element;
const IHTMLFrameBaseVtbl *lpIHTMLFrameBaseVtbl;
} HTMLFrameBase;
typedef struct _mutation_queue_t {
DWORD type;
nsISupports *nsiface;
@ -556,6 +562,7 @@ struct HTMLDocumentNode {
#define HTMLDOMNODE2(x) ((IHTMLDOMNode2*) &(x)->lpHTMLDOMNode2Vtbl)
#define HTMLTEXTCONT(x) ((IHTMLTextContainer*) &(x)->lpHTMLTextContainerVtbl)
#define HTMLFRAMEBASE(x) ((IHTMLFrameBase*) &(x)->lpIHTMLFrameBaseVtbl)
#define HTMLOPTFACTORY(x) ((IHTMLOptionElementFactory*) &(x)->lpHTMLOptionElementFactoryVtbl)
#define HTMLIMGFACTORY(x) ((IHTMLImageElementFactory*) &(x)->lpHTMLImageElementFactoryVtbl)
@ -702,6 +709,7 @@ void HTMLElement_Init(HTMLElement*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_s
void HTMLElement2_Init(HTMLElement*);
void HTMLElement3_Init(HTMLElement*);
void HTMLTextContainer_Init(HTMLTextContainer*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*);
void HTMLFrameBase_Init(HTMLFrameBase*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*);
HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**);
void HTMLDOMNode_destructor(HTMLDOMNode*);
@ -709,6 +717,9 @@ void HTMLDOMNode_destructor(HTMLDOMNode*);
HRESULT HTMLElement_QI(HTMLDOMNode*,REFIID,void**);
void HTMLElement_destructor(HTMLDOMNode*);
HRESULT HTMLFrameBase_QI(HTMLFrameBase*,REFIID,void**);
void HTMLFrameBase_destructor(HTMLFrameBase*);
HTMLDOMNode *get_node(HTMLDocumentNode*,nsIDOMNode*,BOOL);
void release_nodes(HTMLDocumentNode*);