Jacek Caban : mshtml: Added IHTMLIFrameElement2 stub implementation.
Alexandre Julliard
julliard at winehq.org
Mon Sep 3 13:19:14 CDT 2012
Module: wine
Branch: master
Commit: 12a35ac9de888a303580629c6204bbfb4ad5c9b3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=12a35ac9de888a303580629c6204bbfb4ad5c9b3
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Sep 3 12:52:53 2012 +0200
mshtml: Added IHTMLIFrameElement2 stub implementation.
---
dlls/mshtml/htmliframe.c | 107 ++++++++++++++++++++++++++++++++++++++++++
dlls/mshtml/mshtml_private.h | 1 +
dlls/mshtml/tests/dom.c | 1 +
3 files changed, 109 insertions(+), 0 deletions(-)
diff --git a/dlls/mshtml/htmliframe.c b/dlls/mshtml/htmliframe.c
index 3cae237..dccc7d0 100644
--- a/dlls/mshtml/htmliframe.c
+++ b/dlls/mshtml/htmliframe.c
@@ -34,6 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
typedef struct {
HTMLFrameBase framebase;
IHTMLIFrameElement IHTMLIFrameElement_iface;
+ IHTMLIFrameElement2 IHTMLIFrameElement2_iface;
} HTMLIFrame;
static inline HTMLIFrame *impl_from_IHTMLIFrameElement(IHTMLIFrameElement *iface)
@@ -153,6 +154,107 @@ static const IHTMLIFrameElementVtbl HTMLIFrameElementVtbl = {
HTMLIFrameElement_get_align
};
+static inline HTMLIFrame *impl_from_IHTMLIFrameElement2(IHTMLIFrameElement2 *iface)
+{
+ return CONTAINING_RECORD(iface, HTMLIFrame, IHTMLIFrameElement2_iface);
+}
+
+static HRESULT WINAPI HTMLIFrameElement2_QueryInterface(IHTMLIFrameElement2 *iface,
+ REFIID riid, void **ppv)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+
+ return IHTMLDOMNode_QueryInterface(&This->framebase.element.node.IHTMLDOMNode_iface, riid, ppv);
+}
+
+static ULONG WINAPI HTMLIFrameElement2_AddRef(IHTMLIFrameElement2 *iface)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+
+ return IHTMLDOMNode_AddRef(&This->framebase.element.node.IHTMLDOMNode_iface);
+}
+
+static ULONG WINAPI HTMLIFrameElement2_Release(IHTMLIFrameElement2 *iface)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+
+ return IHTMLDOMNode_Release(&This->framebase.element.node.IHTMLDOMNode_iface);
+}
+
+static HRESULT WINAPI HTMLIFrameElement2_GetTypeInfoCount(IHTMLIFrameElement2 *iface, UINT *pctinfo)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+ return IDispatchEx_GetTypeInfoCount(&This->framebase.element.node.dispex.IDispatchEx_iface,
+ pctinfo);
+}
+
+static HRESULT WINAPI HTMLIFrameElement2_GetTypeInfo(IHTMLIFrameElement2 *iface, UINT iTInfo,
+ LCID lcid, ITypeInfo **ppTInfo)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+ return IDispatchEx_GetTypeInfo(&This->framebase.element.node.dispex.IDispatchEx_iface, iTInfo,
+ lcid, ppTInfo);
+}
+
+static HRESULT WINAPI HTMLIFrameElement2_GetIDsOfNames(IHTMLIFrameElement2 *iface, REFIID riid,
+ LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+ return IDispatchEx_GetIDsOfNames(&This->framebase.element.node.dispex.IDispatchEx_iface, riid,
+ rgszNames, cNames, lcid, rgDispId);
+}
+
+static HRESULT WINAPI HTMLIFrameElement2_Invoke(IHTMLIFrameElement2 *iface, DISPID dispIdMember,
+ REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
+ VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+ return IDispatchEx_Invoke(&This->framebase.element.node.dispex.IDispatchEx_iface, dispIdMember,
+ riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
+}
+
+static HRESULT WINAPI HTMLIFrameElement2_put_height(IHTMLIFrameElement2 *iface, VARIANT v)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLIFrameElement2_get_height(IHTMLIFrameElement2 *iface, VARIANT *p)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+ FIXME("(%p)->(%p)\n", This, p);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLIFrameElement2_put_width(IHTMLIFrameElement2 *iface, VARIANT v)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLIFrameElement2_get_width(IHTMLIFrameElement2 *iface, VARIANT *p)
+{
+ HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
+ FIXME("(%p)->(%p)\n", This, p);
+ return E_NOTIMPL;
+}
+
+static const IHTMLIFrameElement2Vtbl HTMLIFrameElement2Vtbl = {
+ HTMLIFrameElement2_QueryInterface,
+ HTMLIFrameElement2_AddRef,
+ HTMLIFrameElement2_Release,
+ HTMLIFrameElement2_GetTypeInfoCount,
+ HTMLIFrameElement2_GetTypeInfo,
+ HTMLIFrameElement2_GetIDsOfNames,
+ HTMLIFrameElement2_Invoke,
+ HTMLIFrameElement2_put_height,
+ HTMLIFrameElement2_get_height,
+ HTMLIFrameElement2_put_width,
+ HTMLIFrameElement2_get_width
+};
+
static inline HTMLIFrame *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
{
return CONTAINING_RECORD(iface, HTMLIFrame, framebase.element.node);
@@ -165,6 +267,9 @@ static HRESULT HTMLIFrame_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
if(IsEqualGUID(&IID_IHTMLIFrameElement, riid)) {
TRACE("(%p)->(IID_IHTMLIFrameElement %p)\n", This, ppv);
*ppv = &This->IHTMLIFrameElement_iface;
+ }else if(IsEqualGUID(&IID_IHTMLIFrameElement2, riid)) {
+ TRACE("(%p)->(IID_IHTMLIFrameElement2 %p)\n", This, ppv);
+ *ppv = &This->IHTMLIFrameElement2_iface;
}else {
return HTMLFrameBase_QI(&This->framebase, riid, ppv);
}
@@ -266,6 +371,7 @@ static const tid_t HTMLIFrame_iface_tids[] = {
IHTMLFrameBase_tid,
IHTMLFrameBase2_tid,
IHTMLIFrameElement_tid,
+ IHTMLIFrameElement2_tid,
0
};
@@ -285,6 +391,7 @@ HRESULT HTMLIFrame_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTML
return E_OUTOFMEMORY;
ret->IHTMLIFrameElement_iface.lpVtbl = &HTMLIFrameElementVtbl;
+ ret->IHTMLIFrameElement2_iface.lpVtbl = &HTMLIFrameElement2Vtbl;
ret->framebase.element.node.vtbl = &HTMLIFrameImplVtbl;
HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLIFrame_dispex);
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 2fecc12..8b5f841 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -146,6 +146,7 @@ typedef struct event_target_t event_target_t;
XIID(IHTMLGenericElement) \
XIID(IHTMLHeadElement) \
XIID(IHTMLIFrameElement) \
+ XIID(IHTMLIFrameElement2) \
XIID(IHTMLImageElementFactory) \
XIID(IHTMLImgElement) \
XIID(IHTMLInputElement) \
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 760580e..1b7de75 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -336,6 +336,7 @@ static const IID * const iframe_iids[] = {
&IID_IHTMLFrameBase,
&IID_IHTMLFrameBase2,
&IID_IHTMLIFrameElement,
+ &IID_IHTMLIFrameElement2,
&IID_IConnectionPointContainer,
NULL
};
More information about the wine-cvs
mailing list