Commit ed10e504 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLElement2 implementation.

parent 9c225446
......@@ -14,6 +14,7 @@ C_SRCS = \
htmldoc.c \
htmldoc3.c \
htmlelem.c \
htmlelem2.c \
htmlinput.c \
htmlnode.c \
htmlselect.c \
......
......@@ -943,6 +943,9 @@ HRESULT HTMLElement_QI(HTMLElement *This, REFIID riid, void **ppv)
}else if(IsEqualGUID(&IID_IHTMLElement, riid)) {
TRACE("(%p)->(IID_IHTMLElement %p)\n", This, ppv);
*ppv = HTMLELEM(This);
}else if(IsEqualGUID(&IID_IHTMLElement2, riid)) {
TRACE("(%p)->(IID_IHTMLElement2 %p)\n", This, ppv);
*ppv = HTMLELEM2(This);
}
if(*ppv) {
......@@ -975,6 +978,8 @@ void HTMLElement_Create(HTMLDOMNode *node)
node->impl.elem = HTMLELEM(ret);
node->destructor = HTMLElement_destructor;
HTMLElement2_Init(ret);
nsres = nsIDOMNode_QueryInterface(node->nsnode, &IID_nsIDOMHTMLElement, (void**)&ret->nselem);
if(NS_FAILED(nsres))
return;
......
......@@ -131,6 +131,7 @@ struct HTMLDOMNode {
typedef struct {
const IHTMLElementVtbl *lpHTMLElementVtbl;
const IHTMLElement2Vtbl *lpHTMLElement2Vtbl;
void (*destructor)(IUnknown*);
......@@ -168,6 +169,7 @@ typedef struct {
#define NSIFACEREQ(x) ((nsIInterfaceRequestor*) &(x)->lpInterfaceRequestorVtbl)
#define HTMLELEM(x) ((IHTMLElement*) &(x)->lpHTMLElementVtbl)
#define HTMLELEM2(x) ((IHTMLElement2*) &(x)->lpHTMLElement2Vtbl)
#define HTMLDOMNODE(x) ((IHTMLDOMNode*) &(x)->lpHTMLDOMNodeVtbl)
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
......@@ -216,6 +218,8 @@ void HTMLInputElement_Create(HTMLElement*);
void HTMLSelectElement_Create(HTMLElement*);
void HTMLTextAreaElement_Create(HTMLElement*);
void HTMLElement2_Init(HTMLElement*);
HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**);
HRESULT HTMLElement_QI(HTMLElement*,REFIID,void**);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment