From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/binding.h | 2 +- dlls/mshtml/htmlbody.c | 2 +- dlls/mshtml/htmldoc.c | 11 +++--- dlls/mshtml/htmlelem.c | 3 +- dlls/mshtml/htmlwindow.c | 6 ++-- dlls/mshtml/mshtml_private.h | 9 ++--- dlls/mshtml/mutation.c | 8 ++--- dlls/mshtml/navigate.c | 6 ++-- dlls/mshtml/nsembed.c | 2 +- dlls/mshtml/nsevents.c | 10 +++--- dlls/mshtml/nsio.c | 2 +- dlls/mshtml/olecmd.c | 14 ++++---- dlls/mshtml/oleobj.c | 69 ++++++++++++++++++------------------ dlls/mshtml/persist.c | 32 ++++++++--------- dlls/mshtml/pluginhost.c | 4 +-- dlls/mshtml/service.c | 2 +- 16 files changed, 87 insertions(+), 95 deletions(-)
diff --git a/dlls/mshtml/binding.h b/dlls/mshtml/binding.h index 2034d12d816..479cb71cf15 100644 --- a/dlls/mshtml/binding.h +++ b/dlls/mshtml/binding.h @@ -140,7 +140,7 @@ typedef struct { HRESULT set_http_header(struct list*,const WCHAR*,int,const WCHAR*,int) DECLSPEC_HIDDEN; HRESULT create_redirect_nschannel(const WCHAR*,nsChannel*,nsChannel**) DECLSPEC_HIDDEN;
-HRESULT hlink_frame_navigate(HTMLDocument*,LPCWSTR,nsChannel*,DWORD,BOOL*) DECLSPEC_HIDDEN; +HRESULT hlink_frame_navigate(HTMLDocumentObj*,LPCWSTR,nsChannel*,DWORD,BOOL*) DECLSPEC_HIDDEN; HRESULT create_doc_uri(IUri*,nsWineURI**) DECLSPEC_HIDDEN; HRESULT load_nsuri(HTMLOuterWindow*,nsWineURI*,nsIInputStream*,nsChannelBSC*,DWORD) DECLSPEC_HIDDEN; HRESULT set_moniker(HTMLOuterWindow*,IMoniker*,IUri*,IBindCtx*,nsChannelBSC*,BOOL) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c index c431551e489..163099114c5 100644 --- a/dlls/mshtml/htmlbody.c +++ b/dlls/mshtml/htmlbody.c @@ -683,7 +683,7 @@ static HRESULT WINAPI HTMLBodyElement_createTextRange(IHTMLBodyElement *iface, I ERR("CreateRange failed: %08lx\n", nsres); }
- hres = HTMLTxtRange_Create(This->element.node.doc->basedoc.doc_node, nsrange, range); + hres = HTMLTxtRange_Create(This->element.node.doc, nsrange, range);
nsIDOMRange_Release(nsrange); return hres; diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index eef6a2d91f1..e3ef57ecfee 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -846,7 +846,7 @@ static HRESULT WINAPI HTMLDocument_put_designMode(IHTMLDocument2 *iface, BSTR v) return E_NOTIMPL; }
- hres = setup_edit_mode(This->basedoc.doc_obj); + hres = setup_edit_mode(This->doc_obj); if(FAILED(hres)) return hres;
@@ -5939,8 +5939,8 @@ static EventTarget *HTMLDocumentNode_get_parent_event_target(DispatchEx *dispex) static ConnectionPointContainer *HTMLDocumentNode_get_cp_container(DispatchEx *dispex) { HTMLDocumentNode *This = impl_from_DispatchEx(dispex); - ConnectionPointContainer *container = This->basedoc.doc_obj - ? &This->basedoc.doc_obj->cp_container : &This->cp_container; + ConnectionPointContainer *container = This->doc_obj + ? &This->doc_obj->cp_container : &This->cp_container; IConnectionPointContainer_AddRef(&container->IConnectionPointContainer_iface); return container; } @@ -6063,8 +6063,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo doc->IDisplayServices_iface.lpVtbl = &DisplayServicesVtbl; doc->IDocumentRange_iface.lpVtbl = &DocumentRangeVtbl;
- doc->basedoc.doc_node = doc; - doc->basedoc.doc_obj = doc_obj; + doc->doc_obj = doc_obj; doc->outer_window = window ? window->base.outer_window : NULL; doc->window = window;
@@ -6133,7 +6132,7 @@ static HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *do { HTMLDocumentNode *doc_frag;
- doc_frag = alloc_doc_node(doc_node->basedoc.doc_obj, doc_node->window); + doc_frag = alloc_doc_node(doc_node->doc_obj, doc_node->window); if(!doc_frag) return E_OUTOFMEMORY;
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 4a8ba9cc855..8a45a354a04 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -2939,8 +2939,7 @@ static HRESULT WINAPI HTMLElement2_doScroll(IHTMLElement2 *iface, VARIANT compon
TRACE("(%p)->(%s)\n", This, debugstr_variant(&component));
- if(!This->node.doc->content_ready - || !This->node.doc->basedoc.doc_obj->in_place_active) + if(!This->node.doc->content_ready || !This->node.doc->doc_obj->in_place_active) return E_PENDING;
WARN("stub\n"); diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 1098be05b9b..14fa17ace1b 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -4186,9 +4186,9 @@ HRESULT update_window_doc(HTMLInnerWindow *window)
if(is_main_content_window(outer_window) || !outer_window->browser->content_window) { HTMLDocumentObj *doc_obj = outer_window->browser->doc; - if(doc_obj->basedoc.doc_node) - IHTMLDOMNode_Release(&doc_obj->basedoc.doc_node->node.IHTMLDOMNode_iface); - doc_obj->basedoc.doc_node = window->doc; + if(doc_obj->doc_node) + IHTMLDOMNode_Release(&doc_obj->doc_node->node.IHTMLDOMNode_iface); + doc_obj->doc_node = window->doc; IHTMLDOMNode_AddRef(&window->doc->node.IHTMLDOMNode_iface); }
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 3e53a301129..49393c977cc 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -639,13 +639,7 @@ struct ConnectionPoint { cp_static_data_t *data; };
-struct HTMLDocument { - HTMLDocumentObj *doc_obj; - HTMLDocumentNode *doc_node; -}; - struct HTMLDocumentObj { - HTMLDocument basedoc; DispatchEx dispex; IUnknown IUnknown_inner; IDispatchEx IDispatchEx_iface; @@ -691,6 +685,7 @@ struct HTMLDocumentObj { IUnknown *outer_unk; HTMLOuterWindow *window; GeckoBrowser *nscontainer; + HTMLDocumentNode *doc_node;
IOleClientSite *client; IDocHostUIHandler *hostui; @@ -875,7 +870,6 @@ typedef struct nsDocumentEventListener nsDocumentEventListener;
struct HTMLDocumentNode { HTMLDOMNode node; - HTMLDocument basedoc;
IDispatchEx IDispatchEx_iface; IHTMLDocument2 IHTMLDocument2_iface; @@ -917,6 +911,7 @@ struct HTMLDocumentNode { ConnectionPointContainer cp_container; HTMLOuterWindow *outer_window; HTMLInnerWindow *window; + HTMLDocumentObj *doc_obj;
GeckoBrowser *browser; struct list browser_entry; diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index 61ed745c588..9be1d304c14 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -275,7 +275,7 @@ static void parse_complete(HTMLDocumentObj *doc) TRACE("(%p)\n", doc);
if(doc->nscontainer->usermode == EDITMODE) - init_editor(doc->basedoc.doc_node); + init_editor(doc->doc_node);
call_explorer_69(doc); if(doc->view_sink) @@ -293,15 +293,15 @@ static nsresult run_end_load(HTMLDocumentNode *This, nsISupports *arg1, nsISuppo { TRACE("(%p)\n", This);
- if(!This->basedoc.doc_obj) + if(!This->doc_obj) return NS_OK;
- if(This == This->basedoc.doc_obj->basedoc.doc_node) { + if(This == This->doc_obj->doc_node) { /* * This should be done in the worker thread that parses HTML, * but we don't have such thread (Gecko parses HTML for us). */ - parse_complete(This->basedoc.doc_obj); + parse_complete(This->doc_obj); }
bind_event_scripts(This); diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 5d7e4d38b77..3594cfe0a6c 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -2390,7 +2390,7 @@ HRESULT navigate_new_window(HTMLOuterWindow *window, IUri *uri, const WCHAR *nam return S_OK; }
-HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url, nsChannel *nschannel, DWORD hlnf, BOOL *cancel) +HRESULT hlink_frame_navigate(HTMLDocumentObj *doc, LPCWSTR url, nsChannel *nschannel, DWORD hlnf, BOOL *cancel) { IHlinkFrame *hlink_frame; nsChannelBSC *callback; @@ -2401,7 +2401,7 @@ HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url, nsChannel *nschanne
*cancel = FALSE;
- hres = do_query_service((IUnknown*)doc->doc_obj->client, &IID_IHlinkFrame, &IID_IHlinkFrame, + hres = do_query_service((IUnknown*)doc->client, &IID_IHlinkFrame, &IID_IHlinkFrame, (void**)&hlink_frame); if(FAILED(hres)) return S_OK; @@ -2486,7 +2486,7 @@ static HRESULT navigate_uri(HTMLOuterWindow *window, IUri *uri, const WCHAR *dis if(is_main_content_window(window)) { BOOL cancel;
- hres = hlink_frame_navigate(&window->base.inner_window->doc->basedoc, display_uri, NULL, 0, &cancel); + hres = hlink_frame_navigate(window->base.inner_window->doc->doc_obj, display_uri, NULL, 0, &cancel); if(FAILED(hres)) return hres;
diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 744e567e56e..67d40ca0085 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -1681,7 +1681,7 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList case CONTEXT_TEXT: { nsISelection *selection;
- nsres = nsIDOMHTMLDocument_GetSelection(This->doc->basedoc.doc_node->nsdoc, &selection); + nsres = nsIDOMHTMLDocument_GetSelection(This->doc->doc_node->nsdoc, &selection); if(NS_SUCCEEDED(nsres) && selection) { cpp_bool is_collapsed;
diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c index 00f4ffe526b..83653b46e35 100644 --- a/dlls/mshtml/nsevents.c +++ b/dlls/mshtml/nsevents.c @@ -129,9 +129,9 @@ static nsresult NSAPI handle_blur(nsIDOMEventListener *iface, nsIDOMEvent *event
TRACE("(%p)\n", doc);
- if(!doc || !doc->basedoc.doc_obj) + if(!doc || !doc->doc_obj) return NS_ERROR_FAILURE; - doc_obj = doc->basedoc.doc_obj; + doc_obj = doc->doc_obj;
if(doc_obj->focus && !is_doc_child_focus(doc_obj->nscontainer)) { doc_obj->focus = FALSE; @@ -151,7 +151,7 @@ static nsresult NSAPI handle_focus(nsIDOMEventListener *iface, nsIDOMEvent *even
if(!doc) return NS_ERROR_FAILURE; - doc_obj = doc->basedoc.doc_obj; + doc_obj = doc->doc_obj;
if(!doc_obj->focus) { doc_obj->focus = TRUE; @@ -232,8 +232,8 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
if(!doc || !doc->outer_window) return NS_ERROR_FAILURE; - if(doc->basedoc.doc_obj && doc->basedoc.doc_obj->basedoc.doc_node == doc) - doc_obj = doc->basedoc.doc_obj; + if(doc->doc_obj && doc->doc_obj->doc_node == doc) + doc_obj = doc->doc_obj;
connect_scripts(doc->window);
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 1a48925ff77..72f40979ace 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -273,7 +273,7 @@ static nsresult before_async_open(nsChannel *channel, GeckoBrowser *container, B return NS_OK; }
- hres = hlink_frame_navigate(&doc->basedoc, display_uri, channel, 0, cancel); + hres = hlink_frame_navigate(doc, display_uri, channel, 0, cancel); SysFreeString(display_uri); if(FAILED(hres)) *cancel = TRUE; diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c index 2b12c2bf84b..68cb4491f06 100644 --- a/dlls/mshtml/olecmd.c +++ b/dlls/mshtml/olecmd.c @@ -457,7 +457,7 @@ static HRESULT exec_refresh(HTMLDocumentNode *doc, DWORD nCmdexecopt, VARIANT *p
TRACE("(%p)->(%ld %s %p)\n", doc, nCmdexecopt, debugstr_variant(pvaIn), pvaOut);
- if(doc != doc->browser->doc->basedoc.doc_node) { + if(doc != doc->browser->doc->doc_node) { FIXME("Unsupported on frame documents\n"); return E_NOTIMPL; } @@ -859,8 +859,8 @@ static HRESULT WINAPI DocNodeOleCommandTarget_QueryStatus(IOleCommandTarget *ifa OLECMD olecmd;
prgCmds[i].cmdf = OLECMDF_SUPPORTED; - if(This->basedoc.doc_obj->client) { - hres = IOleClientSite_QueryInterface(This->basedoc.doc_obj->client, &IID_IOleCommandTarget, + if(This->doc_obj->client) { + hres = IOleClientSite_QueryInterface(This->doc_obj->client, &IID_IOleCommandTarget, (void**)&cmdtrg); if(SUCCEEDED(hres)) { olecmd.cmdID = prgCmds[i].cmdID; @@ -985,9 +985,9 @@ static HRESULT WINAPI DocObjOleCommandTarget_QueryStatus(IOleCommandTarget *ifac { HTMLDocumentObj *This = HTMLDocumentObj_from_IOleCommandTarget(iface);
- if(!This->basedoc.doc_node) + if(!This->doc_node) return E_UNEXPECTED; - return IOleCommandTarget_QueryStatus(&This->basedoc.doc_node->IOleCommandTarget_iface, + return IOleCommandTarget_QueryStatus(&This->doc_node->IOleCommandTarget_iface, pguidCmdGroup, cCmds, prgCmds, pCmdText); }
@@ -996,9 +996,9 @@ static HRESULT WINAPI DocObjOleCommandTarget_Exec(IOleCommandTarget *iface, cons { HTMLDocumentObj *This = HTMLDocumentObj_from_IOleCommandTarget(iface);
- if(!This->basedoc.doc_node) + if(!This->doc_node) return E_UNEXPECTED; - return IOleCommandTarget_Exec(&This->basedoc.doc_node->IOleCommandTarget_iface, + return IOleCommandTarget_Exec(&This->doc_node->IOleCommandTarget_iface, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); }
diff --git a/dlls/mshtml/oleobj.c b/dlls/mshtml/oleobj.c index 4de2efa690f..de6fd028218 100644 --- a/dlls/mshtml/oleobj.c +++ b/dlls/mshtml/oleobj.c @@ -165,13 +165,13 @@ static ULONG WINAPI DocNodeOleObject_Release(IOleObject *iface) static HRESULT WINAPI DocNodeOleObject_SetClientSite(IOleObject *iface, IOleClientSite *pClientSite) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleObject(iface); - return IOleObject_SetClientSite(&This->basedoc.doc_obj->IOleObject_iface, pClientSite); + return IOleObject_SetClientSite(&This->doc_obj->IOleObject_iface, pClientSite); }
static HRESULT WINAPI DocNodeOleObject_GetClientSite(IOleObject *iface, IOleClientSite **ppClientSite) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleObject(iface); - return IOleObject_GetClientSite(&This->basedoc.doc_obj->IOleObject_iface, ppClientSite); + return IOleObject_GetClientSite(&This->doc_obj->IOleObject_iface, ppClientSite); }
static HRESULT WINAPI DocNodeOleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp, LPCOLESTR szContainerObj) @@ -184,7 +184,7 @@ static HRESULT WINAPI DocNodeOleObject_SetHostNames(IOleObject *iface, LPCOLESTR static HRESULT WINAPI DocNodeOleObject_Close(IOleObject *iface, DWORD dwSaveOption) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleObject(iface); - return IOleObject_Close(&This->basedoc.doc_obj->IOleObject_iface, dwSaveOption); + return IOleObject_Close(&This->doc_obj->IOleObject_iface, dwSaveOption); }
static HRESULT WINAPI DocNodeOleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker *pmk) @@ -220,7 +220,7 @@ static HRESULT WINAPI DocNodeOleObject_DoVerb(IOleObject *iface, LONG iVerb, LPM LONG lindex, HWND hwndParent, LPCRECT lprcPosRect) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleObject(iface); - return IOleObject_DoVerb(&This->basedoc.doc_obj->IOleObject_iface, iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect); + return IOleObject_DoVerb(&This->doc_obj->IOleObject_iface, iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect); }
static HRESULT WINAPI DocNodeOleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb) @@ -247,7 +247,7 @@ static HRESULT WINAPI DocNodeOleObject_IsUpToDate(IOleObject *iface) static HRESULT WINAPI DocNodeOleObject_GetUserClassID(IOleObject *iface, CLSID *pClsid) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleObject(iface); - return IOleObject_GetUserClassID(&This->basedoc.doc_obj->IOleObject_iface, pClsid); + return IOleObject_GetUserClassID(&This->doc_obj->IOleObject_iface, pClsid); }
static HRESULT WINAPI DocNodeOleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType, LPOLESTR *pszUserType) @@ -260,31 +260,31 @@ static HRESULT WINAPI DocNodeOleObject_GetUserType(IOleObject *iface, DWORD dwFo static HRESULT WINAPI DocNodeOleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleObject(iface); - return IOleObject_SetExtent(&This->basedoc.doc_obj->IOleObject_iface, dwDrawAspect, psizel); + return IOleObject_SetExtent(&This->doc_obj->IOleObject_iface, dwDrawAspect, psizel); }
static HRESULT WINAPI DocNodeOleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleObject(iface); - return IOleObject_GetExtent(&This->basedoc.doc_obj->IOleObject_iface, dwDrawAspect, psizel); + return IOleObject_GetExtent(&This->doc_obj->IOleObject_iface, dwDrawAspect, psizel); }
static HRESULT WINAPI DocNodeOleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink, DWORD *pdwConnection) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleObject(iface); - return IOleObject_Advise(&This->basedoc.doc_obj->IOleObject_iface, pAdvSink, pdwConnection); + return IOleObject_Advise(&This->doc_obj->IOleObject_iface, pAdvSink, pdwConnection); }
static HRESULT WINAPI DocNodeOleObject_Unadvise(IOleObject *iface, DWORD dwConnection) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleObject(iface); - return IOleObject_Unadvise(&This->basedoc.doc_obj->IOleObject_iface, dwConnection); + return IOleObject_Unadvise(&This->doc_obj->IOleObject_iface, dwConnection); }
static HRESULT WINAPI DocNodeOleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **ppenumAdvise) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleObject(iface); - return IOleObject_EnumAdvise(&This->basedoc.doc_obj->IOleObject_iface, ppenumAdvise); + return IOleObject_EnumAdvise(&This->doc_obj->IOleObject_iface, ppenumAdvise); }
static HRESULT WINAPI DocNodeOleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus) @@ -928,7 +928,7 @@ static HRESULT WINAPI DocNodeOleDocument_CreateView(IOleDocument *iface, IOleInP DWORD dwReserved, IOleDocumentView **ppView) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleDocument(iface); - return IOleDocument_CreateView(&This->basedoc.doc_obj->IOleDocument_iface, pIPSite, pstm, dwReserved, ppView); + return IOleDocument_CreateView(&This->doc_obj->IOleDocument_iface, pIPSite, pstm, dwReserved, ppView); }
static HRESULT WINAPI DocNodeOleDocument_GetDocMiscStatus(IOleDocument *iface, DWORD *pdwStatus) @@ -1078,7 +1078,7 @@ static HRESULT WINAPI DocNodeOleControl_OnMnemonic(IOleControl *iface, MSG *pMsg static HRESULT WINAPI DocNodeOleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleControl(iface); - return IOleControl_OnAmbientPropertyChange(&This->basedoc.doc_obj->IOleControl_iface, dispID); + return IOleControl_OnAmbientPropertyChange(&This->doc_obj->IOleControl_iface, dispID); }
static HRESULT WINAPI DocNodeOleControl_FreezeEvents(IOleControl *iface, BOOL bFreeze) @@ -1304,7 +1304,7 @@ static ULONG WINAPI DocNodeOleInPlaceActiveObject_Release(IOleInPlaceActiveObjec static HRESULT WINAPI DocNodeOleInPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface, HWND *phwnd) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleInPlaceActiveObject(iface); - return IOleInPlaceActiveObject_GetWindow(&This->basedoc.doc_obj->IOleInPlaceActiveObject_iface, phwnd); + return IOleInPlaceActiveObject_GetWindow(&This->doc_obj->IOleInPlaceActiveObject_iface, phwnd); }
static HRESULT WINAPI DocNodeOleInPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject *iface, BOOL fEnterMode) @@ -1325,7 +1325,7 @@ static HRESULT WINAPI DocNodeOleInPlaceActiveObject_OnFrameWindowActivate(IOleIn BOOL fActivate) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleInPlaceActiveObject(iface); - return IOleInPlaceActiveObject_OnFrameWindowActivate(&This->basedoc.doc_obj->IOleInPlaceActiveObject_iface, fActivate); + return IOleInPlaceActiveObject_OnFrameWindowActivate(&This->doc_obj->IOleInPlaceActiveObject_iface, fActivate); }
static HRESULT WINAPI DocNodeOleInPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject *iface, BOOL fActivate) @@ -1511,7 +1511,7 @@ static HRESULT WINAPI DocNodeOleInPlaceObjectWindowless_ContextSensitiveHelp(IOl static HRESULT WINAPI DocNodeOleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceObjectWindowless *iface) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface); - return IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->basedoc.doc_obj->IOleInPlaceObjectWindowless_iface); + return IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->doc_obj->IOleInPlaceObjectWindowless_iface); }
static HRESULT WINAPI DocNodeOleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectWindowless *iface) @@ -1525,7 +1525,7 @@ static HRESULT WINAPI DocNodeOleInPlaceObjectWindowless_SetObjectRects(IOleInPla const RECT *pos, const RECT *clip) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleInPlaceObjectWindowless(iface); - return IOleInPlaceObjectWindowless_SetObjectRects(&This->basedoc.doc_obj->IOleInPlaceObjectWindowless_iface, pos, clip); + return IOleInPlaceObjectWindowless_SetObjectRects(&This->doc_obj->IOleInPlaceObjectWindowless_iface, pos, clip); }
static HRESULT WINAPI DocNodeOleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless *iface) @@ -1837,7 +1837,7 @@ static HRESULT WINAPI DocNodeOleContainer_ParseDisplayName(IOleContainer *iface, static HRESULT WINAPI DocNodeOleContainer_EnumObjects(IOleContainer *iface, DWORD grfFlags, IEnumUnknown **ppenum) { HTMLDocumentNode *This = HTMLDocumentNode_from_IOleContainer(iface); - return IOleContainer_EnumObjects(&This->basedoc.doc_obj->IOleContainer_iface, grfFlags, ppenum); + return IOleContainer_EnumObjects(&This->doc_obj->IOleContainer_iface, grfFlags, ppenum); }
static HRESULT WINAPI DocNodeOleContainer_LockContainer(IOleContainer *iface, BOOL fLock) @@ -2015,7 +2015,7 @@ static HRESULT WINAPI DocNodeObjectSafety_SetInterfaceSafetyOptions(IObjectSafet REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions) { HTMLDocumentNode *This = HTMLDocumentNode_from_IObjectSafety(iface); - return IObjectSafety_SetInterfaceSafetyOptions(&This->basedoc.doc_obj->IObjectSafety_iface, + return IObjectSafety_SetInterfaceSafetyOptions(&This->doc_obj->IObjectSafety_iface, riid, dwOptionSetMask, dwEnabledOptions); }
@@ -2106,8 +2106,8 @@ void HTMLDocumentNode_OleObj_Init(HTMLDocumentNode *This) This->IObjectWithSite_iface.lpVtbl = &DocNodeObjectWithSiteVtbl; This->IOleContainer_iface.lpVtbl = &DocNodeOleContainerVtbl; This->IObjectSafety_iface.lpVtbl = &DocNodeObjectSafetyVtbl; - This->basedoc.doc_obj->extent.cx = 1; - This->basedoc.doc_obj->extent.cy = 1; + This->doc_obj->extent.cx = 1; + This->doc_obj->extent.cy = 1; }
static void HTMLDocumentObj_OleObj_Init(HTMLDocumentObj *This) @@ -2168,37 +2168,37 @@ static HRESULT WINAPI DocObj##iface##_Invoke(I##iface *_0, DISPID dispIdMember, #define HTMLDOCUMENTOBJ_FWD_TO_NODE_0(iface, method) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0) \ { \ HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ - return This->basedoc.doc_node ? This->basedoc.doc_node->I##iface##_iface.lpVtbl->method(&This->basedoc.doc_node->I##iface##_iface) : E_UNEXPECTED; \ + return This->doc_node ? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface) : E_UNEXPECTED; \ }
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_1(iface, method, a) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1) \ { \ HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ - return This->basedoc.doc_node ? This->basedoc.doc_node->I##iface##_iface.lpVtbl->method(&This->basedoc.doc_node->I##iface##_iface, _1) : E_UNEXPECTED; \ + return This->doc_node ? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1) : E_UNEXPECTED; \ }
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_2(iface, method, a,b) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2) \ { \ HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ - return This->basedoc.doc_node ? This->basedoc.doc_node->I##iface##_iface.lpVtbl->method(&This->basedoc.doc_node->I##iface##_iface, _1, _2) : E_UNEXPECTED; \ + return This->doc_node ? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2) : E_UNEXPECTED; \ }
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_3(iface, method, a,b,c) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2, c _3) \ { \ HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ - return This->basedoc.doc_node ? This->basedoc.doc_node->I##iface##_iface.lpVtbl->method(&This->basedoc.doc_node->I##iface##_iface, _1, _2, _3) : E_UNEXPECTED; \ + return This->doc_node ? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3) : E_UNEXPECTED; \ }
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_4(iface, method, a,b,c,d) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2, c _3, d _4) \ { \ HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ - return This->basedoc.doc_node ? This->basedoc.doc_node->I##iface##_iface.lpVtbl->method(&This->basedoc.doc_node->I##iface##_iface, _1, _2, _3, _4) : E_UNEXPECTED; \ + return This->doc_node ? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3, _4) : E_UNEXPECTED; \ }
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_5(iface, method, a,b,c,d,e) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2, c _3, d _4, e _5) \ { \ HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ - return This->basedoc.doc_node ? This->basedoc.doc_node->I##iface##_iface.lpVtbl->method(&This->basedoc.doc_node->I##iface##_iface, _1, _2, _3, _4, _5) : E_UNEXPECTED; \ + return This->doc_node ? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3, _4, _5) : E_UNEXPECTED; \ }
/********************************************************** @@ -3389,9 +3389,9 @@ static ULONG WINAPI HTMLDocumentObj_Release(IUnknown *iface) TRACE("(%p) ref = %lu\n", This, ref);
if(!ref) { - if(This->basedoc.doc_node) { - This->basedoc.doc_node->basedoc.doc_obj = NULL; - IHTMLDOMNode_Release(&This->basedoc.doc_node->node.IHTMLDOMNode_iface); + if(This->doc_node) { + This->doc_node->doc_obj = NULL; + IHTMLDOMNode_Release(&This->doc_node->node.IHTMLDOMNode_iface); } if(This->window) IHTMLWindow2_Release(&This->window->base.IHTMLWindow2_iface); @@ -3646,8 +3646,8 @@ static void HTMLDocumentObj_on_advise(IUnknown *iface, cp_static_data_t *cp) { HTMLDocumentObj *This = impl_from_IUnknown(iface);
- if(This->window && This->basedoc.doc_node) - update_doc_cp_events(This->basedoc.doc_node, cp); + if(This->window && This->doc_node) + update_doc_cp_events(This->doc_node, cp); }
static cp_static_data_t HTMLDocumentObjEvents_data = { HTMLDocumentEvents_tid, HTMLDocumentObj_on_advise }; @@ -3736,7 +3736,6 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii doc->IDocumentRange_iface.lpVtbl = &DocObjDocumentRangeVtbl;
doc->outer_unk = outer ? outer : &doc->IUnknown_inner; - doc->basedoc.doc_obj = doc;
init_dispatch(&doc->dispex, (IUnknown*)&doc->ICustomDoc_iface, &HTMLDocumentObj_dispex, COMPAT_MODE_QUIRKS); ConnectionPointContainer_Init(&doc->cp_container, &doc->IUnknown_inner, HTMLDocumentObj_cpc); @@ -3770,9 +3769,9 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii doc->window = doc->nscontainer->content_window; IHTMLWindow2_AddRef(&doc->window->base.IHTMLWindow2_iface);
- if(!doc->basedoc.doc_node && doc->window->base.inner_window->doc) { - doc->basedoc.doc_node = doc->window->base.inner_window->doc; - IHTMLDOMNode_AddRef(&doc->basedoc.doc_node->node.IHTMLDOMNode_iface); + if(!doc->doc_node && doc->window->base.inner_window->doc) { + doc->doc_node = doc->window->base.inner_window->doc; + IHTMLDOMNode_AddRef(&doc->doc_node->node.IHTMLDOMNode_iface); }
get_thread_hwnd(); diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 337271a4e3a..12a74393739 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -581,7 +581,7 @@ static HRESULT WINAPI DocNodePersistMoniker_Load(IPersistMoniker *iface, BOOL fF IMoniker *pimkName, LPBC pibc, DWORD grfMode) { HTMLDocumentNode *This = HTMLDocumentNode_from_IPersistMoniker(iface); - return IPersistMoniker_Load(&This->basedoc.doc_obj->IPersistMoniker_iface, fFullyAvailable, pimkName, pibc, grfMode); + return IPersistMoniker_Load(&This->doc_obj->IPersistMoniker_iface, fFullyAvailable, pimkName, pibc, grfMode); }
static HRESULT WINAPI DocNodePersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName, @@ -602,7 +602,7 @@ static HRESULT WINAPI DocNodePersistMoniker_SaveCompleted(IPersistMoniker *iface static HRESULT WINAPI DocNodePersistMoniker_GetCurMoniker(IPersistMoniker *iface, IMoniker **ppimkName) { HTMLDocumentNode *This = HTMLDocumentNode_from_IPersistMoniker(iface); - return IPersistMoniker_GetCurMoniker(&This->basedoc.doc_obj->IPersistMoniker_iface, ppimkName); + return IPersistMoniker_GetCurMoniker(&This->doc_obj->IPersistMoniker_iface, ppimkName); }
static const IPersistMonikerVtbl DocNodePersistMonikerVtbl = { @@ -786,7 +786,7 @@ static ULONG WINAPI DocNodeMonikerProp_Release(IMonikerProp *iface) static HRESULT WINAPI DocNodeMonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val) { HTMLDocumentNode *This = HTMLDocumentNode_from_IMonikerProp(iface); - return IMonikerProp_PutProperty(&This->basedoc.doc_obj->IMonikerProp_iface, mkp, val); + return IMonikerProp_PutProperty(&This->doc_obj->IMonikerProp_iface, mkp, val); }
static const IMonikerPropVtbl DocNodeMonikerPropVtbl = { @@ -879,7 +879,7 @@ static ULONG WINAPI DocNodePersistFile_Release(IPersistFile *iface) static HRESULT WINAPI DocNodePersistFile_GetClassID(IPersistFile *iface, CLSID *pClassID) { HTMLDocumentNode *This = HTMLDocumentNode_from_IPersistFile(iface); - return IPersistFile_GetClassID(&This->basedoc.doc_obj->IPersistFile_iface, pClassID); + return IPersistFile_GetClassID(&This->doc_obj->IPersistFile_iface, pClassID); }
static HRESULT WINAPI DocNodePersistFile_IsDirty(IPersistFile *iface) @@ -1005,11 +1005,11 @@ static HRESULT WINAPI DocObjPersistFile_Save(IPersistFile *iface, LPCOLESTR pszF { HTMLDocumentObj *This = HTMLDocumentObj_from_IPersistFile(iface);
- if(!This->basedoc.doc_node) { + if(!This->doc_node) { FIXME("No doc_node\n"); return E_UNEXPECTED; } - return IPersistFile_Save(&This->basedoc.doc_node->IPersistFile_iface, pszFileName, fRemember); + return IPersistFile_Save(&This->doc_node->IPersistFile_iface, pszFileName, fRemember); }
static HRESULT WINAPI DocObjPersistFile_SaveCompleted(IPersistFile *iface, LPCOLESTR pszFileName) @@ -1071,13 +1071,13 @@ static HRESULT WINAPI DocNodePersistStreamInit_GetClassID(IPersistStreamInit *if static HRESULT WINAPI DocNodePersistStreamInit_IsDirty(IPersistStreamInit *iface) { HTMLDocumentNode *This = HTMLDocumentNode_from_IPersistStreamInit(iface); - return IPersistStreamInit_IsDirty(&This->basedoc.doc_obj->IPersistStreamInit_iface); + return IPersistStreamInit_IsDirty(&This->doc_obj->IPersistStreamInit_iface); }
static HRESULT WINAPI DocNodePersistStreamInit_Load(IPersistStreamInit *iface, IStream *pStm) { HTMLDocumentNode *This = HTMLDocumentNode_from_IPersistStreamInit(iface); - return IPersistStreamInit_Load(&This->basedoc.doc_obj->IPersistStreamInit_iface, pStm); + return IPersistStreamInit_Load(&This->doc_obj->IPersistStreamInit_iface, pStm); }
static HRESULT WINAPI DocNodePersistStreamInit_Save(IPersistStreamInit *iface, IStream *pStm, @@ -1101,7 +1101,7 @@ static HRESULT WINAPI DocNodePersistStreamInit_Save(IPersistStreamInit *iface, I heap_free(str);
if(fClearDirty) - set_dirty(This->basedoc.doc_obj->nscontainer, VARIANT_FALSE); + set_dirty(This->doc_obj->nscontainer, VARIANT_FALSE);
return S_OK; } @@ -1117,7 +1117,7 @@ static HRESULT WINAPI DocNodePersistStreamInit_GetSizeMax(IPersistStreamInit *if static HRESULT WINAPI DocNodePersistStreamInit_InitNew(IPersistStreamInit *iface) { HTMLDocumentNode *This = HTMLDocumentNode_from_IPersistStreamInit(iface); - return IPersistStreamInit_InitNew(&This->basedoc.doc_obj->IPersistStreamInit_iface); + return IPersistStreamInit_InitNew(&This->doc_obj->IPersistStreamInit_iface); }
static const IPersistStreamInitVtbl DocNodePersistStreamInitVtbl = { @@ -1199,11 +1199,11 @@ static HRESULT WINAPI DocObjPersistStreamInit_Save(IPersistStreamInit *iface, IS { HTMLDocumentObj *This = HTMLDocumentObj_from_IPersistStreamInit(iface);
- if(!This->basedoc.doc_node) { + if(!This->doc_node) { FIXME("No doc_node\n"); return E_UNEXPECTED; } - return IPersistStreamInit_Save(&This->basedoc.doc_node->IPersistStreamInit_iface, pStm, fClearDirty); + return IPersistStreamInit_Save(&This->doc_node->IPersistStreamInit_iface, pStm, fClearDirty); }
static HRESULT WINAPI DocObjPersistStreamInit_GetSizeMax(IPersistStreamInit *iface, @@ -1285,13 +1285,13 @@ static HRESULT WINAPI DocNodePersistHistory_GetClassID(IPersistHistory *iface, C static HRESULT WINAPI DocNodePersistHistory_LoadHistory(IPersistHistory *iface, IStream *pStream, IBindCtx *pbc) { HTMLDocumentNode *This = HTMLDocumentNode_from_IPersistHistory(iface); - return IPersistHistory_LoadHistory(&This->basedoc.doc_obj->IPersistHistory_iface, pStream, pbc); + return IPersistHistory_LoadHistory(&This->doc_obj->IPersistHistory_iface, pStream, pbc); }
static HRESULT WINAPI DocNodePersistHistory_SaveHistory(IPersistHistory *iface, IStream *pStream) { HTMLDocumentNode *This = HTMLDocumentNode_from_IPersistHistory(iface); - return IPersistHistory_SaveHistory(&This->basedoc.doc_obj->IPersistHistory_iface, pStream); + return IPersistHistory_SaveHistory(&This->doc_obj->IPersistHistory_iface, pStream); }
static HRESULT WINAPI DocNodePersistHistory_SetPositionCookie(IPersistHistory *iface, DWORD dwPositioncookie) @@ -1507,10 +1507,10 @@ static HRESULT WINAPI DocNodeHlinkTarget_Navigate(IHlinkTarget *iface, DWORD grf if(pwzJumpLocation) FIXME("JumpLocation not supported\n");
- if(This->basedoc.doc_obj->client) + if(This->doc_obj->client) return IOleObject_DoVerb(&This->IOleObject_iface, OLEIVERB_SHOW, NULL, NULL, -1, NULL, NULL);
- return IHlinkTarget_Navigate(&This->basedoc.doc_obj->IHlinkTarget_iface, grfHLNF, pwzJumpLocation); + return IHlinkTarget_Navigate(&This->doc_obj->IHlinkTarget_iface, grfHLNF, pwzJumpLocation); }
static HRESULT WINAPI DocNodeHlinkTarget_GetMoniker(IHlinkTarget *iface, LPCWSTR pwzLocation, DWORD dwAssign, diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c index f5a0afc517e..4c64c394b6d 100644 --- a/dlls/mshtml/pluginhost.c +++ b/dlls/mshtml/pluginhost.c @@ -1918,12 +1918,12 @@ static HRESULT WINAPI PHInPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface,
TRACE("(%p)->(%p %p %p %p %p)\n", This, ppFrame, ppDoc, lprcPosRect, lprcClipRect, frame_info);
- if(!This->doc || !This->doc->basedoc.doc_obj || !This->doc->basedoc.doc_obj->ipsite) { + if(!This->doc || !This->doc->doc_obj || !This->doc->doc_obj->ipsite) { FIXME("No ipsite\n"); return E_UNEXPECTED; }
- hres = IOleInPlaceSite_GetWindowContext(This->doc->basedoc.doc_obj->ipsite, &ip_frame, &ip_window, &pr, &cr, frame_info); + hres = IOleInPlaceSite_GetWindowContext(This->doc->doc_obj->ipsite, &ip_frame, &ip_window, &pr, &cr, frame_info); if(FAILED(hres)) { WARN("GetWindowContext failed: %08lx\n", hres); return hres; diff --git a/dlls/mshtml/service.c b/dlls/mshtml/service.c index 865c35172e8..6b162e235ec 100644 --- a/dlls/mshtml/service.c +++ b/dlls/mshtml/service.c @@ -365,7 +365,7 @@ static HRESULT WINAPI DocNodeServiceProvider_QueryService(IServiceProvider *ifac return IHTMLDocument2_QueryInterface(&This->IHTMLDocument2_iface, riid, ppv); }
- return IServiceProvider_QueryService(&This->basedoc.doc_obj->IServiceProvider_iface, guidService, riid, ppv); + return IServiceProvider_QueryService(&This->doc_obj->IServiceProvider_iface, guidService, riid, ppv); }
static const IServiceProviderVtbl DocNodeServiceProviderVtbl = {