mshtml: Execute IDocObject_FireDocumentComplete in handle_load function.

This commit is contained in:
Piotr Caban 2011-03-11 11:14:18 +01:00 committed by Alexandre Julliard
parent 12b85befc0
commit 98281236c0
3 changed files with 34 additions and 2 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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) {