mshtml: Added MHTMLDocument object implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
51e1a08893
commit
ebee2a8346
|
@ -1,7 +1,7 @@
|
|||
MODULE = mshtml.dll
|
||||
IMPORTLIB = mshtml
|
||||
IMPORTS = strmiids uuid urlmon shlwapi shell32 ole32 oleaut32 user32 gdi32 advapi32
|
||||
DELAYIMPORTS = wininet
|
||||
DELAYIMPORTS = wininet inetcomm
|
||||
|
||||
C_SRCS = \
|
||||
conpoint.c \
|
||||
|
|
|
@ -5075,7 +5075,7 @@ static dispex_static_data_t HTMLDocumentObj_dispex = {
|
|||
HTMLDocumentObj_iface_tids
|
||||
};
|
||||
|
||||
HRESULT HTMLDocument_Create(IUnknown *outer, REFIID riid, void **ppv)
|
||||
static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID riid, void **ppv)
|
||||
{
|
||||
mozIDOMWindowProxy *mozwindow;
|
||||
HTMLDocumentObj *doc;
|
||||
|
@ -5083,8 +5083,6 @@ HRESULT HTMLDocument_Create(IUnknown *outer, REFIID riid, void **ppv)
|
|||
nsresult nsres;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p %s %p)\n", outer, debugstr_mshtml_guid(riid), ppv);
|
||||
|
||||
if(outer && !IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
*ppv = NULL;
|
||||
return E_INVALIDARG;
|
||||
|
@ -5102,6 +5100,7 @@ HRESULT HTMLDocument_Create(IUnknown *outer, REFIID riid, void **ppv)
|
|||
init_doc(&doc->basedoc, outer ? outer : &doc->IUnknown_outer, &doc->dispex.IDispatchEx_iface);
|
||||
TargetContainer_Init(doc);
|
||||
doc->basedoc.doc_obj = doc;
|
||||
doc->is_mhtml = is_mhtml;
|
||||
|
||||
doc->usermode = UNKNOWN_USERMODE;
|
||||
|
||||
|
@ -5149,8 +5148,14 @@ HRESULT HTMLDocument_Create(IUnknown *outer, REFIID riid, void **ppv)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT HTMLDocument_Create(IUnknown *outer, REFIID riid, void **ppv)
|
||||
{
|
||||
TRACE("(%p %s %p)\n", outer, debugstr_mshtml_guid(riid), ppv);
|
||||
return create_document_object(FALSE, outer, riid, ppv);
|
||||
}
|
||||
|
||||
HRESULT MHTMLDocument_Create(IUnknown *outer, REFIID riid, void **ppv)
|
||||
{
|
||||
FIXME("(%p %s %p)\n", outer, debugstr_mshtml_guid(riid), ppv);
|
||||
return E_NOTIMPL;
|
||||
TRACE("(%p %s %p)\n", outer, debugstr_mshtml_guid(riid), ppv);
|
||||
return create_document_object(TRUE, outer, riid, ppv);
|
||||
}
|
||||
|
|
|
@ -640,6 +640,7 @@ struct HTMLDocumentObj {
|
|||
HWND hwnd;
|
||||
HWND tooltips_hwnd;
|
||||
|
||||
BOOL is_mhtml;
|
||||
BOOL request_uiactivate;
|
||||
BOOL in_place_active;
|
||||
BOOL ui_active;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "ole2.h"
|
||||
#include "shlguid.h"
|
||||
#include "idispids.h"
|
||||
#include "mimeole.h"
|
||||
|
||||
#define NO_SHLWAPI_REG
|
||||
#include "shlwapi.h"
|
||||
|
@ -587,6 +588,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
|
|||
IMoniker *pimkName, LPBC pibc, DWORD grfMode)
|
||||
{
|
||||
HTMLDocument *This = impl_from_IPersistMoniker(iface);
|
||||
IMoniker *mon;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%x %p %p %08x)\n", This, fFullyAvailable, pimkName, pibc, grfMode);
|
||||
|
@ -620,9 +622,22 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
|
|||
}
|
||||
}
|
||||
|
||||
prepare_for_binding(This, pimkName, FALSE);
|
||||
if(This->doc_obj->is_mhtml) {
|
||||
IUnknown *unk;
|
||||
|
||||
hres = MimeOleObjectFromMoniker(0, pimkName, pibc, &IID_IUnknown, (void**)&unk, &mon);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
IUnknown_Release(unk);
|
||||
pibc = NULL;
|
||||
}else {
|
||||
IMoniker_AddRef(mon = pimkName);
|
||||
}
|
||||
|
||||
prepare_for_binding(This, mon, FALSE);
|
||||
call_docview_84(This->doc_obj);
|
||||
hres = set_moniker(This->window, pimkName, NULL, pibc, NULL, TRUE);
|
||||
hres = set_moniker(This->window, mon, NULL, pibc, NULL, TRUE);
|
||||
IMoniker_Release(mon);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
|
|
Loading…
Reference in New Issue