mshtml: Moved undomgr to HTMLDocumentObj.
This commit is contained in:
parent
0d15ad8be4
commit
aadd0774db
|
@ -1764,9 +1764,6 @@ static void destroy_htmldoc(HTMLDocument *This)
|
||||||
{
|
{
|
||||||
remove_doc_tasks(This);
|
remove_doc_tasks(This);
|
||||||
|
|
||||||
if(This->undomgr)
|
|
||||||
IOleUndoManager_Release(This->undomgr);
|
|
||||||
|
|
||||||
set_document_bscallback(This, NULL);
|
set_document_bscallback(This, NULL);
|
||||||
set_current_mon(This, NULL);
|
set_current_mon(This, NULL);
|
||||||
|
|
||||||
|
@ -1899,6 +1896,8 @@ static ULONG HTMLDocumentObj_Release(HTMLDocument *base)
|
||||||
IOleInPlaceObjectWindowless_InPlaceDeactivate(INPLACEWIN(&This->basedoc));
|
IOleInPlaceObjectWindowless_InPlaceDeactivate(INPLACEWIN(&This->basedoc));
|
||||||
if(This->ipsite)
|
if(This->ipsite)
|
||||||
IOleDocumentView_SetInPlaceSite(DOCVIEW(&This->basedoc), NULL);
|
IOleDocumentView_SetInPlaceSite(DOCVIEW(&This->basedoc), NULL);
|
||||||
|
if(This->undomgr)
|
||||||
|
IOleUndoManager_Release(This->undomgr);
|
||||||
destroy_htmldoc(&This->basedoc);
|
destroy_htmldoc(&This->basedoc);
|
||||||
if(This->basedoc.nsdoc)
|
if(This->basedoc.nsdoc)
|
||||||
remove_mutation_observer(This->nscontainer, This->basedoc.nsdoc);
|
remove_mutation_observer(This->nscontainer, This->basedoc.nsdoc);
|
||||||
|
|
|
@ -284,8 +284,6 @@ struct HTMLDocument {
|
||||||
HTMLWindow *window;
|
HTMLWindow *window;
|
||||||
nsIDOMHTMLDocument *nsdoc;
|
nsIDOMHTMLDocument *nsdoc;
|
||||||
|
|
||||||
IOleUndoManager *undomgr;
|
|
||||||
|
|
||||||
nsChannelBSC *bscallback;
|
nsChannelBSC *bscallback;
|
||||||
IMoniker *mon;
|
IMoniker *mon;
|
||||||
LPOLESTR url;
|
LPOLESTR url;
|
||||||
|
@ -354,6 +352,8 @@ struct HTMLDocumentObj {
|
||||||
IOleInPlaceSite *ipsite;
|
IOleInPlaceSite *ipsite;
|
||||||
IOleInPlaceFrame *frame;
|
IOleInPlaceFrame *frame;
|
||||||
IOleInPlaceUIWindow *ip_window;
|
IOleInPlaceUIWindow *ip_window;
|
||||||
|
|
||||||
|
IOleUndoManager *undomgr;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -240,11 +240,11 @@ static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFG
|
||||||
if(IsEqualGUID(&IID_IOleUndoManager, riid)) {
|
if(IsEqualGUID(&IID_IOleUndoManager, riid)) {
|
||||||
TRACE("(%p)->(IID_IOleUndoManager %p)\n", This, ppv);
|
TRACE("(%p)->(IID_IOleUndoManager %p)\n", This, ppv);
|
||||||
|
|
||||||
if(!This->undomgr)
|
if(!This->doc_obj->undomgr)
|
||||||
This->undomgr = create_undomgr();
|
This->doc_obj->undomgr = create_undomgr();
|
||||||
|
|
||||||
IOleUndoManager_AddRef(This->undomgr);
|
IOleUndoManager_AddRef(This->doc_obj->undomgr);
|
||||||
*ppv = This->undomgr;
|
*ppv = This->doc_obj->undomgr;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,6 +263,4 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
|
||||||
void HTMLDocument_Service_Init(HTMLDocument *This)
|
void HTMLDocument_Service_Init(HTMLDocument *This)
|
||||||
{
|
{
|
||||||
This->lpServiceProviderVtbl = &ServiceProviderVtbl;
|
This->lpServiceProviderVtbl = &ServiceProviderVtbl;
|
||||||
|
|
||||||
This->undomgr = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue