mshtml: Added IDispatchEx support to HTMLCurrentStyle.
This commit is contained in:
parent
4a67a50e6f
commit
9b657fa0e7
|
@ -68,6 +68,7 @@ static REFIID tid_ids[] = {
|
|||
&DIID_DispDOMChildrenCollection,
|
||||
&DIID_DispHTMLBody,
|
||||
&DIID_DispHTMLCommentElement,
|
||||
&DIID_DispHTMLCurrentStyle,
|
||||
&DIID_DispHTMLDocument,
|
||||
&DIID_DispHTMLDOMTextNode,
|
||||
&DIID_DispHTMLElementCollection,
|
||||
|
@ -84,6 +85,7 @@ static REFIID tid_ids[] = {
|
|||
&IID_IHTMLBodyElement,
|
||||
&IID_IHTMLBodyElement2,
|
||||
&IID_IHTMLCommentElement,
|
||||
&IID_IHTMLCurrentStyle,
|
||||
&IID_IHTMLDocument2,
|
||||
&IID_IHTMLDocument3,
|
||||
&IID_IHTMLDocument4,
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
const IHTMLCurrentStyleVtbl *lpIHTMLCurrentStyleVtbl;
|
||||
|
||||
LONG ref;
|
||||
|
@ -51,12 +52,11 @@ static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface,
|
|||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = HTMLCURSTYLE(This);
|
||||
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
||||
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
||||
*ppv = HTMLCURSTYLE(This);
|
||||
}else if(IsEqualGUID(&IID_IHTMLCurrentStyle, riid)) {
|
||||
TRACE("(%p)->(IID_IHTMLCurrentStyle %p)\n", This, ppv);
|
||||
*ppv = HTMLCURSTYLE(This);
|
||||
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
|
||||
return *ppv ? S_OK : E_NOINTERFACE;
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
|
@ -864,6 +864,17 @@ static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
|
|||
HTMLCurrentStyle_get_textTransform
|
||||
};
|
||||
|
||||
static const tid_t HTMLCurrentStyle_iface_tids[] = {
|
||||
IHTMLCurrentStyle_tid,
|
||||
0
|
||||
};
|
||||
static dispex_static_data_t HTMLCurrentStyle_dispex = {
|
||||
NULL,
|
||||
DispHTMLCurrentStyle_tid,
|
||||
NULL,
|
||||
HTMLCurrentStyle_iface_tids
|
||||
};
|
||||
|
||||
HRESULT HTMLCurrentStyle_Create(IHTMLCurrentStyle **p)
|
||||
{
|
||||
HTMLCurrentStyle *ret;
|
||||
|
@ -875,6 +886,8 @@ HRESULT HTMLCurrentStyle_Create(IHTMLCurrentStyle **p)
|
|||
ret->lpIHTMLCurrentStyleVtbl = &HTMLCurrentStyleVtbl;
|
||||
ret->ref = 1;
|
||||
|
||||
init_dispex(&ret->dispex, (IUnknown*)HTMLCURSTYLE(ret), &HTMLCurrentStyle_dispex);
|
||||
|
||||
*p = HTMLCURSTYLE(ret);
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ typedef enum {
|
|||
DispDOMChildrenCollection_tid,
|
||||
DispHTMLBody_tid,
|
||||
DispHTMLCommentElement_tid,
|
||||
DispHTMLCurrentStyle_tid,
|
||||
DispHTMLDocument_tid,
|
||||
DispHTMLDOMTextNode_tid,
|
||||
DispHTMLElementCollection_tid,
|
||||
|
@ -80,6 +81,7 @@ typedef enum {
|
|||
IHTMLBodyElement_tid,
|
||||
IHTMLBodyElement2_tid,
|
||||
IHTMLCommentElement_tid,
|
||||
IHTMLCurrentStyle_tid,
|
||||
IHTMLDocument2_tid,
|
||||
IHTMLDocument3_tid,
|
||||
IHTMLDocument4_tid,
|
||||
|
|
|
@ -281,6 +281,7 @@ static const IID * const style_iids[] = {
|
|||
static const IID * const cstyle_iids[] = {
|
||||
&IID_IUnknown,
|
||||
&IID_IDispatch,
|
||||
&IID_IDispatchEx,
|
||||
&IID_IHTMLCurrentStyle,
|
||||
NULL
|
||||
};
|
||||
|
@ -1985,6 +1986,7 @@ static void test_navigator(IHTMLDocument2 *doc)
|
|||
|
||||
static void test_current_style(IHTMLCurrentStyle *current_style)
|
||||
{
|
||||
test_disp((IUnknown*)current_style, &DIID_DispHTMLCurrentStyle);
|
||||
test_ifaces((IUnknown*)current_style, cstyle_iids);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue