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);
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue