Commit aadd0774 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Moved undomgr to HTMLDocumentObj.

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