mshtml: Added IHTMLDOMNode2 stub implementation.

This commit is contained in:
Jacek Caban 2008-04-24 18:22:51 +02:00 committed by Alexandre Julliard
parent 872810e641
commit 8dc2cf0d3a
3 changed files with 99 additions and 3 deletions

View File

@ -31,8 +31,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(mshtml); WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define NSSUPPORTS(x) ((nsISupports*) &(x)->lpSupportsVtbl)
#define HTMLDOMNODE_THIS(iface) DEFINE_THIS(HTMLDOMNode, HTMLDOMNode, iface) #define HTMLDOMNODE_THIS(iface) DEFINE_THIS(HTMLDOMNode, HTMLDOMNode, iface)
static HRESULT WINAPI HTMLDOMNode_QueryInterface(IHTMLDOMNode *iface, static HRESULT WINAPI HTMLDOMNode_QueryInterface(IHTMLDOMNode *iface,
@ -273,6 +271,8 @@ static HRESULT WINAPI HTMLDOMNode_get_nextSibling(IHTMLDOMNode *iface, IHTMLDOMN
return E_NOTIMPL; return E_NOTIMPL;
} }
#undef HTMLDOMNODE_THIS
static const IHTMLDOMNodeVtbl HTMLDOMNodeVtbl = { static const IHTMLDOMNodeVtbl HTMLDOMNodeVtbl = {
HTMLDOMNode_QueryInterface, HTMLDOMNode_QueryInterface,
HTMLDOMNode_AddRef, HTMLDOMNode_AddRef,
@ -303,6 +303,85 @@ static const IHTMLDOMNodeVtbl HTMLDOMNodeVtbl = {
HTMLDOMNode_get_nextSibling HTMLDOMNode_get_nextSibling
}; };
#define HTMLDOMNODE2_THIS(iface) DEFINE_THIS(HTMLDOMNode, HTMLDOMNode2, iface)
static HRESULT WINAPI HTMLDOMNode2_QueryInterface(IHTMLDOMNode2 *iface,
REFIID riid, void **ppv)
{
HTMLDOMNode *This = HTMLDOMNODE2_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(This), riid, ppv);
}
static ULONG WINAPI HTMLDOMNode2_AddRef(IHTMLDOMNode2 *iface)
{
HTMLDOMNode *This = HTMLDOMNODE2_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(This));
}
static ULONG WINAPI HTMLDOMNode2_Release(IHTMLDOMNode2 *iface)
{
HTMLDOMNode *This = HTMLDOMNODE2_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(This));
}
static HRESULT WINAPI HTMLDOMNode2_GetTypeInfoCount(IHTMLDOMNode2 *iface, UINT *pctinfo)
{
HTMLDOMNode *This = HTMLDOMNODE2_THIS(iface);
FIXME("(%p)->(%p)\n", This, pctinfo);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDOMNode2_GetTypeInfo(IHTMLDOMNode2 *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLDOMNode *This = HTMLDOMNODE2_THIS(iface);
FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDOMNode2_GetIDsOfNames(IHTMLDOMNode2 *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
HTMLDOMNode *This = HTMLDOMNODE2_THIS(iface);
FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDOMNode2_Invoke(IHTMLDOMNode2 *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLDOMNode *This = HTMLDOMNODE2_THIS(iface);
FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDOMNode2_get_ownerDocument(IHTMLDOMNode2 *iface, IDispatch **p)
{
HTMLDOMNode *This = HTMLDOMNODE2_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
#undef HTMLDOMNODE2_THIS
static const IHTMLDOMNode2Vtbl HTMLDOMNode2Vtbl = {
HTMLDOMNode2_QueryInterface,
HTMLDOMNode2_AddRef,
HTMLDOMNode2_Release,
HTMLDOMNode2_GetTypeInfoCount,
HTMLDOMNode2_GetTypeInfo,
HTMLDOMNode2_GetIDsOfNames,
HTMLDOMNode2_Invoke,
HTMLDOMNode2_get_ownerDocument
};
HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv) HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
{ {
*ppv = NULL; *ppv = NULL;
@ -324,6 +403,9 @@ HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
}else if(IsEqualGUID(&IID_IHTMLDOMNode, riid)) { }else if(IsEqualGUID(&IID_IHTMLDOMNode, riid)) {
TRACE("(%p)->(IID_IHTMLDOMNode %p)\n", This, ppv); TRACE("(%p)->(IID_IHTMLDOMNode %p)\n", This, ppv);
*ppv = HTMLDOMNODE(This); *ppv = HTMLDOMNODE(This);
}else if(IsEqualGUID(&IID_IHTMLDOMNode2, riid)) {
TRACE("(%p)->(IID_IHTMLDOMNode2 %p)\n", This, ppv);
*ppv = HTMLDOMNODE2(This);
} }
if(*ppv) { if(*ppv) {
@ -365,12 +447,15 @@ static HTMLDOMNode *create_node(HTMLDocument *doc, nsIDOMNode *nsnode)
} }
ret->lpHTMLDOMNodeVtbl = &HTMLDOMNodeVtbl; ret->lpHTMLDOMNodeVtbl = &HTMLDOMNodeVtbl;
ret->lpHTMLDOMNode2Vtbl = &HTMLDOMNode2Vtbl;
ret->ref = 1; ret->ref = 1;
ret->doc = doc; ret->doc = doc;
nsIDOMNode_AddRef(nsnode); nsIDOMNode_AddRef(nsnode);
ret->nsnode = nsnode; ret->nsnode = nsnode;
TRACE("type %d ret %p\n", node_type, ret);
return ret; return ret;
} }

View File

@ -299,6 +299,7 @@ typedef struct {
struct HTMLDOMNode { struct HTMLDOMNode {
DispatchEx dispex; DispatchEx dispex;
const IHTMLDOMNodeVtbl *lpHTMLDOMNodeVtbl; const IHTMLDOMNodeVtbl *lpHTMLDOMNodeVtbl;
const IHTMLDOMNode2Vtbl *lpHTMLDOMNode2Vtbl;
const NodeImplVtbl *vtbl; const NodeImplVtbl *vtbl;
LONG ref; LONG ref;
@ -377,6 +378,7 @@ typedef struct {
#define HTMLELEM(x) ((IHTMLElement*) &(x)->lpHTMLElementVtbl) #define HTMLELEM(x) ((IHTMLElement*) &(x)->lpHTMLElementVtbl)
#define HTMLELEM2(x) ((IHTMLElement2*) &(x)->lpHTMLElement2Vtbl) #define HTMLELEM2(x) ((IHTMLElement2*) &(x)->lpHTMLElement2Vtbl)
#define HTMLDOMNODE(x) ((IHTMLDOMNode*) &(x)->lpHTMLDOMNodeVtbl) #define HTMLDOMNODE(x) ((IHTMLDOMNode*) &(x)->lpHTMLDOMNodeVtbl)
#define HTMLDOMNODE2(x) ((IHTMLDOMNode2*) &(x)->lpHTMLDOMNode2Vtbl)
#define HTMLTEXTCONT(x) ((IHTMLTextContainer*) &(x)->lpHTMLTextContainerVtbl) #define HTMLTEXTCONT(x) ((IHTMLTextContainer*) &(x)->lpHTMLTextContainerVtbl)

View File

@ -88,6 +88,7 @@ static REFIID const none_iids[] = {
static REFIID const elem_iids[] = { static REFIID const elem_iids[] = {
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IDispatchEx, &IID_IDispatchEx,
@ -97,6 +98,7 @@ static REFIID const elem_iids[] = {
static REFIID const body_iids[] = { static REFIID const body_iids[] = {
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLTextContainer, &IID_IHTMLTextContainer,
@ -108,6 +110,7 @@ static REFIID const body_iids[] = {
static REFIID const anchor_iids[] = { static REFIID const anchor_iids[] = {
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLAnchorElement, &IID_IHTMLAnchorElement,
@ -118,6 +121,7 @@ static REFIID const anchor_iids[] = {
static REFIID const input_iids[] = { static REFIID const input_iids[] = {
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLInputElement, &IID_IHTMLInputElement,
@ -129,6 +133,7 @@ static REFIID const input_iids[] = {
static REFIID const select_iids[] = { static REFIID const select_iids[] = {
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLSelectElement, &IID_IHTMLSelectElement,
@ -139,6 +144,7 @@ static REFIID const select_iids[] = {
static REFIID const textarea_iids[] = { static REFIID const textarea_iids[] = {
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLTextAreaElement, &IID_IHTMLTextAreaElement,
@ -149,6 +155,7 @@ static REFIID const textarea_iids[] = {
static REFIID const option_iids[] = { static REFIID const option_iids[] = {
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLOptionElement, &IID_IHTMLOptionElement,
@ -159,6 +166,7 @@ static REFIID const option_iids[] = {
static REFIID const table_iids[] = { static REFIID const table_iids[] = {
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLTable, &IID_IHTMLTable,
@ -169,6 +177,7 @@ static REFIID const table_iids[] = {
static REFIID const script_iids[] = { static REFIID const script_iids[] = {
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLScriptElement, &IID_IHTMLScriptElement,