mshtml: Added IObjectSafety stub.

This commit is contained in:
Piotr Caban 2011-01-19 21:31:43 +01:00 committed by Alexandre Julliard
parent 862eab2820
commit 52a1065f70
5 changed files with 71 additions and 0 deletions

View file

@ -1827,6 +1827,9 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
}else if(IsEqualGUID(&IID_IOleContainer, riid)) {
TRACE("(%p)->(IID_IOleContainer %p)\n", This, ppv);
*ppv = &This->IOleContainer_iface;
}else if(IsEqualGUID(&IID_IObjectSafety, riid)) {
TRACE("(%p)->(IID_IObjectSafety %p)\n", This, ppv);
*ppv = &This->IObjectSafety_iface;
}else {
return FALSE;
}

View file

@ -66,6 +66,7 @@ HKLM,"Software\Microsoft\Internet Explorer\AboutURLs","PostNotCached",2,"res://m
HKLM,"Software\Microsoft\Internet Explorer\AboutURLs","mozilla",2,"res://mshtml.dll/about.moz"
HKLM,"Software\Microsoft\Internet Explorer\Default Behaviors","VML",, "CLSID:10072CEC-8CC1-11D1-986E-00A0C955B42E"
HKLM,"Software\Microsoft\Internet Explorer\Default Behaviors","TIME",, "CLSID:476C391C-3E0D-11D2-B948-00C04FA32195"
HKLM,"Software\Microsoft\Internet Explorer\ActiveX Compatibility","Version",,"6.17"
[WineGecko.Reg]

View file

@ -24,6 +24,7 @@
#include "hlink.h"
#include "perhist.h"
#include "dispex.h"
#include "objsafe.h"
#include "wine/list.h"
#include "wine/unicode.h"
@ -368,6 +369,7 @@ struct HTMLDocument {
ISupportErrorInfo ISupportErrorInfo_iface;
IObjectWithSite IObjectWithSite_iface;
IOleContainer IOleContainer_iface;
IObjectSafety IObjectSafety_iface;
IUnknown *unk_impl;
IDispatchEx *dispex;

View file

@ -802,6 +802,10 @@ static const IObjectWithSiteVtbl ObjectWithSiteVtbl = {
ObjectWithSite_GetSite
};
/**********************************************************
* IOleContainer implementation
*/
static inline HTMLDocument *impl_from_IOleContainer(IOleContainer *iface)
{
return CONTAINING_RECORD(iface, HTMLDocument, IOleContainer_iface);
@ -856,6 +860,63 @@ static const IOleContainerVtbl OleContainerVtbl = {
OleContainer_LockContainer
};
/**********************************************************
* IObjectSafety implementation
*/
static inline HTMLDocument *impl_from_IObjectSafety(IObjectSafety *iface)
{
return CONTAINING_RECORD(iface, HTMLDocument, IObjectSafety_iface);
}
static HRESULT WINAPI ObjectSafety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv)
{
HTMLDocument *This = impl_from_IObjectSafety(iface);
return htmldoc_query_interface(This, riid, ppv);
}
static ULONG WINAPI ObjectSafety_AddRef(IObjectSafety *iface)
{
HTMLDocument *This = impl_from_IObjectSafety(iface);
return htmldoc_addref(This);
}
static ULONG WINAPI ObjectSafety_Release(IObjectSafety *iface)
{
HTMLDocument *This = impl_from_IObjectSafety(iface);
return htmldoc_release(This);
}
static HRESULT WINAPI ObjectSafety_GetInterfaceSafetyOptions(IObjectSafety *iface,
REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions)
{
HTMLDocument *This = impl_from_IObjectSafety(iface);
FIXME("(%p)->(%s %p %p)\n", This, debugstr_guid(riid), pdwSupportedOptions, pdwEnabledOptions);
return E_NOTIMPL;
}
static HRESULT WINAPI ObjectSafety_SetInterfaceSafetyOptions(IObjectSafety *iface,
REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions)
{
HTMLDocument *This = impl_from_IObjectSafety(iface);
FIXME("(%p)->(%s %x %x)\n", This, debugstr_guid(riid), dwOptionSetMask, dwEnabledOptions);
if(IsEqualGUID(&IID_IPersistMoniker, riid) &&
dwOptionSetMask==INTERFACESAFE_FOR_UNTRUSTED_DATA &&
dwEnabledOptions==INTERFACESAFE_FOR_UNTRUSTED_DATA)
return S_OK;
return E_NOTIMPL;
}
static const IObjectSafetyVtbl ObjectSafetyVtbl = {
ObjectSafety_QueryInterface,
ObjectSafety_AddRef,
ObjectSafety_Release,
ObjectSafety_GetInterfaceSafetyOptions,
ObjectSafety_SetInterfaceSafetyOptions
};
void HTMLDocument_LockContainer(HTMLDocumentObj *This, BOOL fLock)
{
IOleContainer *container;
@ -879,4 +940,5 @@ void HTMLDocument_OleObj_Init(HTMLDocument *This)
This->IOleControl_iface.lpVtbl = &OleControlVtbl;
This->IObjectWithSite_iface.lpVtbl = &ObjectWithSiteVtbl;
This->IOleContainer_iface.lpVtbl = &OleContainerVtbl;
This->IObjectSafety_iface.lpVtbl = &ObjectSafetyVtbl;
}

View file

@ -32,6 +32,7 @@
#include "docobj.h"
#include "dispex.h"
#include "mshtml_test.h"
#include "objsafe.h"
static const char doc_blank[] = "<html></html>";
static const char doc_str1[] = "<html><body>test</body></html>";
@ -126,6 +127,7 @@ static const IID * const doc_node_iids[] = {
&IID_IConnectionPointContainer,
&IID_IInternetHostSecurityManager,
&IID_IOleContainer,
&IID_IObjectSafety,
NULL
};
@ -139,6 +141,7 @@ static const IID * const doc_obj_iids[] = {
&IID_IConnectionPointContainer,
&IID_ICustomDoc,
&IID_IOleContainer,
&IID_IObjectSafety,
NULL
};