Commit 07bf1d73 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Move the Persist interfaces out of basedoc.

parent ac56d24e
...@@ -144,7 +144,7 @@ HRESULT hlink_frame_navigate(HTMLDocument*,LPCWSTR,nsChannel*,DWORD,BOOL*) DECLS ...@@ -144,7 +144,7 @@ HRESULT hlink_frame_navigate(HTMLDocument*,LPCWSTR,nsChannel*,DWORD,BOOL*) DECLS
HRESULT create_doc_uri(IUri*,nsWineURI**) DECLSPEC_HIDDEN; HRESULT create_doc_uri(IUri*,nsWineURI**) DECLSPEC_HIDDEN;
HRESULT load_nsuri(HTMLOuterWindow*,nsWineURI*,nsIInputStream*,nsChannelBSC*,DWORD) DECLSPEC_HIDDEN; HRESULT load_nsuri(HTMLOuterWindow*,nsWineURI*,nsIInputStream*,nsChannelBSC*,DWORD) DECLSPEC_HIDDEN;
HRESULT set_moniker(HTMLOuterWindow*,IMoniker*,IUri*,IBindCtx*,nsChannelBSC*,BOOL) DECLSPEC_HIDDEN; HRESULT set_moniker(HTMLOuterWindow*,IMoniker*,IUri*,IBindCtx*,nsChannelBSC*,BOOL) DECLSPEC_HIDDEN;
void prepare_for_binding(HTMLDocument*,IMoniker*,DWORD) DECLSPEC_HIDDEN; void prepare_for_binding(HTMLDocumentObj*,IMoniker*,DWORD) DECLSPEC_HIDDEN;
HRESULT super_navigate(HTMLOuterWindow*,IUri*,DWORD,const WCHAR*,BYTE*,DWORD) DECLSPEC_HIDDEN; HRESULT super_navigate(HTMLOuterWindow*,IUri*,DWORD,const WCHAR*,BYTE*,DWORD) DECLSPEC_HIDDEN;
HRESULT load_uri(HTMLOuterWindow*,IUri*,DWORD) DECLSPEC_HIDDEN; HRESULT load_uri(HTMLOuterWindow*,IUri*,DWORD) DECLSPEC_HIDDEN;
HRESULT navigate_new_window(HTMLOuterWindow*,IUri*,const WCHAR*,request_data_t*,IHTMLWindow2**) DECLSPEC_HIDDEN; HRESULT navigate_new_window(HTMLOuterWindow*,IUri*,const WCHAR*,request_data_t*,IHTMLWindow2**) DECLSPEC_HIDDEN;
......
...@@ -1249,7 +1249,7 @@ HRESULT setup_edit_mode(HTMLDocumentObj *doc) ...@@ -1249,7 +1249,7 @@ HRESULT setup_edit_mode(HTMLDocumentObj *doc)
} }
} }
hres = IPersistMoniker_Load(&doc->basedoc.IPersistMoniker_iface, TRUE, mon, NULL, 0); hres = IPersistMoniker_Load(&doc->IPersistMoniker_iface, TRUE, mon, NULL, 0);
IMoniker_Release(mon); IMoniker_Release(mon);
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
......
...@@ -5613,14 +5613,6 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) ...@@ -5613,14 +5613,6 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*ppv = &This->IDocumentSelector_iface; *ppv = &This->IDocumentSelector_iface;
else if(IsEqualGUID(&IID_IDocumentEvent, riid)) else if(IsEqualGUID(&IID_IDocumentEvent, riid))
*ppv = &This->IDocumentEvent_iface; *ppv = &This->IDocumentEvent_iface;
else if(IsEqualGUID(&IID_IPersist, riid))
*ppv = &This->IPersistFile_iface;
else if(IsEqualGUID(&IID_IPersistMoniker, riid))
*ppv = &This->IPersistMoniker_iface;
else if(IsEqualGUID(&IID_IPersistFile, riid))
*ppv = &This->IPersistFile_iface;
else if(IsEqualGUID(&IID_IMonikerProp, riid))
*ppv = &This->IMonikerProp_iface;
else if(IsEqualGUID(&IID_IOleObject, riid)) else if(IsEqualGUID(&IID_IOleObject, riid))
*ppv = &This->IOleObject_iface; *ppv = &This->IOleObject_iface;
else if(IsEqualGUID(&IID_IOleDocument, riid)) else if(IsEqualGUID(&IID_IOleDocument, riid))
...@@ -5637,16 +5629,10 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) ...@@ -5637,16 +5629,10 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*ppv = &This->IOleCommandTarget_iface; *ppv = &This->IOleCommandTarget_iface;
else if(IsEqualGUID(&IID_IOleControl, riid)) else if(IsEqualGUID(&IID_IOleControl, riid))
*ppv = &This->IOleControl_iface; *ppv = &This->IOleControl_iface;
else if(IsEqualGUID(&IID_IHlinkTarget, riid))
*ppv = &This->IHlinkTarget_iface;
else if(IsEqualGUID(&IID_IPersistStreamInit, riid))
*ppv = &This->IPersistStreamInit_iface;
else if(IsEqualGUID(&DIID_DispHTMLDocument, riid)) else if(IsEqualGUID(&DIID_DispHTMLDocument, riid))
*ppv = &This->IHTMLDocument2_iface; *ppv = &This->IHTMLDocument2_iface;
else if(IsEqualGUID(&IID_ISupportErrorInfo, riid)) else if(IsEqualGUID(&IID_ISupportErrorInfo, riid))
*ppv = &This->ISupportErrorInfo_iface; *ppv = &This->ISupportErrorInfo_iface;
else if(IsEqualGUID(&IID_IPersistHistory, riid))
*ppv = &This->IPersistHistory_iface;
else if(IsEqualGUID(&IID_IObjectWithSite, riid)) else if(IsEqualGUID(&IID_IObjectWithSite, riid))
*ppv = &This->IObjectWithSite_iface; *ppv = &This->IObjectWithSite_iface;
else if(IsEqualGUID(&IID_IOleContainer, riid)) else if(IsEqualGUID(&IID_IOleContainer, riid))
...@@ -5723,7 +5709,6 @@ static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex) ...@@ -5723,7 +5709,6 @@ static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex)
doc->outer_unk = outer; doc->outer_unk = outer;
doc->dispex = dispex; doc->dispex = dispex;
HTMLDocument_Persist_Init(doc);
HTMLDocument_OleCmd_Init(doc); HTMLDocument_OleCmd_Init(doc);
HTMLDocument_OleObj_Init(doc); HTMLDocument_OleObj_Init(doc);
} }
...@@ -5744,6 +5729,20 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) ...@@ -5744,6 +5729,20 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
if(IsEqualGUID(&IID_IInternetHostSecurityManager, riid)) if(IsEqualGUID(&IID_IInternetHostSecurityManager, riid))
*ppv = &This->IInternetHostSecurityManager_iface; *ppv = &This->IInternetHostSecurityManager_iface;
else if(IsEqualGUID(&IID_IPersist, riid))
*ppv = &This->IPersistFile_iface;
else if(IsEqualGUID(&IID_IPersistMoniker, riid))
*ppv = &This->IPersistMoniker_iface;
else if(IsEqualGUID(&IID_IPersistFile, riid))
*ppv = &This->IPersistFile_iface;
else if(IsEqualGUID(&IID_IMonikerProp, riid))
*ppv = &This->IMonikerProp_iface;
else if(IsEqualGUID(&IID_IPersistStreamInit, riid))
*ppv = &This->IPersistStreamInit_iface;
else if(IsEqualGUID(&IID_IPersistHistory, riid))
*ppv = &This->IPersistHistory_iface;
else if(IsEqualGUID(&IID_IHlinkTarget, riid))
*ppv = &This->IHlinkTarget_iface;
else if(IsEqualGUID(&IID_IServiceProvider, riid)) else if(IsEqualGUID(&IID_IServiceProvider, riid))
*ppv = &This->IServiceProvider_iface; *ppv = &This->IServiceProvider_iface;
else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) else if(IsEqualGUID(&IID_IConnectionPointContainer, riid))
...@@ -6135,6 +6134,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo ...@@ -6135,6 +6134,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo
init_doc(&doc->basedoc, (IUnknown*)&doc->node.IHTMLDOMNode_iface, init_doc(&doc->basedoc, (IUnknown*)&doc->node.IHTMLDOMNode_iface,
&doc->node.event_target.dispex.IDispatchEx_iface); &doc->node.event_target.dispex.IDispatchEx_iface);
ConnectionPointContainer_Init(&doc->cp_container, (IUnknown*)&doc->basedoc.IHTMLDocument2_iface, HTMLDocumentNode_cpc); ConnectionPointContainer_Init(&doc->cp_container, (IUnknown*)&doc->basedoc.IHTMLDocument2_iface, HTMLDocumentNode_cpc);
HTMLDocumentNode_Persist_Init(doc);
HTMLDocumentNode_Service_Init(doc); HTMLDocumentNode_Service_Init(doc);
HTMLDocumentNode_SecMgr_Init(doc); HTMLDocumentNode_SecMgr_Init(doc);
...@@ -6254,6 +6254,20 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii ...@@ -6254,6 +6254,20 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii
*ppv = &This->IViewObjectEx_iface; *ppv = &This->IViewObjectEx_iface;
}else if(IsEqualGUID(&IID_IViewObjectEx, riid)) { }else if(IsEqualGUID(&IID_IViewObjectEx, riid)) {
*ppv = &This->IViewObjectEx_iface; *ppv = &This->IViewObjectEx_iface;
}else if(IsEqualGUID(&IID_IPersist, riid)) {
*ppv = &This->IPersistFile_iface;
}else if(IsEqualGUID(&IID_IPersistMoniker, riid)) {
*ppv = &This->IPersistMoniker_iface;
}else if(IsEqualGUID(&IID_IPersistFile, riid)) {
*ppv = &This->IPersistFile_iface;
}else if(IsEqualGUID(&IID_IMonikerProp, riid)) {
*ppv = &This->IMonikerProp_iface;
}else if(IsEqualGUID(&IID_IPersistStreamInit, riid)) {
*ppv = &This->IPersistStreamInit_iface;
}else if(IsEqualGUID(&IID_IPersistHistory, riid)) {
*ppv = &This->IPersistHistory_iface;
}else if(IsEqualGUID(&IID_IHlinkTarget, riid)) {
*ppv = &This->IHlinkTarget_iface;
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) { }else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
*ppv = &This->IServiceProvider_iface; *ppv = &This->IServiceProvider_iface;
}else if(IsEqualGUID(&IID_ITargetContainer, riid)) { }else if(IsEqualGUID(&IID_ITargetContainer, riid)) {
...@@ -6482,6 +6496,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii ...@@ -6482,6 +6496,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii
init_dispatch(&doc->dispex, (IUnknown*)&doc->ICustomDoc_iface, &HTMLDocumentObj_dispex, COMPAT_MODE_QUIRKS); init_dispatch(&doc->dispex, (IUnknown*)&doc->ICustomDoc_iface, &HTMLDocumentObj_dispex, COMPAT_MODE_QUIRKS);
init_doc(&doc->basedoc, outer ? outer : &doc->IUnknown_inner, &doc->dispex.IDispatchEx_iface); init_doc(&doc->basedoc, outer ? outer : &doc->IUnknown_inner, &doc->dispex.IDispatchEx_iface);
ConnectionPointContainer_Init(&doc->cp_container, &doc->IUnknown_inner, HTMLDocumentObj_cpc); ConnectionPointContainer_Init(&doc->cp_container, &doc->IUnknown_inner, HTMLDocumentObj_cpc);
HTMLDocumentObj_Persist_Init(doc);
HTMLDocumentObj_Service_Init(doc); HTMLDocumentObj_Service_Init(doc);
TargetContainer_Init(doc); TargetContainer_Init(doc);
doc->is_mhtml = is_mhtml; doc->is_mhtml = is_mhtml;
......
...@@ -648,18 +648,12 @@ struct HTMLDocument { ...@@ -648,18 +648,12 @@ struct HTMLDocument {
IHTMLDocument7 IHTMLDocument7_iface; IHTMLDocument7 IHTMLDocument7_iface;
IDocumentSelector IDocumentSelector_iface; IDocumentSelector IDocumentSelector_iface;
IDocumentEvent IDocumentEvent_iface; IDocumentEvent IDocumentEvent_iface;
IPersistMoniker IPersistMoniker_iface;
IPersistFile IPersistFile_iface;
IPersistHistory IPersistHistory_iface;
IMonikerProp IMonikerProp_iface;
IOleObject IOleObject_iface; IOleObject IOleObject_iface;
IOleDocument IOleDocument_iface; IOleDocument IOleDocument_iface;
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface; IOleInPlaceActiveObject IOleInPlaceActiveObject_iface;
IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface; IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface;
IOleCommandTarget IOleCommandTarget_iface; IOleCommandTarget IOleCommandTarget_iface;
IOleControl IOleControl_iface; IOleControl IOleControl_iface;
IHlinkTarget IHlinkTarget_iface;
IPersistStreamInit IPersistStreamInit_iface;
IDispatchEx IDispatchEx_iface; IDispatchEx IDispatchEx_iface;
ISupportErrorInfo ISupportErrorInfo_iface; ISupportErrorInfo ISupportErrorInfo_iface;
IObjectWithSite IObjectWithSite_iface; IObjectWithSite IObjectWithSite_iface;
...@@ -702,6 +696,12 @@ struct HTMLDocumentObj { ...@@ -702,6 +696,12 @@ struct HTMLDocumentObj {
ICustomDoc ICustomDoc_iface; ICustomDoc ICustomDoc_iface;
IOleDocumentView IOleDocumentView_iface; IOleDocumentView IOleDocumentView_iface;
IViewObjectEx IViewObjectEx_iface; IViewObjectEx IViewObjectEx_iface;
IPersistMoniker IPersistMoniker_iface;
IPersistFile IPersistFile_iface;
IMonikerProp IMonikerProp_iface;
IPersistStreamInit IPersistStreamInit_iface;
IPersistHistory IPersistHistory_iface;
IHlinkTarget IHlinkTarget_iface;
IServiceProvider IServiceProvider_iface; IServiceProvider IServiceProvider_iface;
ITargetContainer ITargetContainer_iface; ITargetContainer ITargetContainer_iface;
...@@ -896,6 +896,12 @@ struct HTMLDocumentNode { ...@@ -896,6 +896,12 @@ struct HTMLDocumentNode {
HTMLDOMNode node; HTMLDOMNode node;
HTMLDocument basedoc; HTMLDocument basedoc;
IPersistMoniker IPersistMoniker_iface;
IPersistFile IPersistFile_iface;
IMonikerProp IMonikerProp_iface;
IPersistStreamInit IPersistStreamInit_iface;
IPersistHistory IPersistHistory_iface;
IHlinkTarget IHlinkTarget_iface;
IServiceProvider IServiceProvider_iface; IServiceProvider IServiceProvider_iface;
IInternetHostSecurityManager IInternetHostSecurityManager_iface; IInternetHostSecurityManager IInternetHostSecurityManager_iface;
...@@ -963,14 +969,15 @@ void detach_dom_implementation(IHTMLDOMImplementation*) DECLSPEC_HIDDEN; ...@@ -963,14 +969,15 @@ void detach_dom_implementation(IHTMLDOMImplementation*) DECLSPEC_HIDDEN;
HRESULT create_html_storage(HTMLInnerWindow*,BOOL,IHTMLStorage**) DECLSPEC_HIDDEN; HRESULT create_html_storage(HTMLInnerWindow*,BOOL,IHTMLStorage**) DECLSPEC_HIDDEN;
void detach_html_storage(IHTMLStorage*) DECLSPEC_HIDDEN; void detach_html_storage(IHTMLStorage*) DECLSPEC_HIDDEN;
void HTMLDocument_Persist_Init(HTMLDocument*) DECLSPEC_HIDDEN;
void HTMLDocument_OleCmd_Init(HTMLDocument*) DECLSPEC_HIDDEN; void HTMLDocument_OleCmd_Init(HTMLDocument*) DECLSPEC_HIDDEN;
void HTMLDocument_OleObj_Init(HTMLDocument*) DECLSPEC_HIDDEN; void HTMLDocument_OleObj_Init(HTMLDocument*) DECLSPEC_HIDDEN;
void HTMLDocument_View_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN; void HTMLDocument_View_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void HTMLDocumentObj_Persist_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void HTMLDocumentObj_Service_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN; void HTMLDocumentObj_Service_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void TargetContainer_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN; void TargetContainer_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void HTMLDocumentNode_Persist_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
void HTMLDocumentNode_Service_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN; void HTMLDocumentNode_Service_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN; void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
......
...@@ -2236,7 +2236,7 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, DWORD flags, const WC ...@@ -2236,7 +2236,7 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, DWORD flags, const WC
return hres; return hres;
} }
prepare_for_binding(&window->browser->doc->basedoc, mon, flags); prepare_for_binding(window->browser->doc, mon, flags);
hres = IUri_GetScheme(uri, &scheme); hres = IUri_GetScheme(uri, &scheme);
if(hres == S_OK && scheme == URL_SCHEME_JAVASCRIPT) { if(hres == S_OK && scheme == URL_SCHEME_JAVASCRIPT) {
......
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