mshtml: Added IDispatchEx support to HTMLStyleSheetRulesCollection object.
This commit is contained in:
parent
018af15b9d
commit
000b78e943
|
@ -50,6 +50,7 @@ struct HTMLStyleSheetsCollection {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HTMLStyleSheetRulesCollection {
|
struct HTMLStyleSheetRulesCollection {
|
||||||
|
DispatchEx dispex;
|
||||||
IHTMLStyleSheetRulesCollection IHTMLStyleSheetRulesCollection_iface;
|
IHTMLStyleSheetRulesCollection IHTMLStyleSheetRulesCollection_iface;
|
||||||
|
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
@ -73,15 +74,16 @@ static HRESULT WINAPI HTMLStyleSheetRulesCollection_QueryInterface(IHTMLStyleShe
|
||||||
}else if(IsEqualGUID(&IID_IHTMLStyleSheetRulesCollection, riid)) {
|
}else if(IsEqualGUID(&IID_IHTMLStyleSheetRulesCollection, riid)) {
|
||||||
TRACE("(%p)->(IID_IHTMLStyleSheetRulesCollection %p)\n", This, ppv);
|
TRACE("(%p)->(IID_IHTMLStyleSheetRulesCollection %p)\n", This, ppv);
|
||||||
*ppv = &This->IHTMLStyleSheetRulesCollection_iface;
|
*ppv = &This->IHTMLStyleSheetRulesCollection_iface;
|
||||||
|
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
|
||||||
|
return *ppv ? S_OK : E_NOINTERFACE;
|
||||||
|
}else {
|
||||||
|
*ppv = NULL;
|
||||||
|
FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||||
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(*ppv) {
|
IUnknown_AddRef((IUnknown*)*ppv);
|
||||||
IUnknown_AddRef((IUnknown*)*ppv);
|
return S_OK;
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
|
||||||
return E_NOINTERFACE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI HTMLStyleSheetRulesCollection_AddRef(IHTMLStyleSheetRulesCollection *iface)
|
static ULONG WINAPI HTMLStyleSheetRulesCollection_AddRef(IHTMLStyleSheetRulesCollection *iface)
|
||||||
|
@ -102,6 +104,7 @@ static ULONG WINAPI HTMLStyleSheetRulesCollection_Release(IHTMLStyleSheetRulesCo
|
||||||
TRACE("(%p) ref=%d\n", This, ref);
|
TRACE("(%p) ref=%d\n", This, ref);
|
||||||
|
|
||||||
if(!ref) {
|
if(!ref) {
|
||||||
|
release_dispex(&This->dispex);
|
||||||
if(This->nslist)
|
if(This->nslist)
|
||||||
nsIDOMCSSRuleList_Release(This->nslist);
|
nsIDOMCSSRuleList_Release(This->nslist);
|
||||||
heap_free(This);
|
heap_free(This);
|
||||||
|
@ -114,25 +117,22 @@ static HRESULT WINAPI HTMLStyleSheetRulesCollection_GetTypeInfoCount(
|
||||||
IHTMLStyleSheetRulesCollection *iface, UINT *pctinfo)
|
IHTMLStyleSheetRulesCollection *iface, UINT *pctinfo)
|
||||||
{
|
{
|
||||||
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
|
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, pctinfo);
|
return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyleSheetRulesCollection_GetTypeInfo(IHTMLStyleSheetRulesCollection *iface,
|
static HRESULT WINAPI HTMLStyleSheetRulesCollection_GetTypeInfo(IHTMLStyleSheetRulesCollection *iface,
|
||||||
UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
|
UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
|
||||||
{
|
{
|
||||||
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
|
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
|
||||||
FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
|
return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyleSheetRulesCollection_GetIDsOfNames(IHTMLStyleSheetRulesCollection *iface,
|
static HRESULT WINAPI HTMLStyleSheetRulesCollection_GetIDsOfNames(IHTMLStyleSheetRulesCollection *iface,
|
||||||
REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
||||||
{
|
{
|
||||||
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
|
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
|
||||||
FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
|
return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
|
||||||
lcid, rgDispId);
|
lcid, rgDispId);
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyleSheetRulesCollection_Invoke(IHTMLStyleSheetRulesCollection *iface,
|
static HRESULT WINAPI HTMLStyleSheetRulesCollection_Invoke(IHTMLStyleSheetRulesCollection *iface,
|
||||||
|
@ -140,9 +140,8 @@ static HRESULT WINAPI HTMLStyleSheetRulesCollection_Invoke(IHTMLStyleSheetRulesC
|
||||||
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||||
{
|
{
|
||||||
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
|
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
|
||||||
FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
|
return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
|
||||||
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyleSheetRulesCollection_get_length(IHTMLStyleSheetRulesCollection *iface,
|
static HRESULT WINAPI HTMLStyleSheetRulesCollection_get_length(IHTMLStyleSheetRulesCollection *iface,
|
||||||
|
@ -185,6 +184,17 @@ static const IHTMLStyleSheetRulesCollectionVtbl HTMLStyleSheetRulesCollectionVtb
|
||||||
HTMLStyleSheetRulesCollection_item
|
HTMLStyleSheetRulesCollection_item
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const tid_t HTMLStyleSheetRulesCollection_iface_tids[] = {
|
||||||
|
IHTMLStyleSheetRulesCollection_tid,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
static dispex_static_data_t HTMLStyleSheetRulesCollection_dispex = {
|
||||||
|
NULL,
|
||||||
|
DispHTMLStyleSheetRulesCollection_tid,
|
||||||
|
NULL,
|
||||||
|
HTMLStyleSheetRulesCollection_iface_tids
|
||||||
|
};
|
||||||
|
|
||||||
static IHTMLStyleSheetRulesCollection *HTMLStyleSheetRulesCollection_Create(nsIDOMCSSRuleList *nslist)
|
static IHTMLStyleSheetRulesCollection *HTMLStyleSheetRulesCollection_Create(nsIDOMCSSRuleList *nslist)
|
||||||
{
|
{
|
||||||
HTMLStyleSheetRulesCollection *ret;
|
HTMLStyleSheetRulesCollection *ret;
|
||||||
|
@ -194,6 +204,8 @@ static IHTMLStyleSheetRulesCollection *HTMLStyleSheetRulesCollection_Create(nsID
|
||||||
ret->ref = 1;
|
ret->ref = 1;
|
||||||
ret->nslist = nslist;
|
ret->nslist = nslist;
|
||||||
|
|
||||||
|
init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLStyleSheetRulesCollection_iface, &HTMLStyleSheetRulesCollection_dispex);
|
||||||
|
|
||||||
if(nslist)
|
if(nslist)
|
||||||
nsIDOMCSSRuleList_AddRef(nslist);
|
nsIDOMCSSRuleList_AddRef(nslist);
|
||||||
|
|
||||||
|
@ -460,7 +472,6 @@ static HRESULT WINAPI HTMLStyleSheet_GetTypeInfo(IHTMLStyleSheet *iface, UINT iT
|
||||||
LCID lcid, ITypeInfo **ppTInfo)
|
LCID lcid, ITypeInfo **ppTInfo)
|
||||||
{
|
{
|
||||||
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
|
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
|
||||||
TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
|
|
||||||
return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,7 +480,6 @@ static HRESULT WINAPI HTMLStyleSheet_GetIDsOfNames(IHTMLStyleSheet *iface, REFII
|
||||||
LCID lcid, DISPID *rgDispId)
|
LCID lcid, DISPID *rgDispId)
|
||||||
{
|
{
|
||||||
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
|
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
|
||||||
TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
|
|
||||||
return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId);
|
return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,8 +488,6 @@ static HRESULT WINAPI HTMLStyleSheet_Invoke(IHTMLStyleSheet *iface, DISPID dispI
|
||||||
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||||
{
|
{
|
||||||
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
|
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
|
||||||
TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
|
|
||||||
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
|
||||||
return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams,
|
return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams,
|
||||||
pVarResult, pExcepInfo, puArgErr);
|
pVarResult, pExcepInfo, puArgErr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,7 @@ typedef struct event_target_t event_target_t;
|
||||||
XDIID(DispHTMLStyle) \
|
XDIID(DispHTMLStyle) \
|
||||||
XDIID(DispHTMLStyleElement) \
|
XDIID(DispHTMLStyleElement) \
|
||||||
XDIID(DispHTMLStyleSheet) \
|
XDIID(DispHTMLStyleSheet) \
|
||||||
|
XDIID(DispHTMLStyleSheetRulesCollection) \
|
||||||
XDIID(DispHTMLStyleSheetsCollection) \
|
XDIID(DispHTMLStyleSheetsCollection) \
|
||||||
XDIID(DispHTMLTable) \
|
XDIID(DispHTMLTable) \
|
||||||
XDIID(DispHTMLTableCell) \
|
XDIID(DispHTMLTableCell) \
|
||||||
|
@ -180,6 +181,7 @@ typedef struct event_target_t event_target_t;
|
||||||
XIID(IHTMLStyle6) \
|
XIID(IHTMLStyle6) \
|
||||||
XIID(IHTMLStyleElement) \
|
XIID(IHTMLStyleElement) \
|
||||||
XIID(IHTMLStyleSheet) \
|
XIID(IHTMLStyleSheet) \
|
||||||
|
XIID(IHTMLStyleSheetRulesCollection) \
|
||||||
XIID(IHTMLStyleSheetsCollection) \
|
XIID(IHTMLStyleSheetsCollection) \
|
||||||
XIID(IHTMLTable) \
|
XIID(IHTMLTable) \
|
||||||
XIID(IHTMLTable2) \
|
XIID(IHTMLTable2) \
|
||||||
|
|
|
@ -6241,6 +6241,8 @@ static void test_stylesheet(IDispatch *disp)
|
||||||
hres = IHTMLStyleSheet_get_rules(stylesheet, &col);
|
hres = IHTMLStyleSheet_get_rules(stylesheet, &col);
|
||||||
ok(hres == S_OK, "get_rules failed: %08x\n", hres);
|
ok(hres == S_OK, "get_rules failed: %08x\n", hres);
|
||||||
ok(col != NULL, "col == NULL\n");
|
ok(col != NULL, "col == NULL\n");
|
||||||
|
|
||||||
|
test_disp2((IUnknown*)col, &DIID_DispHTMLStyleSheetRulesCollection, &IID_IHTMLStyleSheetRulesCollection, "[object]");
|
||||||
IHTMLStyleSheetRulesCollection_Release(col);
|
IHTMLStyleSheetRulesCollection_Release(col);
|
||||||
|
|
||||||
href = (void*)0xdeadbeef;
|
href = (void*)0xdeadbeef;
|
||||||
|
|
Loading…
Reference in New Issue