Module: wine Branch: master Commit: f263b637a99dbe749f7d3ef98c3ee2d9e9a7721c URL: http://source.winehq.org/git/wine.git/?a=commit;h=f263b637a99dbe749f7d3ef98c...
Author: Jacek Caban jacek@codeweavers.com Date: Thu May 1 17:36:38 2008 +0200
mshtml: Added IDispatchEx support to HTMLImgElement.
---
dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmlimg.c | 15 +++++++++++++++ dlls/mshtml/mshtml_private.h | 2 ++ 3 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 9e68461..06fdf19 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -56,6 +56,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLDocument, &DIID_DispHTMLDOMTextNode, &DIID_DispHTMLElementCollection, + &DIID_DispHTMLImg, &DIID_DispHTMLInputElement, &DIID_DispHTMLOptionElement, &DIID_DispHTMLStyle, @@ -73,6 +74,7 @@ static REFIID tid_ids[] = { &IID_IHTMLElement, &IID_IHTMLElement2, &IID_IHTMLElementCollection, + &IID_IHTMLImgElement, &IID_IHTMLInputElement, &IID_IHTMLOptionElement, &IID_IHTMLStyle, diff --git a/dlls/mshtml/htmlimg.c b/dlls/mshtml/htmlimg.c index 97b7c66..81060c1 100644 --- a/dlls/mshtml/htmlimg.c +++ b/dlls/mshtml/htmlimg.c @@ -526,6 +526,20 @@ static const NodeImplVtbl HTMLImgElementImplVtbl = { HTMLImgElement_destructor };
+static dispex_static_data_t HTMLImgElement_dispex = { + NULL, + DispHTMLImg_tid, + NULL, + { + IHTMLDOMNode_tid, + IHTMLDOMNode2_tid, + IHTMLElement_tid, + IHTMLElement2_tid, + IHTMLImgElement_tid, + 0 + } +}; + HTMLElement *HTMLImgElement_Create(nsIDOMHTMLElement *nselem) { HTMLImgElement *ret = heap_alloc_zero(sizeof(HTMLImgElement)); @@ -533,6 +547,7 @@ HTMLElement *HTMLImgElement_Create(nsIDOMHTMLElement *nselem) ret->lpHTMLImgElementVtbl = &HTMLImgElementVtbl; ret->element.node.vtbl = &HTMLImgElementImplVtbl;
+ init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLIMG(ret), &HTMLImgElement_dispex); HTMLElement_Init(&ret->element);
return &ret->element; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 911c462..921d975 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -66,6 +66,7 @@ typedef enum { DispHTMLDocument_tid, DispHTMLDOMTextNode_tid, DispHTMLElementCollection_tid, + DispHTMLImg_tid, DispHTMLInputElement_tid, DispHTMLOptionElement_tid, DispHTMLStyle_tid, @@ -83,6 +84,7 @@ typedef enum { IHTMLElement_tid, IHTMLElement2_tid, IHTMLElementCollection_tid, + IHTMLImgElement_tid, IHTMLInputElement_tid, IHTMLOptionElement_tid, IHTMLStyle_tid,