Commit 98281236 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

mshtml: Execute IDocObject_FireDocumentComplete in handle_load function.

parent 12b85bef
......@@ -18,6 +18,7 @@
#include "wingdi.h"
#include "docobj.h"
#include "docobjectservice.h"
#include "comcat.h"
#include "mshtml.h"
#include "mshtmhst.h"
......@@ -424,6 +425,7 @@ struct HTMLDocumentObj {
IOleInPlaceFrame *frame;
IOleInPlaceUIWindow *ip_window;
IAdviseSink *view_sink;
IDocObjectService *doc_object_service;
DOCHOSTUIINFO hostinfo;
......@@ -882,6 +884,8 @@ DEFINE_GUID(CLSID_SysimageProtocol, 0x76E67A63, 0x06E9, 0x11D2, 0xA8,0x40, 0x00,
DEFINE_GUID(CLSID_CMarkup,0x3050f4fb,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);
DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0);
/* memory allocation functions */
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
......
......@@ -254,6 +254,10 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
update_title(doc_obj);
}
if(doc_obj && doc_obj->doc_object_service)
IDocObjectService_FireDocumentComplete(doc_obj->doc_object_service,
&doc->basedoc.window->IHTMLWindow2_iface, 0);
if(!doc->nsdoc) {
ERR("NULL nsdoc\n");
return NS_ERROR_FAILURE;
......
......@@ -28,17 +28,16 @@
#include "winuser.h"
#include "ole2.h"
#include "shlguid.h"
#include "shdeprecated.h"
#include "mshtmdid.h"
#include "idispids.h"
#include "wine/debug.h"
#include "mshtml_private.h"
#include "initguid.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0);
#define DOCHOST_DOCCANNAVIGATE 0
/**********************************************************
......@@ -99,6 +98,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
HTMLDocument *This = impl_from_IOleObject(iface);
IOleCommandTarget *cmdtrg = NULL;
IOleWindow *ole_window;
IServiceProvider *sp;
BOOL hostui_setup;
VARIANT silent;
HWND hwnd;
......@@ -120,6 +120,11 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
This->doc_obj->hostui = NULL;
}
if(This->doc_obj->doc_object_service) {
IDocObjectService_Release(This->doc_obj->doc_object_service);
This->doc_obj->doc_object_service = NULL;
}
memset(&This->doc_obj->hostinfo, 0, sizeof(DOCHOSTUIINFO));
if(!pClientSite)
......@@ -128,6 +133,25 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
IOleClientSite_AddRef(pClientSite);
This->doc_obj->client = pClientSite;
hres = IOleClientSite_QueryInterface(pClientSite, &IID_IServiceProvider, (void**)&sp);
if(SUCCEEDED(hres)) {
IBrowserService *browser_service;
IDocObjectService *doc_object_service;
hres = IServiceProvider_QueryService(sp, &IID_IShellBrowser,
&IID_IBrowserService, (void**)&browser_service);
if(SUCCEEDED(hres)) {
hres = IBrowserService_QueryInterface(browser_service,
&IID_IDocObjectService, (void**)&doc_object_service);
if(SUCCEEDED(hres))
This->doc_obj->doc_object_service = doc_object_service;
IBrowserService_Release(browser_service);
}
IServiceProvider_Release(sp);
}
hostui_setup = This->doc_obj->hostui_setup;
if(!This->doc_obj->hostui) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment