This should move all of the remaining interfaces out of basedoc, except for IDispatchEx (and some fields will still remain); those will be for next MR.
Because all of the remaining interfaces are in the `htmldoc.c` file, and they typically tend to just forward to the HTMLDocumentNode, I'm using some macros inspired by the HTMLWINDOW7_ONEVENT_PROPERTY_* in `htmlwindow.c` to reduce duplication. The ones that are exceptions are implemented normally without macros.
The first commit converts all of the non-IHTMLDocument* interfaces because most of the methods are FIXMEs/unimplemented, so splitting it up isn't worth it.
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmldoc.c | 1169 ++++++++++++++++++++++++---------- dlls/mshtml/mshtml_private.h | 24 +- 2 files changed, 852 insertions(+), 341 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 57e922834d6..957d98d5ed6 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -39,6 +39,59 @@
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
+#define HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(iface) \ +static HRESULT WINAPI DocObj##iface##_QueryInterface(I##iface *_0, REFIID riid, void **ppv) \ +{ \ + HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ + return htmldoc_query_interface(&This->basedoc, riid, ppv); \ +} \ +static ULONG WINAPI DocObj##iface##_AddRef(I##iface *_0) \ +{ \ + HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ + return htmldoc_addref(&This->basedoc); \ +} \ +static ULONG WINAPI DocObj##iface##_Release(I##iface *_0) \ +{ \ + HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ + return htmldoc_release(&This->basedoc); \ +} + +#define HTMLDOCUMENTOBJ_IDISPATCH_METHODS(iface) HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(iface) \ +static HRESULT WINAPI DocObj##iface##_GetTypeInfoCount(I##iface *_0, UINT *pctinfo) \ +{ \ + HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ + return IDispatchEx_GetTypeInfoCount(&This->basedoc.IDispatchEx_iface, pctinfo); \ +} \ +static HRESULT WINAPI DocObj##iface##_GetTypeInfo(I##iface *_0, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) \ +{ \ + HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ + return IDispatchEx_GetTypeInfo(&This->basedoc.IDispatchEx_iface, iTInfo, lcid, ppTInfo); \ +} \ +static HRESULT WINAPI DocObj##iface##_GetIDsOfNames(I##iface *_0, REFIID riid, LPOLESTR *rgszNames, UINT cNames, \ + LCID lcid, DISPID *rgDispId) \ +{ \ + HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ + return IDispatchEx_GetIDsOfNames(&This->basedoc.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); \ +} \ +static HRESULT WINAPI DocObj##iface##_Invoke(I##iface *_0, DISPID dispIdMember, REFIID riid, LCID lcid, \ + WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) \ +{ \ + HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \ + return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); \ +} + +#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; \ +} + +#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; \ +} + static HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *doc_node, HTMLDocumentNode **ret);
HRESULT get_doc_elem_by_id(HTMLDocumentNode *doc, const WCHAR *id, HTMLElement **ret) @@ -4579,61 +4632,61 @@ static const IHTMLDocument7Vtbl HTMLDocument7Vtbl = { HTMLDocument7_get_head };
-static inline HTMLDocument *impl_from_IDocumentSelector(IDocumentSelector *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IDocumentSelector(IDocumentSelector *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IDocumentSelector_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IDocumentSelector_iface); }
-static HRESULT WINAPI DocumentSelector_QueryInterface(IDocumentSelector *iface, REFIID riid, void **ppv) +static HRESULT WINAPI DocNodeDocumentSelector_QueryInterface(IDocumentSelector *iface, REFIID riid, void **ppv) { - HTMLDocument *This = impl_from_IDocumentSelector(iface); - return htmldoc_query_interface(This, riid, ppv); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentSelector(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static ULONG WINAPI DocumentSelector_AddRef(IDocumentSelector *iface) +static ULONG WINAPI DocNodeDocumentSelector_AddRef(IDocumentSelector *iface) { - HTMLDocument *This = impl_from_IDocumentSelector(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentSelector(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI DocumentSelector_Release(IDocumentSelector *iface) +static ULONG WINAPI DocNodeDocumentSelector_Release(IDocumentSelector *iface) { - HTMLDocument *This = impl_from_IDocumentSelector(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentSelector(iface); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI DocumentSelector_GetTypeInfoCount(IDocumentSelector *iface, UINT *pctinfo) +static HRESULT WINAPI DocNodeDocumentSelector_GetTypeInfoCount(IDocumentSelector *iface, UINT *pctinfo) { - HTMLDocument *This = impl_from_IDocumentSelector(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentSelector(iface); + return IDispatchEx_GetTypeInfoCount(&This->basedoc.IDispatchEx_iface, pctinfo); }
-static HRESULT WINAPI DocumentSelector_GetTypeInfo(IDocumentSelector *iface, UINT iTInfo, +static HRESULT WINAPI DocNodeDocumentSelector_GetTypeInfo(IDocumentSelector *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { - HTMLDocument *This = impl_from_IDocumentSelector(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentSelector(iface); + return IDispatchEx_GetTypeInfo(&This->basedoc.IDispatchEx_iface, iTInfo, lcid, ppTInfo); }
-static HRESULT WINAPI DocumentSelector_GetIDsOfNames(IDocumentSelector *iface, REFIID riid, +static HRESULT WINAPI DocNodeDocumentSelector_GetIDsOfNames(IDocumentSelector *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { - HTMLDocument *This = impl_from_IDocumentSelector(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentSelector(iface); + return IDispatchEx_GetIDsOfNames(&This->basedoc.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); }
-static HRESULT WINAPI DocumentSelector_Invoke(IDocumentSelector *iface, DISPID dispIdMember, REFIID riid, +static HRESULT WINAPI DocNodeDocumentSelector_Invoke(IDocumentSelector *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - HTMLDocument *This = impl_from_IDocumentSelector(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentSelector(iface); + return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); }
-static HRESULT WINAPI DocumentSelector_querySelector(IDocumentSelector *iface, BSTR v, IHTMLElement **pel) +static HRESULT WINAPI DocNodeDocumentSelector_querySelector(IDocumentSelector *iface, BSTR v, IHTMLElement **pel) { - HTMLDocument *This = impl_from_IDocumentSelector(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentSelector(iface); nsIDOMElement *nselem; HTMLElement *elem; nsAString nsstr; @@ -4643,7 +4696,7 @@ static HRESULT WINAPI DocumentSelector_querySelector(IDocumentSelector *iface, B TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pel);
nsAString_InitDepend(&nsstr, v); - nsres = nsIDOMHTMLDocument_QuerySelector(This->doc_node->nsdoc, &nsstr, &nselem); + nsres = nsIDOMHTMLDocument_QuerySelector(This->nsdoc, &nsstr, &nselem); nsAString_Finish(&nsstr); if(NS_FAILED(nsres)) { ERR("QuerySelector failed: %08lx\n", nsres); @@ -4664,9 +4717,9 @@ static HRESULT WINAPI DocumentSelector_querySelector(IDocumentSelector *iface, B return S_OK; }
-static HRESULT WINAPI DocumentSelector_querySelectorAll(IDocumentSelector *iface, BSTR v, IHTMLDOMChildrenCollection **pel) +static HRESULT WINAPI DocNodeDocumentSelector_querySelectorAll(IDocumentSelector *iface, BSTR v, IHTMLDOMChildrenCollection **pel) { - HTMLDocument *This = impl_from_IDocumentSelector(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentSelector(iface); nsIDOMNodeList *node_list; nsAString nsstr; HRESULT hres; @@ -4674,100 +4727,116 @@ static HRESULT WINAPI DocumentSelector_querySelectorAll(IDocumentSelector *iface TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pel);
nsAString_InitDepend(&nsstr, v); - hres = map_nsresult(nsIDOMHTMLDocument_QuerySelectorAll(This->doc_node->nsdoc, &nsstr, &node_list)); + hres = map_nsresult(nsIDOMHTMLDocument_QuerySelectorAll(This->nsdoc, &nsstr, &node_list)); nsAString_Finish(&nsstr); if(FAILED(hres)) { ERR("QuerySelectorAll failed: %08lx\n", hres); return hres; }
- hres = create_child_collection(node_list, dispex_compat_mode(&This->doc_node->node.event_target.dispex), pel); + hres = create_child_collection(node_list, dispex_compat_mode(&This->node.event_target.dispex), pel); nsIDOMNodeList_Release(node_list); return hres; }
-static const IDocumentSelectorVtbl DocumentSelectorVtbl = { - DocumentSelector_QueryInterface, - DocumentSelector_AddRef, - DocumentSelector_Release, - DocumentSelector_GetTypeInfoCount, - DocumentSelector_GetTypeInfo, - DocumentSelector_GetIDsOfNames, - DocumentSelector_Invoke, - DocumentSelector_querySelector, - DocumentSelector_querySelectorAll +static const IDocumentSelectorVtbl DocNodeDocumentSelectorVtbl = { + DocNodeDocumentSelector_QueryInterface, + DocNodeDocumentSelector_AddRef, + DocNodeDocumentSelector_Release, + DocNodeDocumentSelector_GetTypeInfoCount, + DocNodeDocumentSelector_GetTypeInfo, + DocNodeDocumentSelector_GetIDsOfNames, + DocNodeDocumentSelector_Invoke, + DocNodeDocumentSelector_querySelector, + DocNodeDocumentSelector_querySelectorAll };
-static inline HTMLDocument *impl_from_IDocumentEvent(IDocumentEvent *iface) +HTMLDOCUMENTOBJ_IDISPATCH_METHODS(DocumentSelector) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(DocumentSelector, querySelector, BSTR,IHTMLElement**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(DocumentSelector, querySelectorAll, BSTR,IHTMLDOMChildrenCollection**) + +static const IDocumentSelectorVtbl DocObjDocumentSelectorVtbl = { + DocObjDocumentSelector_QueryInterface, + DocObjDocumentSelector_AddRef, + DocObjDocumentSelector_Release, + DocObjDocumentSelector_GetTypeInfoCount, + DocObjDocumentSelector_GetTypeInfo, + DocObjDocumentSelector_GetIDsOfNames, + DocObjDocumentSelector_Invoke, + DocObjDocumentSelector_querySelector, + DocObjDocumentSelector_querySelectorAll +}; + +static inline HTMLDocumentNode *HTMLDocumentNode_from_IDocumentEvent(IDocumentEvent *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IDocumentEvent_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IDocumentEvent_iface); }
-static HRESULT WINAPI DocumentEvent_QueryInterface(IDocumentEvent *iface, REFIID riid, void **ppv) +static HRESULT WINAPI DocNodeDocumentEvent_QueryInterface(IDocumentEvent *iface, REFIID riid, void **ppv) { - HTMLDocument *This = impl_from_IDocumentEvent(iface); - return htmldoc_query_interface(This, riid, ppv); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentEvent(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static ULONG WINAPI DocumentEvent_AddRef(IDocumentEvent *iface) +static ULONG WINAPI DocNodeDocumentEvent_AddRef(IDocumentEvent *iface) { - HTMLDocument *This = impl_from_IDocumentEvent(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentEvent(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI DocumentEvent_Release(IDocumentEvent *iface) +static ULONG WINAPI DocNodeDocumentEvent_Release(IDocumentEvent *iface) { - HTMLDocument *This = impl_from_IDocumentEvent(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentEvent(iface); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI DocumentEvent_GetTypeInfoCount(IDocumentEvent *iface, UINT *pctinfo) +static HRESULT WINAPI DocNodeDocumentEvent_GetTypeInfoCount(IDocumentEvent *iface, UINT *pctinfo) { - HTMLDocument *This = impl_from_IDocumentEvent(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentEvent(iface); + return IDispatchEx_GetTypeInfoCount(&This->basedoc.IDispatchEx_iface, pctinfo); }
-static HRESULT WINAPI DocumentEvent_GetTypeInfo(IDocumentEvent *iface, UINT iTInfo, +static HRESULT WINAPI DocNodeDocumentEvent_GetTypeInfo(IDocumentEvent *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { - HTMLDocument *This = impl_from_IDocumentEvent(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentEvent(iface); + return IDispatchEx_GetTypeInfo(&This->basedoc.IDispatchEx_iface, iTInfo, lcid, ppTInfo); }
-static HRESULT WINAPI DocumentEvent_GetIDsOfNames(IDocumentEvent *iface, REFIID riid, +static HRESULT WINAPI DocNodeDocumentEvent_GetIDsOfNames(IDocumentEvent *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { - HTMLDocument *This = impl_from_IDocumentEvent(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentEvent(iface); + return IDispatchEx_GetIDsOfNames(&This->basedoc.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); }
-static HRESULT WINAPI DocumentEvent_Invoke(IDocumentEvent *iface, DISPID dispIdMember, REFIID riid, +static HRESULT WINAPI DocNodeDocumentEvent_Invoke(IDocumentEvent *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - HTMLDocument *This = impl_from_IDocumentEvent(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentEvent(iface); + return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); }
-static HRESULT WINAPI DocumentEvent_createEvent(IDocumentEvent *iface, BSTR eventType, IDOMEvent **p) +static HRESULT WINAPI DocNodeDocumentEvent_createEvent(IDocumentEvent *iface, BSTR eventType, IDOMEvent **p) { - HTMLDocument *This = impl_from_IDocumentEvent(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentEvent(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_w(eventType), p);
- return create_document_event_str(This->doc_node, eventType, p); + return create_document_event_str(This, eventType, p); }
-static const IDocumentEventVtbl DocumentEventVtbl = { - DocumentEvent_QueryInterface, - DocumentEvent_AddRef, - DocumentEvent_Release, - DocumentEvent_GetTypeInfoCount, - DocumentEvent_GetTypeInfo, - DocumentEvent_GetIDsOfNames, - DocumentEvent_Invoke, - DocumentEvent_createEvent +static const IDocumentEventVtbl DocNodeDocumentEventVtbl = { + DocNodeDocumentEvent_QueryInterface, + DocNodeDocumentEvent_AddRef, + DocNodeDocumentEvent_Release, + DocNodeDocumentEvent_GetTypeInfoCount, + DocNodeDocumentEvent_GetTypeInfo, + DocNodeDocumentEvent_GetIDsOfNames, + DocNodeDocumentEvent_Invoke, + DocNodeDocumentEvent_createEvent };
static void HTMLDocumentNode_on_advise(IUnknown *iface, cp_static_data_t *cp) @@ -4778,40 +4847,69 @@ static void HTMLDocumentNode_on_advise(IUnknown *iface, cp_static_data_t *cp) update_doc_cp_events(This, cp); }
-static inline HTMLDocument *impl_from_ISupportErrorInfo(ISupportErrorInfo *iface) +HTMLDOCUMENTOBJ_IDISPATCH_METHODS(DocumentEvent) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(DocumentEvent, createEvent, BSTR,IDOMEvent**) + +static const IDocumentEventVtbl DocObjDocumentEventVtbl = { + DocObjDocumentEvent_QueryInterface, + DocObjDocumentEvent_AddRef, + DocObjDocumentEvent_Release, + DocObjDocumentEvent_GetTypeInfoCount, + DocObjDocumentEvent_GetTypeInfo, + DocObjDocumentEvent_GetIDsOfNames, + DocObjDocumentEvent_Invoke, + DocObjDocumentEvent_createEvent +}; + +static inline HTMLDocumentNode *HTMLDocumentNode_from_ISupportErrorInfo(ISupportErrorInfo *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocumentNode, ISupportErrorInfo_iface); +} + +static HRESULT WINAPI DocNodeSupportErrorInfo_QueryInterface(ISupportErrorInfo *iface, REFIID riid, void **ppv) { - return CONTAINING_RECORD(iface, HTMLDocument, ISupportErrorInfo_iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_ISupportErrorInfo(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static HRESULT WINAPI SupportErrorInfo_QueryInterface(ISupportErrorInfo *iface, REFIID riid, void **ppv) +static ULONG WINAPI DocNodeSupportErrorInfo_AddRef(ISupportErrorInfo *iface) { - HTMLDocument *This = impl_from_ISupportErrorInfo(iface); - return htmldoc_query_interface(This, riid, ppv); + HTMLDocumentNode *This = HTMLDocumentNode_from_ISupportErrorInfo(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI SupportErrorInfo_AddRef(ISupportErrorInfo *iface) +static ULONG WINAPI DocNodeSupportErrorInfo_Release(ISupportErrorInfo *iface) { - HTMLDocument *This = impl_from_ISupportErrorInfo(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_ISupportErrorInfo(iface); + return htmldoc_release(&This->basedoc); }
-static ULONG WINAPI SupportErrorInfo_Release(ISupportErrorInfo *iface) +static HRESULT WINAPI DocNodeSupportErrorInfo_InterfaceSupportsErrorInfo(ISupportErrorInfo *iface, REFIID riid) { - HTMLDocument *This = impl_from_ISupportErrorInfo(iface); - return htmldoc_release(This); + FIXME("(%p)->(%s)\n", iface, debugstr_mshtml_guid(riid)); + return S_FALSE; }
-static HRESULT WINAPI SupportErrorInfo_InterfaceSupportsErrorInfo(ISupportErrorInfo *iface, REFIID riid) +static const ISupportErrorInfoVtbl DocNodeSupportErrorInfoVtbl = { + DocNodeSupportErrorInfo_QueryInterface, + DocNodeSupportErrorInfo_AddRef, + DocNodeSupportErrorInfo_Release, + DocNodeSupportErrorInfo_InterfaceSupportsErrorInfo +}; + +HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(SupportErrorInfo) + +static HRESULT WINAPI DocObjSupportErrorInfo_InterfaceSupportsErrorInfo(ISupportErrorInfo *iface, REFIID riid) { FIXME("(%p)->(%s)\n", iface, debugstr_mshtml_guid(riid)); return S_FALSE; }
-static const ISupportErrorInfoVtbl SupportErrorInfoVtbl = { - SupportErrorInfo_QueryInterface, - SupportErrorInfo_AddRef, - SupportErrorInfo_Release, - SupportErrorInfo_InterfaceSupportsErrorInfo +static const ISupportErrorInfoVtbl DocObjSupportErrorInfoVtbl = { + DocObjSupportErrorInfo_QueryInterface, + DocObjSupportErrorInfo_AddRef, + DocObjSupportErrorInfo_Release, + DocObjSupportErrorInfo_InterfaceSupportsErrorInfo };
static inline HTMLDocument *impl_from_IDispatchEx(IDispatchEx *iface) @@ -5081,508 +5179,859 @@ static const IDispatchExVtbl DocDispatchExVtbl = { DocDispatchEx_GetNameSpaceParent };
-static inline HTMLDocument *impl_from_IProvideMultipleClassInfo(IProvideMultipleClassInfo *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IProvideMultipleClassInfo(IProvideMultipleClassInfo *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IProvideMultipleClassInfo_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IProvideMultipleClassInfo_iface); }
-static HRESULT WINAPI ProvideClassInfo_QueryInterface(IProvideMultipleClassInfo *iface, +static HRESULT WINAPI DocNodeProvideClassInfo_QueryInterface(IProvideMultipleClassInfo *iface, REFIID riid, void **ppv) { - HTMLDocument *This = impl_from_IProvideMultipleClassInfo(iface); - return htmldoc_query_interface(This, riid, ppv); + HTMLDocumentNode *This = HTMLDocumentNode_from_IProvideMultipleClassInfo(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static ULONG WINAPI ProvideClassInfo_AddRef(IProvideMultipleClassInfo *iface) +static ULONG WINAPI DocNodeProvideClassInfo_AddRef(IProvideMultipleClassInfo *iface) { - HTMLDocument *This = impl_from_IProvideMultipleClassInfo(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IProvideMultipleClassInfo(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI ProvideClassInfo_Release(IProvideMultipleClassInfo *iface) +static ULONG WINAPI DocNodeProvideClassInfo_Release(IProvideMultipleClassInfo *iface) { - HTMLDocument *This = impl_from_IProvideMultipleClassInfo(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IProvideMultipleClassInfo(iface); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI ProvideClassInfo_GetClassInfo(IProvideMultipleClassInfo *iface, ITypeInfo **ppTI) +static HRESULT WINAPI DocNodeProvideClassInfo_GetClassInfo(IProvideMultipleClassInfo *iface, ITypeInfo **ppTI) { - HTMLDocument *This = impl_from_IProvideMultipleClassInfo(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IProvideMultipleClassInfo(iface); TRACE("(%p)->(%p)\n", This, ppTI); return get_class_typeinfo(&CLSID_HTMLDocument, ppTI); }
-static HRESULT WINAPI ProvideClassInfo2_GetGUID(IProvideMultipleClassInfo *iface, DWORD dwGuidKind, GUID *pGUID) +static HRESULT WINAPI DocNodeProvideClassInfo2_GetGUID(IProvideMultipleClassInfo *iface, DWORD dwGuidKind, GUID *pGUID) { - HTMLDocument *This = impl_from_IProvideMultipleClassInfo(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IProvideMultipleClassInfo(iface); FIXME("(%p)->(%lu %p)\n", This, dwGuidKind, pGUID); return E_NOTIMPL; }
-static HRESULT WINAPI ProvideMultipleClassInfo_GetMultiTypeInfoCount(IProvideMultipleClassInfo *iface, ULONG *pcti) +static HRESULT WINAPI DocNodeProvideMultipleClassInfo_GetMultiTypeInfoCount(IProvideMultipleClassInfo *iface, ULONG *pcti) { - HTMLDocument *This = impl_from_IProvideMultipleClassInfo(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IProvideMultipleClassInfo(iface); FIXME("(%p)->(%p)\n", This, pcti); *pcti = 1; return S_OK; }
-static HRESULT WINAPI ProvideMultipleClassInfo_GetInfoOfIndex(IProvideMultipleClassInfo *iface, ULONG iti, +static HRESULT WINAPI DocNodeProvideMultipleClassInfo_GetInfoOfIndex(IProvideMultipleClassInfo *iface, ULONG iti, DWORD dwFlags, ITypeInfo **pptiCoClass, DWORD *pdwTIFlags, ULONG *pcdispidReserved, IID *piidPrimary, IID *piidSource) { - HTMLDocument *This = impl_from_IProvideMultipleClassInfo(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IProvideMultipleClassInfo(iface); FIXME("(%p)->(%lu %lx %p %p %p %p %p)\n", This, iti, dwFlags, pptiCoClass, pdwTIFlags, pcdispidReserved, piidPrimary, piidSource); return E_NOTIMPL; }
-static const IProvideMultipleClassInfoVtbl ProvideMultipleClassInfoVtbl = { - ProvideClassInfo_QueryInterface, - ProvideClassInfo_AddRef, - ProvideClassInfo_Release, - ProvideClassInfo_GetClassInfo, - ProvideClassInfo2_GetGUID, - ProvideMultipleClassInfo_GetMultiTypeInfoCount, - ProvideMultipleClassInfo_GetInfoOfIndex +static const IProvideMultipleClassInfoVtbl DocNodeProvideMultipleClassInfoVtbl = { + DocNodeProvideClassInfo_QueryInterface, + DocNodeProvideClassInfo_AddRef, + DocNodeProvideClassInfo_Release, + DocNodeProvideClassInfo_GetClassInfo, + DocNodeProvideClassInfo2_GetGUID, + DocNodeProvideMultipleClassInfo_GetMultiTypeInfoCount, + DocNodeProvideMultipleClassInfo_GetInfoOfIndex +}; + +static inline HTMLDocumentObj *HTMLDocumentObj_from_IProvideMultipleClassInfo(IProvideMultipleClassInfo *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocumentObj, IProvideMultipleClassInfo_iface); +} + +HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(ProvideMultipleClassInfo) + +static HRESULT WINAPI DocObjProvideMultipleClassInfo_GetClassInfo(IProvideMultipleClassInfo *iface, ITypeInfo **ppTI) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IProvideMultipleClassInfo(iface); + TRACE("(%p)->(%p)\n", This, ppTI); + return get_class_typeinfo(&CLSID_HTMLDocument, ppTI); +} + +static HRESULT WINAPI DocObjProvideMultipleClassInfo_GetGUID(IProvideMultipleClassInfo *iface, DWORD dwGuidKind, GUID *pGUID) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IProvideMultipleClassInfo(iface); + FIXME("(%p)->(%lu %p)\n", This, dwGuidKind, pGUID); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjProvideMultipleClassInfo_GetMultiTypeInfoCount(IProvideMultipleClassInfo *iface, ULONG *pcti) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IProvideMultipleClassInfo(iface); + FIXME("(%p)->(%p)\n", This, pcti); + *pcti = 1; + return S_OK; +} + +static HRESULT WINAPI DocObjProvideMultipleClassInfo_GetInfoOfIndex(IProvideMultipleClassInfo *iface, ULONG iti, + DWORD dwFlags, ITypeInfo **pptiCoClass, DWORD *pdwTIFlags, ULONG *pcdispidReserved, IID *piidPrimary, IID *piidSource) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IProvideMultipleClassInfo(iface); + FIXME("(%p)->(%lu %lx %p %p %p %p %p)\n", This, iti, dwFlags, pptiCoClass, pdwTIFlags, pcdispidReserved, piidPrimary, piidSource); + return E_NOTIMPL; +} + +static const IProvideMultipleClassInfoVtbl DocObjProvideMultipleClassInfoVtbl = { + DocObjProvideMultipleClassInfo_QueryInterface, + DocObjProvideMultipleClassInfo_AddRef, + DocObjProvideMultipleClassInfo_Release, + DocObjProvideMultipleClassInfo_GetClassInfo, + DocObjProvideMultipleClassInfo_GetGUID, + DocObjProvideMultipleClassInfo_GetMultiTypeInfoCount, + DocObjProvideMultipleClassInfo_GetInfoOfIndex };
/********************************************************** * IMarkupServices implementation */ -static inline HTMLDocument *impl_from_IMarkupServices(IMarkupServices *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IMarkupServices(IMarkupServices *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IMarkupServices_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IMarkupServices_iface); }
-static HRESULT WINAPI MarkupServices_QueryInterface(IMarkupServices *iface, REFIID riid, void **ppvObject) +static HRESULT WINAPI DocNodeMarkupServices_QueryInterface(IMarkupServices *iface, REFIID riid, void **ppvObject) { - HTMLDocument *This = impl_from_IMarkupServices(iface); - return htmldoc_query_interface(This, riid, ppvObject); + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppvObject); }
-static ULONG WINAPI MarkupServices_AddRef(IMarkupServices *iface) +static ULONG WINAPI DocNodeMarkupServices_AddRef(IMarkupServices *iface) { - HTMLDocument *This = impl_from_IMarkupServices(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI MarkupServices_Release(IMarkupServices *iface) +static ULONG WINAPI DocNodeMarkupServices_Release(IMarkupServices *iface) { - HTMLDocument *This = impl_from_IMarkupServices(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + return htmldoc_release(&This->basedoc); +} + +static HRESULT WINAPI DocNodeMarkupServices_CreateMarkupPointer(IMarkupServices *iface, IMarkupPointer **ppPointer) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + + TRACE("(%p)->(%p)\n", This, ppPointer); + + return create_markup_pointer(ppPointer); +} + +static HRESULT WINAPI DocNodeMarkupServices_CreateMarkupContainer(IMarkupServices *iface, IMarkupContainer **ppMarkupContainer) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p)\n", This, ppMarkupContainer); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_CreateElement(IMarkupServices *iface, + ELEMENT_TAG_ID tagID, OLECHAR *pchAttributes, IHTMLElement **ppElement) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%d,%s,%p)\n", This, tagID, debugstr_w(pchAttributes), ppElement); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_CloneElement(IMarkupServices *iface, + IHTMLElement *pElemCloneThis, IHTMLElement **ppElementTheClone) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p,%p)\n", This, pElemCloneThis, ppElementTheClone); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_InsertElement(IMarkupServices *iface, + IHTMLElement *pElementInsert, IMarkupPointer *pPointerStart, + IMarkupPointer *pPointerFinish) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p,%p,%p)\n", This, pElementInsert, pPointerStart, pPointerFinish); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_RemoveElement(IMarkupServices *iface, IHTMLElement *pElementRemove) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p)\n", This, pElementRemove); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_Remove(IMarkupServices *iface, + IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p,%p)\n", This, pPointerStart, pPointerFinish); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_Copy(IMarkupServices *iface, + IMarkupPointer *pPointerSourceStart, IMarkupPointer *pPointerSourceFinish, + IMarkupPointer *pPointerTarget) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p,%p,%p)\n", This, pPointerSourceStart, pPointerSourceFinish, pPointerTarget); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_Move(IMarkupServices *iface, + IMarkupPointer *pPointerSourceStart, IMarkupPointer *pPointerSourceFinish, + IMarkupPointer *pPointerTarget) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p,%p,%p)\n", This, pPointerSourceStart, pPointerSourceFinish, pPointerTarget); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_InsertText(IMarkupServices *iface, + OLECHAR *pchText, LONG cch, IMarkupPointer *pPointerTarget) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%s,%lx,%p)\n", This, debugstr_w(pchText), cch, pPointerTarget); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_ParseString(IMarkupServices *iface, + OLECHAR *pchHTML, DWORD dwFlags, IMarkupContainer **ppContainerResult, + IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%s,%lx,%p,%p,%p)\n", This, debugstr_w(pchHTML), dwFlags, ppContainerResult, pPointerStart, pPointerFinish); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_ParseGlobal(IMarkupServices *iface, + HGLOBAL hglobalHTML, DWORD dwFlags, IMarkupContainer **ppContainerResult, + IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%s,%lx,%p,%p,%p)\n", This, debugstr_w(hglobalHTML), dwFlags, ppContainerResult, pPointerStart, pPointerFinish); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_IsScopedElement(IMarkupServices *iface, + IHTMLElement *pElement, BOOL *pfScoped) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p,%p)\n", This, pElement, pfScoped); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_GetElementTagId(IMarkupServices *iface, + IHTMLElement *pElement, ELEMENT_TAG_ID *ptagId) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p,%p)\n", This, pElement, ptagId); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_GetTagIDForName(IMarkupServices *iface, + BSTR bstrName, ELEMENT_TAG_ID *ptagId) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%s,%p)\n", This, debugstr_w(bstrName), ptagId); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_GetNameForTagID(IMarkupServices *iface, + ELEMENT_TAG_ID tagId, BSTR *pbstrName) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%d,%p)\n", This, tagId, pbstrName); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_MovePointersToRange(IMarkupServices *iface, + IHTMLTxtRange *pIRange, IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p,%p,%p)\n", This, pIRange, pPointerStart, pPointerFinish); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_MoveRangeToPointers(IMarkupServices *iface, + IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish, IHTMLTxtRange *pIRange) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%p,%p,%p)\n", This, pPointerStart, pPointerFinish, pIRange); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_BeginUndoUnit(IMarkupServices *iface, OLECHAR *pchTitle) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(pchTitle)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocNodeMarkupServices_EndUndoUnit(IMarkupServices *iface) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupServices(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_CreateMarkupPointer(IMarkupServices *iface, IMarkupPointer **ppPointer) +static const IMarkupServicesVtbl DocNodeMarkupServicesVtbl = { + DocNodeMarkupServices_QueryInterface, + DocNodeMarkupServices_AddRef, + DocNodeMarkupServices_Release, + DocNodeMarkupServices_CreateMarkupPointer, + DocNodeMarkupServices_CreateMarkupContainer, + DocNodeMarkupServices_CreateElement, + DocNodeMarkupServices_CloneElement, + DocNodeMarkupServices_InsertElement, + DocNodeMarkupServices_RemoveElement, + DocNodeMarkupServices_Remove, + DocNodeMarkupServices_Copy, + DocNodeMarkupServices_Move, + DocNodeMarkupServices_InsertText, + DocNodeMarkupServices_ParseString, + DocNodeMarkupServices_ParseGlobal, + DocNodeMarkupServices_IsScopedElement, + DocNodeMarkupServices_GetElementTagId, + DocNodeMarkupServices_GetTagIDForName, + DocNodeMarkupServices_GetNameForTagID, + DocNodeMarkupServices_MovePointersToRange, + DocNodeMarkupServices_MoveRangeToPointers, + DocNodeMarkupServices_BeginUndoUnit, + DocNodeMarkupServices_EndUndoUnit +}; + +static inline HTMLDocumentObj *HTMLDocumentObj_from_IMarkupServices(IMarkupServices *iface) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + return CONTAINING_RECORD(iface, HTMLDocumentObj, IMarkupServices_iface); +} + +HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(MarkupServices) + +static HRESULT WINAPI DocObjMarkupServices_CreateMarkupPointer(IMarkupServices *iface, IMarkupPointer **ppPointer) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface);
TRACE("(%p)->(%p)\n", This, ppPointer);
return create_markup_pointer(ppPointer); }
-static HRESULT WINAPI MarkupServices_CreateMarkupContainer(IMarkupServices *iface, IMarkupContainer **ppMarkupContainer) +static HRESULT WINAPI DocObjMarkupServices_CreateMarkupContainer(IMarkupServices *iface, IMarkupContainer **ppMarkupContainer) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p)\n", This, ppMarkupContainer); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_CreateElement(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_CreateElement(IMarkupServices *iface, ELEMENT_TAG_ID tagID, OLECHAR *pchAttributes, IHTMLElement **ppElement) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%d,%s,%p)\n", This, tagID, debugstr_w(pchAttributes), ppElement); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_CloneElement(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_CloneElement(IMarkupServices *iface, IHTMLElement *pElemCloneThis, IHTMLElement **ppElementTheClone) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p,%p)\n", This, pElemCloneThis, ppElementTheClone); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_InsertElement(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_InsertElement(IMarkupServices *iface, IHTMLElement *pElementInsert, IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p,%p,%p)\n", This, pElementInsert, pPointerStart, pPointerFinish); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_RemoveElement(IMarkupServices *iface, IHTMLElement *pElementRemove) +static HRESULT WINAPI DocObjMarkupServices_RemoveElement(IMarkupServices *iface, IHTMLElement *pElementRemove) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p)\n", This, pElementRemove); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_Remove(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_Remove(IMarkupServices *iface, IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p,%p)\n", This, pPointerStart, pPointerFinish); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_Copy(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_Copy(IMarkupServices *iface, IMarkupPointer *pPointerSourceStart, IMarkupPointer *pPointerSourceFinish, IMarkupPointer *pPointerTarget) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p,%p,%p)\n", This, pPointerSourceStart, pPointerSourceFinish, pPointerTarget); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_Move(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_Move(IMarkupServices *iface, IMarkupPointer *pPointerSourceStart, IMarkupPointer *pPointerSourceFinish, IMarkupPointer *pPointerTarget) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p,%p,%p)\n", This, pPointerSourceStart, pPointerSourceFinish, pPointerTarget); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_InsertText(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_InsertText(IMarkupServices *iface, OLECHAR *pchText, LONG cch, IMarkupPointer *pPointerTarget) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%s,%lx,%p)\n", This, debugstr_w(pchText), cch, pPointerTarget); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_ParseString(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_ParseString(IMarkupServices *iface, OLECHAR *pchHTML, DWORD dwFlags, IMarkupContainer **ppContainerResult, IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%s,%lx,%p,%p,%p)\n", This, debugstr_w(pchHTML), dwFlags, ppContainerResult, pPointerStart, pPointerFinish); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_ParseGlobal(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_ParseGlobal(IMarkupServices *iface, HGLOBAL hglobalHTML, DWORD dwFlags, IMarkupContainer **ppContainerResult, IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%s,%lx,%p,%p,%p)\n", This, debugstr_w(hglobalHTML), dwFlags, ppContainerResult, pPointerStart, pPointerFinish); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_IsScopedElement(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_IsScopedElement(IMarkupServices *iface, IHTMLElement *pElement, BOOL *pfScoped) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p,%p)\n", This, pElement, pfScoped); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_GetElementTagId(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_GetElementTagId(IMarkupServices *iface, IHTMLElement *pElement, ELEMENT_TAG_ID *ptagId) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p,%p)\n", This, pElement, ptagId); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_GetTagIDForName(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_GetTagIDForName(IMarkupServices *iface, BSTR bstrName, ELEMENT_TAG_ID *ptagId) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%s,%p)\n", This, debugstr_w(bstrName), ptagId); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_GetNameForTagID(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_GetNameForTagID(IMarkupServices *iface, ELEMENT_TAG_ID tagId, BSTR *pbstrName) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%d,%p)\n", This, tagId, pbstrName); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_MovePointersToRange(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_MovePointersToRange(IMarkupServices *iface, IHTMLTxtRange *pIRange, IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p,%p,%p)\n", This, pIRange, pPointerStart, pPointerFinish); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_MoveRangeToPointers(IMarkupServices *iface, +static HRESULT WINAPI DocObjMarkupServices_MoveRangeToPointers(IMarkupServices *iface, IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish, IHTMLTxtRange *pIRange) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%p,%p,%p)\n", This, pPointerStart, pPointerFinish, pIRange); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_BeginUndoUnit(IMarkupServices *iface, OLECHAR *pchTitle) +static HRESULT WINAPI DocObjMarkupServices_BeginUndoUnit(IMarkupServices *iface, OLECHAR *pchTitle) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)->(%s)\n", This, debugstr_w(pchTitle)); return E_NOTIMPL; }
-static HRESULT WINAPI MarkupServices_EndUndoUnit(IMarkupServices *iface) +static HRESULT WINAPI DocObjMarkupServices_EndUndoUnit(IMarkupServices *iface) { - HTMLDocument *This = impl_from_IMarkupServices(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupServices(iface); FIXME("(%p)\n", This); return E_NOTIMPL; }
-static const IMarkupServicesVtbl MarkupServicesVtbl = { - MarkupServices_QueryInterface, - MarkupServices_AddRef, - MarkupServices_Release, - MarkupServices_CreateMarkupPointer, - MarkupServices_CreateMarkupContainer, - MarkupServices_CreateElement, - MarkupServices_CloneElement, - MarkupServices_InsertElement, - MarkupServices_RemoveElement, - MarkupServices_Remove, - MarkupServices_Copy, - MarkupServices_Move, - MarkupServices_InsertText, - MarkupServices_ParseString, - MarkupServices_ParseGlobal, - MarkupServices_IsScopedElement, - MarkupServices_GetElementTagId, - MarkupServices_GetTagIDForName, - MarkupServices_GetNameForTagID, - MarkupServices_MovePointersToRange, - MarkupServices_MoveRangeToPointers, - MarkupServices_BeginUndoUnit, - MarkupServices_EndUndoUnit +static const IMarkupServicesVtbl DocObjMarkupServicesVtbl = { + DocObjMarkupServices_QueryInterface, + DocObjMarkupServices_AddRef, + DocObjMarkupServices_Release, + DocObjMarkupServices_CreateMarkupPointer, + DocObjMarkupServices_CreateMarkupContainer, + DocObjMarkupServices_CreateElement, + DocObjMarkupServices_CloneElement, + DocObjMarkupServices_InsertElement, + DocObjMarkupServices_RemoveElement, + DocObjMarkupServices_Remove, + DocObjMarkupServices_Copy, + DocObjMarkupServices_Move, + DocObjMarkupServices_InsertText, + DocObjMarkupServices_ParseString, + DocObjMarkupServices_ParseGlobal, + DocObjMarkupServices_IsScopedElement, + DocObjMarkupServices_GetElementTagId, + DocObjMarkupServices_GetTagIDForName, + DocObjMarkupServices_GetNameForTagID, + DocObjMarkupServices_MovePointersToRange, + DocObjMarkupServices_MoveRangeToPointers, + DocObjMarkupServices_BeginUndoUnit, + DocObjMarkupServices_EndUndoUnit };
/********************************************************** * IMarkupContainer implementation */ -static inline HTMLDocument *impl_from_IMarkupContainer(IMarkupContainer *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IMarkupContainer(IMarkupContainer *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IMarkupContainer_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IMarkupContainer_iface); }
-static HRESULT WINAPI MarkupContainer_QueryInterface(IMarkupContainer *iface, REFIID riid, void **ppvObject) +static HRESULT WINAPI DocNodeMarkupContainer_QueryInterface(IMarkupContainer *iface, REFIID riid, void **ppvObject) { - HTMLDocument *This = impl_from_IMarkupContainer(iface); - return htmldoc_query_interface(This, riid, ppvObject); + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupContainer(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppvObject); }
-static ULONG WINAPI MarkupContainer_AddRef(IMarkupContainer *iface) +static ULONG WINAPI DocNodeMarkupContainer_AddRef(IMarkupContainer *iface) { - HTMLDocument *This = impl_from_IMarkupContainer(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupContainer(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI MarkupContainer_Release(IMarkupContainer *iface) +static ULONG WINAPI DocNodeMarkupContainer_Release(IMarkupContainer *iface) { - HTMLDocument *This = impl_from_IMarkupContainer(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupContainer(iface); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI MarkupContainer_OwningDoc(IMarkupContainer *iface, IHTMLDocument2 **ppDoc) +static HRESULT WINAPI DocNodeMarkupContainer_OwningDoc(IMarkupContainer *iface, IHTMLDocument2 **ppDoc) { - HTMLDocument *This = impl_from_IMarkupContainer(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IMarkupContainer(iface); FIXME("(%p)->(%p)\n", This, ppDoc); return E_NOTIMPL; }
-static const IMarkupContainerVtbl MarkupContainerVtbl = { - MarkupContainer_QueryInterface, - MarkupContainer_AddRef, - MarkupContainer_Release, - MarkupContainer_OwningDoc +static const IMarkupContainerVtbl DocNodeMarkupContainerVtbl = { + DocNodeMarkupContainer_QueryInterface, + DocNodeMarkupContainer_AddRef, + DocNodeMarkupContainer_Release, + DocNodeMarkupContainer_OwningDoc +}; + +static inline HTMLDocumentObj *HTMLDocumentObj_from_IMarkupContainer(IMarkupContainer *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocumentObj, IMarkupContainer_iface); +} + +HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(MarkupContainer) + +static HRESULT WINAPI DocObjMarkupContainer_OwningDoc(IMarkupContainer *iface, IHTMLDocument2 **ppDoc) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IMarkupContainer(iface); + FIXME("(%p)->(%p)\n", This, ppDoc); + return E_NOTIMPL; +} + +static const IMarkupContainerVtbl DocObjMarkupContainerVtbl = { + DocObjMarkupContainer_QueryInterface, + DocObjMarkupContainer_AddRef, + DocObjMarkupContainer_Release, + DocObjMarkupContainer_OwningDoc };
/********************************************************** * IDisplayServices implementation */ -static inline HTMLDocument *impl_from_IDisplayServices(IDisplayServices *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IDisplayServices(IDisplayServices *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IDisplayServices_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IDisplayServices_iface); }
-static HRESULT WINAPI DisplayServices_QueryInterface(IDisplayServices *iface, REFIID riid, void **ppvObject) +static HRESULT WINAPI DocNodeDisplayServices_QueryInterface(IDisplayServices *iface, REFIID riid, void **ppvObject) { - HTMLDocument *This = impl_from_IDisplayServices(iface); - return htmldoc_query_interface(This, riid, ppvObject); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDisplayServices(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppvObject); }
-static ULONG WINAPI DisplayServices_AddRef(IDisplayServices *iface) +static ULONG WINAPI DocNodeDisplayServices_AddRef(IDisplayServices *iface) { - HTMLDocument *This = impl_from_IDisplayServices(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDisplayServices(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI DisplayServices_Release(IDisplayServices *iface) +static ULONG WINAPI DocNodeDisplayServices_Release(IDisplayServices *iface) { - HTMLDocument *This = impl_from_IDisplayServices(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDisplayServices(iface); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI DisplayServices_CreateDisplayPointer(IDisplayServices *iface, IDisplayPointer **ppDispPointer) +static HRESULT WINAPI DocNodeDisplayServices_CreateDisplayPointer(IDisplayServices *iface, IDisplayPointer **ppDispPointer) { - HTMLDocument *This = impl_from_IDisplayServices(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDisplayServices(iface); FIXME("(%p)->(%p)\n", This, ppDispPointer); return E_NOTIMPL; }
-static HRESULT WINAPI DisplayServices_TransformRect(IDisplayServices *iface, +static HRESULT WINAPI DocNodeDisplayServices_TransformRect(IDisplayServices *iface, RECT *pRect, COORD_SYSTEM eSource, COORD_SYSTEM eDestination, IHTMLElement *pIElement) { - HTMLDocument *This = impl_from_IDisplayServices(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDisplayServices(iface); FIXME("(%p)->(%s,%d,%d,%p)\n", This, wine_dbgstr_rect(pRect), eSource, eDestination, pIElement); return E_NOTIMPL; }
-static HRESULT WINAPI DisplayServices_TransformPoint(IDisplayServices *iface, +static HRESULT WINAPI DocNodeDisplayServices_TransformPoint(IDisplayServices *iface, POINT *pPoint, COORD_SYSTEM eSource, COORD_SYSTEM eDestination, IHTMLElement *pIElement) { - HTMLDocument *This = impl_from_IDisplayServices(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDisplayServices(iface); FIXME("(%p)->(%s,%d,%d,%p)\n", This, wine_dbgstr_point(pPoint), eSource, eDestination, pIElement); return E_NOTIMPL; }
-static HRESULT WINAPI DisplayServices_GetCaret(IDisplayServices *iface, IHTMLCaret **ppCaret) +static HRESULT WINAPI DocNodeDisplayServices_GetCaret(IDisplayServices *iface, IHTMLCaret **ppCaret) { - HTMLDocument *This = impl_from_IDisplayServices(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDisplayServices(iface); FIXME("(%p)->(%p)\n", This, ppCaret); return E_NOTIMPL; }
-static HRESULT WINAPI DisplayServices_GetComputedStyle(IDisplayServices *iface, +static HRESULT WINAPI DocNodeDisplayServices_GetComputedStyle(IDisplayServices *iface, IMarkupPointer *pPointer, IHTMLComputedStyle **ppComputedStyle) { - HTMLDocument *This = impl_from_IDisplayServices(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDisplayServices(iface); FIXME("(%p)->(%p,%p)\n", This, pPointer, ppComputedStyle); return E_NOTIMPL; }
-static HRESULT WINAPI DisplayServices_ScrollRectIntoView(IDisplayServices *iface, +static HRESULT WINAPI DocNodeDisplayServices_ScrollRectIntoView(IDisplayServices *iface, IHTMLElement *pIElement, RECT rect) { - HTMLDocument *This = impl_from_IDisplayServices(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDisplayServices(iface); FIXME("(%p)->(%p,%s)\n", This, pIElement, wine_dbgstr_rect(&rect)); return E_NOTIMPL; }
-static HRESULT WINAPI DisplayServices_HasFlowLayout(IDisplayServices *iface, +static HRESULT WINAPI DocNodeDisplayServices_HasFlowLayout(IDisplayServices *iface, IHTMLElement *pIElement, BOOL *pfHasFlowLayout) { - HTMLDocument *This = impl_from_IDisplayServices(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDisplayServices(iface); FIXME("(%p)->(%p,%p)\n", This, pIElement, pfHasFlowLayout); return E_NOTIMPL; }
-static const IDisplayServicesVtbl DisplayServicesVtbl = { - DisplayServices_QueryInterface, - DisplayServices_AddRef, - DisplayServices_Release, - DisplayServices_CreateDisplayPointer, - DisplayServices_TransformRect, - DisplayServices_TransformPoint, - DisplayServices_GetCaret, - DisplayServices_GetComputedStyle, - DisplayServices_ScrollRectIntoView, - DisplayServices_HasFlowLayout +static const IDisplayServicesVtbl DocNodeDisplayServicesVtbl = { + DocNodeDisplayServices_QueryInterface, + DocNodeDisplayServices_AddRef, + DocNodeDisplayServices_Release, + DocNodeDisplayServices_CreateDisplayPointer, + DocNodeDisplayServices_TransformRect, + DocNodeDisplayServices_TransformPoint, + DocNodeDisplayServices_GetCaret, + DocNodeDisplayServices_GetComputedStyle, + DocNodeDisplayServices_ScrollRectIntoView, + DocNodeDisplayServices_HasFlowLayout +}; + +static inline HTMLDocumentObj *HTMLDocumentObj_from_IDisplayServices(IDisplayServices *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocumentObj, IDisplayServices_iface); +} + +HTMLDOCUMENTOBJ_IUNKNOWN_METHODS(DisplayServices) + +static HRESULT WINAPI DocObjDisplayServices_CreateDisplayPointer(IDisplayServices *iface, IDisplayPointer **ppDispPointer) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IDisplayServices(iface); + FIXME("(%p)->(%p)\n", This, ppDispPointer); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjDisplayServices_TransformRect(IDisplayServices *iface, + RECT *pRect, COORD_SYSTEM eSource, COORD_SYSTEM eDestination, IHTMLElement *pIElement) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IDisplayServices(iface); + FIXME("(%p)->(%s,%d,%d,%p)\n", This, wine_dbgstr_rect(pRect), eSource, eDestination, pIElement); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjDisplayServices_TransformPoint(IDisplayServices *iface, + POINT *pPoint, COORD_SYSTEM eSource, COORD_SYSTEM eDestination, IHTMLElement *pIElement) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IDisplayServices(iface); + FIXME("(%p)->(%s,%d,%d,%p)\n", This, wine_dbgstr_point(pPoint), eSource, eDestination, pIElement); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjDisplayServices_GetCaret(IDisplayServices *iface, IHTMLCaret **ppCaret) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IDisplayServices(iface); + FIXME("(%p)->(%p)\n", This, ppCaret); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjDisplayServices_GetComputedStyle(IDisplayServices *iface, + IMarkupPointer *pPointer, IHTMLComputedStyle **ppComputedStyle) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IDisplayServices(iface); + FIXME("(%p)->(%p,%p)\n", This, pPointer, ppComputedStyle); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjDisplayServices_ScrollRectIntoView(IDisplayServices *iface, + IHTMLElement *pIElement, RECT rect) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IDisplayServices(iface); + FIXME("(%p)->(%p,%s)\n", This, pIElement, wine_dbgstr_rect(&rect)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjDisplayServices_HasFlowLayout(IDisplayServices *iface, + IHTMLElement *pIElement, BOOL *pfHasFlowLayout) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IDisplayServices(iface); + FIXME("(%p)->(%p,%p)\n", This, pIElement, pfHasFlowLayout); + return E_NOTIMPL; +} + +static const IDisplayServicesVtbl DocObjDisplayServicesVtbl = { + DocObjDisplayServices_QueryInterface, + DocObjDisplayServices_AddRef, + DocObjDisplayServices_Release, + DocObjDisplayServices_CreateDisplayPointer, + DocObjDisplayServices_TransformRect, + DocObjDisplayServices_TransformPoint, + DocObjDisplayServices_GetCaret, + DocObjDisplayServices_GetComputedStyle, + DocObjDisplayServices_ScrollRectIntoView, + DocObjDisplayServices_HasFlowLayout };
/********************************************************** * IDocumentRange implementation */ -static inline HTMLDocument *impl_from_IDocumentRange(IDocumentRange *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IDocumentRange(IDocumentRange *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IDocumentRange_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IDocumentRange_iface); }
-static HRESULT WINAPI DocumentRange_QueryInterface(IDocumentRange *iface, REFIID riid, void **ppv) +static HRESULT WINAPI DocNodeDocumentRange_QueryInterface(IDocumentRange *iface, REFIID riid, void **ppv) { - HTMLDocument *This = impl_from_IDocumentRange(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentRange(iface);
- return htmldoc_query_interface(This, riid, ppv); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static ULONG WINAPI DocumentRange_AddRef(IDocumentRange *iface) +static ULONG WINAPI DocNodeDocumentRange_AddRef(IDocumentRange *iface) { - HTMLDocument *This = impl_from_IDocumentRange(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentRange(iface);
- return htmldoc_addref(This); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI DocumentRange_Release(IDocumentRange *iface) +static ULONG WINAPI DocNodeDocumentRange_Release(IDocumentRange *iface) { - HTMLDocument *This = impl_from_IDocumentRange(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentRange(iface);
- return htmldoc_release(This); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI DocumentRange_GetTypeInfoCount(IDocumentRange *iface, UINT *pctinfo) +static HRESULT WINAPI DocNodeDocumentRange_GetTypeInfoCount(IDocumentRange *iface, UINT *pctinfo) { - HTMLDocument *This = impl_from_IDocumentRange(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentRange(iface);
- return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); + return IDispatchEx_GetTypeInfoCount(&This->basedoc.IDispatchEx_iface, pctinfo); }
-static HRESULT WINAPI DocumentRange_GetTypeInfo(IDocumentRange *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) +static HRESULT WINAPI DocNodeDocumentRange_GetTypeInfo(IDocumentRange *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { - HTMLDocument *This = impl_from_IDocumentRange(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentRange(iface);
- return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); + return IDispatchEx_GetTypeInfo(&This->basedoc.IDispatchEx_iface, iTInfo, lcid, ppTInfo); }
-static HRESULT WINAPI DocumentRange_GetIDsOfNames(IDocumentRange *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, +static HRESULT WINAPI DocNodeDocumentRange_GetIDsOfNames(IDocumentRange *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { - HTMLDocument *This = impl_from_IDocumentRange(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentRange(iface);
- return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, + return IDispatchEx_GetIDsOfNames(&This->basedoc.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); }
-static HRESULT WINAPI DocumentRange_Invoke(IDocumentRange *iface, DISPID dispIdMember, REFIID riid, LCID lcid, +static HRESULT WINAPI DocNodeDocumentRange_Invoke(IDocumentRange *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - HTMLDocument *This = impl_from_IDocumentRange(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentRange(iface);
- return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, + return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); }
-static HRESULT WINAPI DocumentRange_createRange(IDocumentRange *iface, IHTMLDOMRange **p) +static HRESULT WINAPI DocNodeDocumentRange_createRange(IDocumentRange *iface, IHTMLDOMRange **p) { - HTMLDocument *This = impl_from_IDocumentRange(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IDocumentRange(iface); nsIDOMRange *nsrange; HRESULT hres;
TRACE("(%p)->(%p)\n", This, p);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
- if(NS_FAILED(nsIDOMHTMLDocument_CreateRange(This->doc_node->nsdoc, &nsrange))) + if(NS_FAILED(nsIDOMHTMLDocument_CreateRange(This->nsdoc, &nsrange))) return E_FAIL;
- hres = create_dom_range(nsrange, dispex_compat_mode(&This->doc_node->node.event_target.dispex), p); + hres = create_dom_range(nsrange, dispex_compat_mode(&This->node.event_target.dispex), p); nsIDOMRange_Release(nsrange); return hres; }
-static const IDocumentRangeVtbl DocumentRangeVtbl = { - DocumentRange_QueryInterface, - DocumentRange_AddRef, - DocumentRange_Release, - DocumentRange_GetTypeInfoCount, - DocumentRange_GetTypeInfo, - DocumentRange_GetIDsOfNames, - DocumentRange_Invoke, - DocumentRange_createRange, +static const IDocumentRangeVtbl DocNodeDocumentRangeVtbl = { + DocNodeDocumentRange_QueryInterface, + DocNodeDocumentRange_AddRef, + DocNodeDocumentRange_Release, + DocNodeDocumentRange_GetTypeInfoCount, + DocNodeDocumentRange_GetTypeInfo, + DocNodeDocumentRange_GetIDsOfNames, + DocNodeDocumentRange_Invoke, + DocNodeDocumentRange_createRange +}; + +HTMLDOCUMENTOBJ_IDISPATCH_METHODS(DocumentRange) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(DocumentRange, createRange, IHTMLDOMRange**) + +static const IDocumentRangeVtbl DocObjDocumentRangeVtbl = { + DocObjDocumentRange_QueryInterface, + DocObjDocumentRange_AddRef, + DocObjDocumentRange_Release, + DocObjDocumentRange_GetTypeInfoCount, + DocObjDocumentRange_GetTypeInfo, + DocObjDocumentRange_GetIDsOfNames, + DocObjDocumentRange_Invoke, + DocObjDocumentRange_createRange };
static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) @@ -5609,46 +6058,10 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) *ppv = &This->IHTMLDocument6_iface; else if(IsEqualGUID(&IID_IHTMLDocument7, riid)) *ppv = &This->IHTMLDocument7_iface; - else if(IsEqualGUID(&IID_IDocumentSelector, riid)) - *ppv = &This->IDocumentSelector_iface; - else if(IsEqualGUID(&IID_IDocumentEvent, riid)) - *ppv = &This->IDocumentEvent_iface; else if(IsEqualGUID(&DIID_DispHTMLDocument, riid)) *ppv = &This->IHTMLDocument2_iface; - else if(IsEqualGUID(&IID_ISupportErrorInfo, riid)) - *ppv = &This->ISupportErrorInfo_iface; - else if(IsEqualGUID(&IID_IProvideClassInfo, riid)) - *ppv = &This->IProvideMultipleClassInfo_iface; - else if(IsEqualGUID(&IID_IProvideClassInfo2, riid)) - *ppv = &This->IProvideMultipleClassInfo_iface; - else if(IsEqualGUID(&IID_IProvideMultipleClassInfo, riid)) - *ppv = &This->IProvideMultipleClassInfo_iface; - else if(IsEqualGUID(&IID_IMarkupServices, riid)) - *ppv = &This->IMarkupServices_iface; - else if(IsEqualGUID(&IID_IMarkupContainer, riid)) - *ppv = &This->IMarkupContainer_iface; - else if(IsEqualGUID(&IID_IDisplayServices, riid)) - *ppv = &This->IDisplayServices_iface; - else if(IsEqualGUID(&IID_IDocumentRange, riid)) - *ppv = &This->IDocumentRange_iface; - else if(IsEqualGUID(&CLSID_CMarkup, riid)) { - FIXME("(%p)->(CLSID_CMarkup %p)\n", This, ppv); - *ppv = NULL; - }else if(IsEqualGUID(&IID_IRunnableObject, riid)) { - TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This, ppv); - *ppv = NULL; - }else if(IsEqualGUID(&IID_IPersistPropertyBag, riid)) { - TRACE("(%p)->(IID_IPersistPropertyBag %p) returning NULL\n", This, ppv); - *ppv = NULL; - }else if(IsEqualGUID(&IID_IExternalConnection, riid)) { - TRACE("(%p)->(IID_IExternalConnection %p) returning NULL\n", This, ppv); - *ppv = NULL; - }else if(IsEqualGUID(&IID_IStdMarshalInfo, riid)) { - TRACE("(%p)->(IID_IStdMarshalInfo %p) returning NULL\n", This, ppv); - *ppv = NULL; - }else { + else return FALSE; - }
if(*ppv) IUnknown_AddRef((IUnknown*)*ppv); @@ -5675,14 +6088,6 @@ static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex) doc->IHTMLDocument6_iface.lpVtbl = &HTMLDocument6Vtbl; doc->IHTMLDocument7_iface.lpVtbl = &HTMLDocument7Vtbl; doc->IDispatchEx_iface.lpVtbl = &DocDispatchExVtbl; - doc->IDocumentSelector_iface.lpVtbl = &DocumentSelectorVtbl; - doc->IDocumentEvent_iface.lpVtbl = &DocumentEventVtbl; - doc->ISupportErrorInfo_iface.lpVtbl = &SupportErrorInfoVtbl; - doc->IProvideMultipleClassInfo_iface.lpVtbl = &ProvideMultipleClassInfoVtbl; - doc->IMarkupServices_iface.lpVtbl = &MarkupServicesVtbl; - doc->IMarkupContainer_iface.lpVtbl = &MarkupContainerVtbl; - doc->IDisplayServices_iface.lpVtbl = &DisplayServicesVtbl; - doc->IDocumentRange_iface.lpVtbl = &DocumentRangeVtbl;
doc->outer_unk = outer; doc->dispex = dispex; @@ -5702,8 +6107,26 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) if(htmldoc_qi(&This->basedoc, riid, ppv)) return *ppv ? S_OK : E_NOINTERFACE;
- if(IsEqualGUID(&IID_IInternetHostSecurityManager, riid)) - *ppv = &This->IInternetHostSecurityManager_iface; + if(IsEqualGUID(&IID_IDocumentSelector, riid)) + *ppv = &This->IDocumentSelector_iface; + else if(IsEqualGUID(&IID_IDocumentEvent, riid)) + *ppv = &This->IDocumentEvent_iface; + else if(IsEqualGUID(&IID_ISupportErrorInfo, riid)) + *ppv = &This->ISupportErrorInfo_iface; + else if(IsEqualGUID(&IID_IProvideClassInfo, riid)) + *ppv = &This->IProvideMultipleClassInfo_iface; + else if(IsEqualGUID(&IID_IProvideClassInfo2, riid)) + *ppv = &This->IProvideMultipleClassInfo_iface; + else if(IsEqualGUID(&IID_IProvideMultipleClassInfo, riid)) + *ppv = &This->IProvideMultipleClassInfo_iface; + else if(IsEqualGUID(&IID_IMarkupServices, riid)) + *ppv = &This->IMarkupServices_iface; + else if(IsEqualGUID(&IID_IMarkupContainer, riid)) + *ppv = &This->IMarkupContainer_iface; + else if(IsEqualGUID(&IID_IDisplayServices, riid)) + *ppv = &This->IDisplayServices_iface; + else if(IsEqualGUID(&IID_IDocumentRange, riid)) + *ppv = &This->IDocumentRange_iface; else if(IsEqualGUID(&IID_IPersist, riid)) *ppv = &This->IPersistFile_iface; else if(IsEqualGUID(&IID_IPersistMoniker, riid)) @@ -5742,10 +6165,33 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) *ppv = &This->IObjectSafety_iface; else if(IsEqualGUID(&IID_IServiceProvider, riid)) *ppv = &This->IServiceProvider_iface; + else if(IsEqualGUID(&IID_IInternetHostSecurityManager, riid)) + *ppv = &This->IInternetHostSecurityManager_iface; else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) *ppv = &This->cp_container.IConnectionPointContainer_iface; - else + else if(IsEqualGUID(&CLSID_CMarkup, riid)) { + FIXME("(%p)->(CLSID_CMarkup %p)\n", This, ppv); + *ppv = NULL; + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IRunnableObject, riid)) { + TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This, ppv); + *ppv = NULL; + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IPersistPropertyBag, riid)) { + TRACE("(%p)->(IID_IPersistPropertyBag %p) returning NULL\n", This, ppv); + *ppv = NULL; + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IExternalConnection, riid)) { + TRACE("(%p)->(IID_IExternalConnection %p) returning NULL\n", This, ppv); + *ppv = NULL; + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IStdMarshalInfo, riid)) { + TRACE("(%p)->(IID_IStdMarshalInfo %p) returning NULL\n", This, ppv); + *ppv = NULL; + return E_NOINTERFACE; + }else { return HTMLDOMNode_QI(&This->node, riid, ppv); + }
IUnknown_AddRef((IUnknown*)*ppv); return S_OK; @@ -6123,6 +6569,15 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo return NULL;
doc->ref = 1; + doc->IDocumentSelector_iface.lpVtbl = &DocNodeDocumentSelectorVtbl; + doc->IDocumentEvent_iface.lpVtbl = &DocNodeDocumentEventVtbl; + doc->ISupportErrorInfo_iface.lpVtbl = &DocNodeSupportErrorInfoVtbl; + doc->IProvideMultipleClassInfo_iface.lpVtbl = &DocNodeProvideMultipleClassInfoVtbl; + doc->IMarkupServices_iface.lpVtbl = &DocNodeMarkupServicesVtbl; + doc->IMarkupContainer_iface.lpVtbl = &DocNodeMarkupContainerVtbl; + doc->IDisplayServices_iface.lpVtbl = &DocNodeDisplayServicesVtbl; + doc->IDocumentRange_iface.lpVtbl = &DocNodeDocumentRangeVtbl; + doc->basedoc.doc_node = doc; doc->basedoc.doc_obj = doc_obj; doc->basedoc.window = window ? window->base.outer_window : NULL; @@ -6245,6 +6700,26 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii return *ppv ? S_OK : E_NOINTERFACE; }else if(IsEqualGUID(&IID_ICustomDoc, riid)) { *ppv = &This->ICustomDoc_iface; + }else if(IsEqualGUID(&IID_IDocumentSelector, riid)) { + *ppv = &This->IDocumentSelector_iface; + }else if(IsEqualGUID(&IID_IDocumentEvent, riid)) { + *ppv = &This->IDocumentEvent_iface; + }else if(IsEqualGUID(&IID_ISupportErrorInfo, riid)) { + *ppv = &This->ISupportErrorInfo_iface; + }else if(IsEqualGUID(&IID_IProvideClassInfo, riid)) { + *ppv = &This->IProvideMultipleClassInfo_iface; + }else if(IsEqualGUID(&IID_IProvideClassInfo2, riid)) { + *ppv = &This->IProvideMultipleClassInfo_iface; + }else if(IsEqualGUID(&IID_IProvideMultipleClassInfo, riid)) { + *ppv = &This->IProvideMultipleClassInfo_iface; + }else if(IsEqualGUID(&IID_IMarkupServices, riid)) { + *ppv = &This->IMarkupServices_iface; + }else if(IsEqualGUID(&IID_IMarkupContainer, riid)) { + *ppv = &This->IMarkupContainer_iface; + }else if(IsEqualGUID(&IID_IDisplayServices, riid)) { + *ppv = &This->IDisplayServices_iface; + }else if(IsEqualGUID(&IID_IDocumentRange, riid)) { + *ppv = &This->IDocumentRange_iface; }else if(IsEqualGUID(&IID_IOleDocumentView, riid)) { *ppv = &This->IOleDocumentView_iface; }else if(IsEqualGUID(&IID_IViewObject, riid)) { @@ -6295,6 +6770,26 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii *ppv = &This->ITargetContainer_iface; }else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) { *ppv = &This->cp_container.IConnectionPointContainer_iface; + }else if(IsEqualGUID(&CLSID_CMarkup, riid)) { + FIXME("(%p)->(CLSID_CMarkup %p)\n", This, ppv); + *ppv = NULL; + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IRunnableObject, riid)) { + TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This, ppv); + *ppv = NULL; + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IPersistPropertyBag, riid)) { + TRACE("(%p)->(IID_IPersistPropertyBag %p) returning NULL\n", This, ppv); + *ppv = NULL; + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IExternalConnection, riid)) { + TRACE("(%p)->(IID_IExternalConnection %p) returning NULL\n", This, ppv); + *ppv = NULL; + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IStdMarshalInfo, riid)) { + TRACE("(%p)->(IID_IStdMarshalInfo %p) returning NULL\n", This, ppv); + *ppv = NULL; + return E_NOINTERFACE; }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { @@ -6511,6 +7006,14 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii doc->ref = 1; doc->IUnknown_inner.lpVtbl = &HTMLDocumentObjVtbl; doc->ICustomDoc_iface.lpVtbl = &CustomDocVtbl; + doc->IDocumentSelector_iface.lpVtbl = &DocObjDocumentSelectorVtbl; + doc->IDocumentEvent_iface.lpVtbl = &DocObjDocumentEventVtbl; + doc->ISupportErrorInfo_iface.lpVtbl = &DocObjSupportErrorInfoVtbl; + doc->IProvideMultipleClassInfo_iface.lpVtbl = &DocObjProvideMultipleClassInfoVtbl; + doc->IMarkupServices_iface.lpVtbl = &DocObjMarkupServicesVtbl; + doc->IMarkupContainer_iface.lpVtbl = &DocObjMarkupContainerVtbl; + doc->IDisplayServices_iface.lpVtbl = &DocObjDisplayServicesVtbl; + doc->IDocumentRange_iface.lpVtbl = &DocObjDocumentRangeVtbl;
doc->basedoc.doc_obj = doc;
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 6b3310e55ab..cfbb1a2bfbc 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -646,15 +646,7 @@ struct HTMLDocument { IHTMLDocument5 IHTMLDocument5_iface; IHTMLDocument6 IHTMLDocument6_iface; IHTMLDocument7 IHTMLDocument7_iface; - IDocumentSelector IDocumentSelector_iface; - IDocumentEvent IDocumentEvent_iface; IDispatchEx IDispatchEx_iface; - ISupportErrorInfo ISupportErrorInfo_iface; - IProvideMultipleClassInfo IProvideMultipleClassInfo_iface; - IMarkupServices IMarkupServices_iface; - IMarkupContainer IMarkupContainer_iface; - IDisplayServices IDisplayServices_iface; - IDocumentRange IDocumentRange_iface;
IUnknown *outer_unk; IDispatchEx *dispex; @@ -685,6 +677,14 @@ struct HTMLDocumentObj { DispatchEx dispex; IUnknown IUnknown_inner; ICustomDoc ICustomDoc_iface; + IDocumentSelector IDocumentSelector_iface; + IDocumentEvent IDocumentEvent_iface; + ISupportErrorInfo ISupportErrorInfo_iface; + IProvideMultipleClassInfo IProvideMultipleClassInfo_iface; + IMarkupServices IMarkupServices_iface; + IMarkupContainer IMarkupContainer_iface; + IDisplayServices IDisplayServices_iface; + IDocumentRange IDocumentRange_iface; IOleDocumentView IOleDocumentView_iface; IViewObjectEx IViewObjectEx_iface; IPersistMoniker IPersistMoniker_iface; @@ -896,6 +896,14 @@ struct HTMLDocumentNode { HTMLDOMNode node; HTMLDocument basedoc;
+ IDocumentSelector IDocumentSelector_iface; + IDocumentEvent IDocumentEvent_iface; + ISupportErrorInfo ISupportErrorInfo_iface; + IProvideMultipleClassInfo IProvideMultipleClassInfo_iface; + IMarkupServices IMarkupServices_iface; + IMarkupContainer IMarkupContainer_iface; + IDisplayServices IDisplayServices_iface; + IDocumentRange IDocumentRange_iface; IPersistMoniker IPersistMoniker_iface; IPersistFile IPersistFile_iface; IMonikerProp IMonikerProp_iface;
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmldoc.c | 1565 +++++++++++++++++++++++----------- dlls/mshtml/htmlelem.c | 2 +- dlls/mshtml/htmlframe.c | 6 +- dlls/mshtml/htmlnode.c | 2 +- dlls/mshtml/htmlwindow.c | 2 +- dlls/mshtml/mshtml_private.h | 3 +- dlls/mshtml/script.c | 2 +- dlls/mshtml/service.c | 4 +- dlls/mshtml/view.c | 2 +- 9 files changed, 1065 insertions(+), 523 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 957d98d5ed6..af6a1a1a033 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -80,6 +80,12 @@ static HRESULT WINAPI DocObj##iface##_Invoke(I##iface *_0, DISPID dispIdMember, return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); \ }
+#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; \ +} + #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); \ @@ -92,6 +98,24 @@ static HRESULT WINAPI DocObj##iface##_Invoke(I##iface *_0, DISPID dispIdMember, 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; \ }
+#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; \ +} + +#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; \ +} + +#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; \ +} + static HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *doc_node, HTMLDocumentNode **ret);
HRESULT get_doc_elem_by_id(HTMLDocumentNode *doc, const WCHAR *id, HTMLElement **ret) @@ -464,81 +488,79 @@ HRESULT create_doctype_node(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLDOMNo return S_OK; }
-static inline HTMLDocument *impl_from_IHTMLDocument2(IHTMLDocument2 *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IHTMLDocument2(IHTMLDocument2 *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument2_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument2_iface); }
-static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID riid, void **ppv) +static HRESULT WINAPI DocNodeHTMLDocument2_QueryInterface(IHTMLDocument2 *iface, REFIID riid, void **ppv) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
- return htmldoc_query_interface(This, riid, ppv); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static ULONG WINAPI HTMLDocument_AddRef(IHTMLDocument2 *iface) +static ULONG WINAPI DocNodeHTMLDocument2_AddRef(IHTMLDocument2 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
- return htmldoc_addref(This); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface) +static ULONG WINAPI DocNodeHTMLDocument2_Release(IHTMLDocument2 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
- return htmldoc_release(This); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI HTMLDocument_GetTypeInfoCount(IHTMLDocument2 *iface, UINT *pctinfo) +static HRESULT WINAPI DocNodeHTMLDocument2_GetTypeInfoCount(IHTMLDocument2 *iface, UINT *pctinfo) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
- return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); + return IDispatchEx_GetTypeInfoCount(&This->basedoc.IDispatchEx_iface, pctinfo); }
-static HRESULT WINAPI HTMLDocument_GetTypeInfo(IHTMLDocument2 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) +static HRESULT WINAPI DocNodeHTMLDocument2_GetTypeInfo(IHTMLDocument2 *iface, UINT iTInfo, LCID lcid, + ITypeInfo **ppTInfo) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
- return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); + return IDispatchEx_GetTypeInfo(&This->basedoc.IDispatchEx_iface, iTInfo, lcid, ppTInfo); }
-static HRESULT WINAPI HTMLDocument_GetIDsOfNames(IHTMLDocument2 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) +static HRESULT WINAPI DocNodeHTMLDocument2_GetIDsOfNames(IHTMLDocument2 *iface, REFIID riid, LPOLESTR *rgszNames, + UINT cNames, LCID lcid, DISPID *rgDispId) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
- return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, + return IDispatchEx_GetIDsOfNames(&This->basedoc.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); }
-static HRESULT WINAPI HTMLDocument_Invoke(IHTMLDocument2 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +static HRESULT WINAPI DocNodeHTMLDocument2_Invoke(IHTMLDocument2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, + WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
- return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, + return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); }
-static HRESULT WINAPI HTMLDocument_get_Script(IHTMLDocument2 *iface, IDispatch **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_Script(IHTMLDocument2 *iface, IDispatch **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); HRESULT hres;
TRACE("(%p)->(%p)\n", This, p);
- hres = IHTMLDocument7_get_parentWindow(&This->IHTMLDocument7_iface, (IHTMLWindow2**)p); + hres = IHTMLDocument7_get_parentWindow(&This->basedoc.IHTMLDocument7_iface, (IHTMLWindow2**)p); return hres == S_OK && !*p ? E_PENDING : hres; }
-static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_all(IHTMLDocument2 *iface, IHTMLElementCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMElement *nselem = NULL; HTMLDOMNode *node; nsresult nsres; @@ -546,12 +568,12 @@ static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCo
TRACE("(%p)->(%p)\n", This, p);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
- nsres = nsIDOMHTMLDocument_GetDocumentElement(This->doc_node->nsdoc, &nselem); + nsres = nsIDOMHTMLDocument_GetDocumentElement(This->nsdoc, &nselem); if(NS_FAILED(nsres)) { ERR("GetDocumentElement failed: %08lx\n", nsres); return E_FAIL; @@ -572,19 +594,19 @@ static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCo return hres; }
-static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_body(IHTMLDocument2 *iface, IHTMLElement **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMHTMLElement *nsbody = NULL; HTMLElement *element; HRESULT hres;
TRACE("(%p)->(%p)\n", This, p);
- if(This->doc_node->nsdoc) { + if(This->nsdoc) { nsresult nsres;
- nsres = nsIDOMHTMLDocument_GetBody(This->doc_node->nsdoc, &nsbody); + nsres = nsIDOMHTMLDocument_GetBody(This->nsdoc, &nsbody); if(NS_FAILED(nsres)) { TRACE("Could not get body: %08lx\n", nsres); return E_UNEXPECTED; @@ -605,9 +627,9 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTMLElement **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_activeElement(IHTMLDocument2 *iface, IHTMLElement **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMElement *nselem; HTMLElement *elem; nsresult nsres; @@ -615,7 +637,7 @@ static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTM
TRACE("(%p)->(%p)\n", This, p);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { *p = NULL; return S_OK; } @@ -624,7 +646,7 @@ static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTM * NOTE: Gecko may return an active element even if the document is not visible. * IE returns NULL in this case. */ - nsres = nsIDOMHTMLDocument_GetActiveElement(This->doc_node->nsdoc, &nselem); + nsres = nsIDOMHTMLDocument_GetActiveElement(This->nsdoc, &nselem); if(NS_FAILED(nsres)) { ERR("GetActiveElement failed: %08lx\n", nsres); return E_FAIL; @@ -644,9 +666,9 @@ static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTM return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_images(IHTMLDocument2 *iface, IHTMLElementCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_images(IHTMLDocument2 *iface, IHTMLElementCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMHTMLCollection *nscoll = NULL; nsresult nsres;
@@ -657,28 +679,28 @@ static HRESULT WINAPI HTMLDocument_get_images(IHTMLDocument2 *iface, IHTMLElemen
*p = NULL;
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
- nsres = nsIDOMHTMLDocument_GetImages(This->doc_node->nsdoc, &nscoll); + nsres = nsIDOMHTMLDocument_GetImages(This->nsdoc, &nscoll); if(NS_FAILED(nsres)) { ERR("GetImages failed: %08lx\n", nsres); return E_FAIL; }
if(nscoll) { - *p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode); + *p = create_collection_from_htmlcol(nscoll, This->document_mode); nsIDOMHTMLCollection_Release(nscoll); }
return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_applets(IHTMLDocument2 *iface, IHTMLElementCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_applets(IHTMLDocument2 *iface, IHTMLElementCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMHTMLCollection *nscoll = NULL; nsresult nsres;
@@ -689,28 +711,28 @@ static HRESULT WINAPI HTMLDocument_get_applets(IHTMLDocument2 *iface, IHTMLEleme
*p = NULL;
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
- nsres = nsIDOMHTMLDocument_GetApplets(This->doc_node->nsdoc, &nscoll); + nsres = nsIDOMHTMLDocument_GetApplets(This->nsdoc, &nscoll); if(NS_FAILED(nsres)) { ERR("GetApplets failed: %08lx\n", nsres); return E_FAIL; }
if(nscoll) { - *p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode); + *p = create_collection_from_htmlcol(nscoll, This->document_mode); nsIDOMHTMLCollection_Release(nscoll); }
return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_links(IHTMLDocument2 *iface, IHTMLElementCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_links(IHTMLDocument2 *iface, IHTMLElementCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMHTMLCollection *nscoll = NULL; nsresult nsres;
@@ -721,28 +743,28 @@ static HRESULT WINAPI HTMLDocument_get_links(IHTMLDocument2 *iface, IHTMLElement
*p = NULL;
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
- nsres = nsIDOMHTMLDocument_GetLinks(This->doc_node->nsdoc, &nscoll); + nsres = nsIDOMHTMLDocument_GetLinks(This->nsdoc, &nscoll); if(NS_FAILED(nsres)) { ERR("GetLinks failed: %08lx\n", nsres); return E_FAIL; }
if(nscoll) { - *p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode); + *p = create_collection_from_htmlcol(nscoll, This->document_mode); nsIDOMHTMLCollection_Release(nscoll); }
return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_forms(IHTMLDocument2 *iface, IHTMLElementCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_forms(IHTMLDocument2 *iface, IHTMLElementCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMHTMLCollection *nscoll = NULL; nsresult nsres;
@@ -753,28 +775,28 @@ static HRESULT WINAPI HTMLDocument_get_forms(IHTMLDocument2 *iface, IHTMLElement
*p = NULL;
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
- nsres = nsIDOMHTMLDocument_GetForms(This->doc_node->nsdoc, &nscoll); + nsres = nsIDOMHTMLDocument_GetForms(This->nsdoc, &nscoll); if(NS_FAILED(nsres)) { ERR("GetForms failed: %08lx\n", nsres); return E_FAIL; }
if(nscoll) { - *p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode); + *p = create_collection_from_htmlcol(nscoll, This->document_mode); nsIDOMHTMLCollection_Release(nscoll); }
return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_anchors(IHTMLDocument2 *iface, IHTMLElementCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_anchors(IHTMLDocument2 *iface, IHTMLElementCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMHTMLCollection *nscoll = NULL; nsresult nsres;
@@ -785,40 +807,40 @@ static HRESULT WINAPI HTMLDocument_get_anchors(IHTMLDocument2 *iface, IHTMLEleme
*p = NULL;
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
- nsres = nsIDOMHTMLDocument_GetAnchors(This->doc_node->nsdoc, &nscoll); + nsres = nsIDOMHTMLDocument_GetAnchors(This->nsdoc, &nscoll); if(NS_FAILED(nsres)) { ERR("GetAnchors failed: %08lx\n", nsres); return E_FAIL; }
if(nscoll) { - *p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode); + *p = create_collection_from_htmlcol(nscoll, This->document_mode); nsIDOMHTMLCollection_Release(nscoll); }
return S_OK; }
-static HRESULT WINAPI HTMLDocument_put_title(IHTMLDocument2 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_title(IHTMLDocument2 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsAString nsstr; nsresult nsres;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
nsAString_InitDepend(&nsstr, v); - nsres = nsIDOMHTMLDocument_SetTitle(This->doc_node->nsdoc, &nsstr); + nsres = nsIDOMHTMLDocument_SetTitle(This->nsdoc, &nsstr); nsAString_Finish(&nsstr); if(NS_FAILED(nsres)) ERR("SetTitle failed: %08lx\n", nsres); @@ -826,23 +848,23 @@ static HRESULT WINAPI HTMLDocument_put_title(IHTMLDocument2 *iface, BSTR v) return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_title(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_title(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); const PRUnichar *ret; nsAString nsstr; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
nsAString_Init(&nsstr, NULL); - nsres = nsIDOMHTMLDocument_GetTitle(This->doc_node->nsdoc, &nsstr); + nsres = nsIDOMHTMLDocument_GetTitle(This->nsdoc, &nsstr); if (NS_SUCCEEDED(nsres)) { nsAString_GetData(&nsstr, &ret); *p = SysAllocString(ret); @@ -857,9 +879,9 @@ static HRESULT WINAPI HTMLDocument_get_title(IHTMLDocument2 *iface, BSTR *p) return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_scripts(IHTMLDocument2 *iface, IHTMLElementCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_scripts(IHTMLDocument2 *iface, IHTMLElementCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMHTMLCollection *nscoll = NULL; nsresult nsres;
@@ -870,28 +892,28 @@ static HRESULT WINAPI HTMLDocument_get_scripts(IHTMLDocument2 *iface, IHTMLEleme
*p = NULL;
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
- nsres = nsIDOMHTMLDocument_GetScripts(This->doc_node->nsdoc, &nscoll); + nsres = nsIDOMHTMLDocument_GetScripts(This->nsdoc, &nscoll); if(NS_FAILED(nsres)) { ERR("GetImages failed: %08lx\n", nsres); return E_FAIL; }
if(nscoll) { - *p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode); + *p = create_collection_from_htmlcol(nscoll, This->document_mode); nsIDOMHTMLCollection_Release(nscoll); }
return S_OK; }
-static HRESULT WINAPI HTMLDocument_put_designMode(IHTMLDocument2 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_designMode(IHTMLDocument2 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); HRESULT hres;
TRACE("(%p)->(%s)\n", This, debugstr_w(v)); @@ -901,102 +923,93 @@ static HRESULT WINAPI HTMLDocument_put_designMode(IHTMLDocument2 *iface, BSTR v) return E_NOTIMPL; }
- hres = setup_edit_mode(This->doc_obj); + hres = setup_edit_mode(This->basedoc.doc_obj); if(FAILED(hres)) return hres;
- call_property_onchanged(This == &This->doc_obj->basedoc ? &This->doc_obj->cp_container : &This->doc_node->cp_container, - DISPID_IHTMLDOCUMENT2_DESIGNMODE); + call_property_onchanged(&This->cp_container, DISPID_IHTMLDOCUMENT2_DESIGNMODE); return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_designMode(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_designMode(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); - FIXME("(%p)->(%p) always returning Off\n", This, p); - - if(!p) - return E_INVALIDARG; - - *p = SysAllocString(L"Off"); - - return S_OK; + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); + return IHTMLDocument2_get_designMode(&This->basedoc.doc_obj->IHTMLDocument2_iface, p); }
-static HRESULT WINAPI HTMLDocument_get_selection(IHTMLDocument2 *iface, IHTMLSelectionObject **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_selection(IHTMLDocument2 *iface, IHTMLSelectionObject **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsISelection *nsselection; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
- nsres = nsIDOMHTMLDocument_GetSelection(This->doc_node->nsdoc, &nsselection); + nsres = nsIDOMHTMLDocument_GetSelection(This->nsdoc, &nsselection); if(NS_FAILED(nsres)) { ERR("GetSelection failed: %08lx\n", nsres); return E_FAIL; }
- return HTMLSelectionObject_Create(This->doc_node, nsselection, p); + return HTMLSelectionObject_Create(This, nsselection, p); }
-static HRESULT WINAPI HTMLDocument_get_readyState(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_readyState(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); - + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", iface, p);
if(!p) return E_POINTER;
- return get_readystate_string(This->window ? This->window->readystate : 0, p); + return get_readystate_string(This->basedoc.window ? This->basedoc.window->readystate : 0, p); }
-static HRESULT WINAPI HTMLDocument_get_frames(IHTMLDocument2 *iface, IHTMLFramesCollection2 **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_frames(IHTMLDocument2 *iface, IHTMLFramesCollection2 **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- if(!This->window) { + if(!This->basedoc.window) { /* Not implemented by IE */ return E_NOTIMPL; } - return IHTMLWindow2_get_frames(&This->window->base.IHTMLWindow2_iface, p); + return IHTMLWindow2_get_frames(&This->basedoc.window->base.IHTMLWindow2_iface, p); }
-static HRESULT WINAPI HTMLDocument_get_embeds(IHTMLDocument2 *iface, IHTMLElementCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_embeds(IHTMLDocument2 *iface, IHTMLElementCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_plugins(IHTMLDocument2 *iface, IHTMLElementCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_plugins(IHTMLDocument2 *iface, IHTMLElementCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_alinkColor(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_alinkColor(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_alinkColor(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_alinkColor(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_bgColor(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_bgColor(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); IHTMLElement *element = NULL; IHTMLBodyElement *body; HRESULT hr; @@ -1027,22 +1040,22 @@ static HRESULT WINAPI HTMLDocument_put_bgColor(IHTMLDocument2 *iface, VARIANT v) return hr; }
-static HRESULT WINAPI HTMLDocument_get_bgColor(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_bgColor(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsAString nsstr; nsresult nsres; HRESULT hres;
TRACE("(%p)->(%p)\n", This, p);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
nsAString_Init(&nsstr, NULL); - nsres = nsIDOMHTMLDocument_GetBgColor(This->doc_node->nsdoc, &nsstr); + nsres = nsIDOMHTMLDocument_GetBgColor(This->nsdoc, &nsstr); hres = return_nsstr_variant(nsres, &nsstr, NSSTR_COLOR, p); if(hres == S_OK && V_VT(p) == VT_BSTR && !V_BSTR(p)) { TRACE("default #ffffff\n"); @@ -1052,61 +1065,57 @@ static HRESULT WINAPI HTMLDocument_get_bgColor(IHTMLDocument2 *iface, VARIANT *p return hres; }
-static HRESULT WINAPI HTMLDocument_put_fgColor(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_fgColor(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_fgColor(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_fgColor(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_linkColor(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_linkColor(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_linkColor(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_linkColor(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_vlinkColor(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_vlinkColor(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_vlinkColor(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_vlinkColor(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_referrer(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_referrer(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); - - FIXME("(%p)->(%p)\n", This, p); - - *p = NULL; - return S_OK; - } + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); + return IHTMLDocument2_get_referrer(&This->basedoc.doc_obj->IHTMLDocument2_iface, p); +}
-static HRESULT WINAPI HTMLDocument_get_location(IHTMLDocument2 *iface, IHTMLLocation **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_location(IHTMLDocument2 *iface, IHTMLLocation **p) { - HTMLDocumentNode *This = impl_from_IHTMLDocument2(iface)->doc_node; + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
@@ -1128,47 +1137,47 @@ static HRESULT IHTMLDocument2_location_hook(HTMLDocument *doc, WORD flags, DISPP 0, flags, dp, res, ei, caller); }
-static HRESULT WINAPI HTMLDocument_get_lastModified(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_lastModified(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_URL(IHTMLDocument2 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_URL(IHTMLDocument2 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
- if(!This->window) { + if(!This->basedoc.window) { FIXME("No window available\n"); return E_FAIL; }
- return navigate_url(This->window, v, This->window->uri, BINDING_NAVIGATED); + return navigate_url(This->basedoc.window, v, This->basedoc.window->uri, BINDING_NAVIGATED); }
-static HRESULT WINAPI HTMLDocument_get_URL(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_URL(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", iface, p);
- *p = SysAllocString(This->window && This->window->url ? This->window->url : L"about:blank"); + *p = SysAllocString(This->basedoc.window && This->basedoc.window->url ? This->basedoc.window->url : L"about:blank"); return *p ? S_OK : E_OUTOFMEMORY; }
-static HRESULT WINAPI HTMLDocument_put_domain(IHTMLDocument2 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_domain(IHTMLDocument2 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsAString nsstr; nsresult nsres;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
nsAString_InitDepend(&nsstr, v); - nsres = nsIDOMHTMLDocument_SetDomain(This->doc_node->nsdoc, &nsstr); + nsres = nsIDOMHTMLDocument_SetDomain(This->nsdoc, &nsstr); nsAString_Finish(&nsstr); if(NS_FAILED(nsres)) { ERR("SetDomain failed: %08lx\n", nsres); @@ -1178,17 +1187,17 @@ static HRESULT WINAPI HTMLDocument_put_domain(IHTMLDocument2 *iface, BSTR v) return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_domain(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_domain(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsAString nsstr; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsAString_Init(&nsstr, NULL); - nsres = nsIDOMHTMLDocument_GetDomain(This->doc_node->nsdoc, &nsstr); - if(NS_SUCCEEDED(nsres) && This->window && This->window->uri) { + nsres = nsIDOMHTMLDocument_GetDomain(This->nsdoc, &nsstr); + if(NS_SUCCEEDED(nsres) && This->basedoc.window && This->basedoc.window->uri) { const PRUnichar *str; HRESULT hres;
@@ -1196,7 +1205,7 @@ static HRESULT WINAPI HTMLDocument_get_domain(IHTMLDocument2 *iface, BSTR *p) if(!*str) { TRACE("Gecko returned empty string, fallback to loaded URL.\n"); nsAString_Finish(&nsstr); - hres = IUri_GetHost(This->window->uri, p); + hres = IUri_GetHost(This->basedoc.window->uri, p); return FAILED(hres) ? hres : S_OK; } } @@ -1204,17 +1213,17 @@ static HRESULT WINAPI HTMLDocument_get_domain(IHTMLDocument2 *iface, BSTR *p) return return_nsstr(nsres, &nsstr, p); }
-static HRESULT WINAPI HTMLDocument_put_cookie(IHTMLDocument2 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_cookie(IHTMLDocument2 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); BOOL bret;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
- if(!This->window) + if(!This->basedoc.window) return S_OK;
- bret = InternetSetCookieExW(This->window->url, NULL, v, 0, 0); + bret = InternetSetCookieExW(This->basedoc.window->url, NULL, v, 0, 0); if(!bret) { FIXME("InternetSetCookieExW failed: %lu\n", GetLastError()); return HRESULT_FROM_WIN32(GetLastError()); @@ -1223,21 +1232,21 @@ static HRESULT WINAPI HTMLDocument_put_cookie(IHTMLDocument2 *iface, BSTR v) return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_cookie(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_cookie(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); DWORD size; BOOL bret;
TRACE("(%p)->(%p)\n", This, p);
- if(!This->window) { + if(!This->basedoc.window) { *p = NULL; return S_OK; }
size = 0; - bret = InternetGetCookieExW(This->window->url, NULL, NULL, &size, 0, NULL); + bret = InternetGetCookieExW(This->basedoc.window->url, NULL, NULL, &size, 0, NULL); if(!bret && GetLastError() != ERROR_INSUFFICIENT_BUFFER) { WARN("InternetGetCookieExW failed: %lu\n", GetLastError()); *p = NULL; @@ -1253,7 +1262,7 @@ static HRESULT WINAPI HTMLDocument_get_cookie(IHTMLDocument2 *iface, BSTR *p) if(!*p) return E_OUTOFMEMORY;
- bret = InternetGetCookieExW(This->window->url, NULL, *p, &size, 0, NULL); + bret = InternetGetCookieExW(This->basedoc.window->url, NULL, *p, &size, 0, NULL); if(!bret) { ERR("InternetGetCookieExW failed: %lu\n", GetLastError()); return E_FAIL; @@ -1262,46 +1271,46 @@ static HRESULT WINAPI HTMLDocument_get_cookie(IHTMLDocument2 *iface, BSTR *p) return S_OK; }
-static HRESULT WINAPI HTMLDocument_put_expando(IHTMLDocument2 *iface, VARIANT_BOOL v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_expando(IHTMLDocument2 *iface, VARIANT_BOOL v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%x)\n", This, v); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_expando(IHTMLDocument2 *iface, VARIANT_BOOL *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_expando(IHTMLDocument2 *iface, VARIANT_BOOL *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_charset(IHTMLDocument2 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_charset(IHTMLDocument2 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s) returning S_OK\n", This, debugstr_w(v)); return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_charset(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_charset(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return IHTMLDocument7_get_characterSet(&This->IHTMLDocument7_iface, p); + return IHTMLDocument7_get_characterSet(&This->basedoc.IHTMLDocument7_iface, p); }
-static HRESULT WINAPI HTMLDocument_put_defaultCharset(IHTMLDocument2 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_defaultCharset(IHTMLDocument2 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_w(v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_defaultCharset(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_defaultCharset(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
@@ -1309,63 +1318,63 @@ static HRESULT WINAPI HTMLDocument_get_defaultCharset(IHTMLDocument2 *iface, BST return *p ? S_OK : E_OUTOFMEMORY; }
-static HRESULT WINAPI HTMLDocument_get_mimeType(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_mimeType(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_fileSize(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_fileSize(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_fileCreatedDate(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_fileCreatedDate(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_fileModifiedDate(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_fileModifiedDate(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_fileUpdatedDate(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_fileUpdatedDate(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_security(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_security(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_protocol(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_protocol(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_nameProp(IHTMLDocument2 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_nameProp(IHTMLDocument2 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT document_write(HTMLDocument *This, SAFEARRAY *psarray, BOOL ln) +static HRESULT document_write(HTMLDocumentNode *This, SAFEARRAY *psarray, BOOL ln) { VARIANT *var, tmp; JSContext *jsctx; @@ -1374,7 +1383,7 @@ static HRESULT document_write(HTMLDocument *This, SAFEARRAY *psarray, BOOL ln) nsresult nsres; HRESULT hres;
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; } @@ -1395,7 +1404,7 @@ static HRESULT document_write(HTMLDocument *This, SAFEARRAY *psarray, BOOL ln)
V_VT(&tmp) = VT_EMPTY;
- jsctx = get_context_from_document(This->doc_node->nsdoc); + jsctx = get_context_from_document(This->nsdoc); argc = psarray->rgsabound[0].cElements; for(i=0; i < argc; i++) { if(V_VT(var+i) == VT_BSTR) { @@ -1410,9 +1419,9 @@ static HRESULT document_write(HTMLDocument *This, SAFEARRAY *psarray, BOOL ln) }
if(!ln || i != argc-1) - nsres = nsIDOMHTMLDocument_Write(This->doc_node->nsdoc, &nsstr, jsctx); + nsres = nsIDOMHTMLDocument_Write(This->nsdoc, &nsstr, jsctx); else - nsres = nsIDOMHTMLDocument_Writeln(This->doc_node->nsdoc, &nsstr, jsctx); + nsres = nsIDOMHTMLDocument_Writeln(This->nsdoc, &nsstr, jsctx); nsAString_Finish(&nsstr); if(V_VT(var+i) != VT_BSTR) VariantClear(&tmp); @@ -1428,28 +1437,28 @@ static HRESULT document_write(HTMLDocument *This, SAFEARRAY *psarray, BOOL ln) return hres; }
-static HRESULT WINAPI HTMLDocument_write(IHTMLDocument2 *iface, SAFEARRAY *psarray) +static HRESULT WINAPI DocNodeHTMLDocument2_write(IHTMLDocument2 *iface, SAFEARRAY *psarray) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", iface, psarray);
return document_write(This, psarray, FALSE); }
-static HRESULT WINAPI HTMLDocument_writeln(IHTMLDocument2 *iface, SAFEARRAY *psarray) +static HRESULT WINAPI DocNodeHTMLDocument2_writeln(IHTMLDocument2 *iface, SAFEARRAY *psarray) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, psarray);
return document_write(This, psarray, TRUE); }
-static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT name, - VARIANT features, VARIANT replace, IDispatch **pomWindowResult) +static HRESULT WINAPI DocNodeHTMLDocument2_open(IHTMLDocument2 *iface, BSTR url, VARIANT name, + VARIANT features, VARIANT replace, IDispatch **pomWindowResult) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsISupports *tmp; nsresult nsres;
@@ -1458,10 +1467,10 @@ static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT
*pomWindowResult = NULL;
- if(!This->window) + if(!This->basedoc.window) return E_FAIL;
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { ERR("!nsdoc\n"); return E_NOTIMPL; } @@ -1470,8 +1479,8 @@ static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT || V_VT(&features) != VT_ERROR || V_VT(&replace) != VT_ERROR) FIXME("unsupported args\n");
- nsres = nsIDOMHTMLDocument_Open(This->doc_node->nsdoc, NULL, NULL, NULL, - get_context_from_document(This->doc_node->nsdoc), 0, &tmp); + nsres = nsIDOMHTMLDocument_Open(This->nsdoc, NULL, NULL, NULL, + get_context_from_document(This->nsdoc), 0, &tmp); if(NS_FAILED(nsres)) { ERR("Open failed: %08lx\n", nsres); return E_FAIL; @@ -1480,24 +1489,24 @@ static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT if(tmp) nsISupports_Release(tmp);
- *pomWindowResult = (IDispatch*)&This->window->base.IHTMLWindow2_iface; - IHTMLWindow2_AddRef(&This->window->base.IHTMLWindow2_iface); + *pomWindowResult = (IDispatch*)&This->basedoc.window->base.IHTMLWindow2_iface; + IHTMLWindow2_AddRef(&This->basedoc.window->base.IHTMLWindow2_iface); return S_OK; }
-static HRESULT WINAPI HTMLDocument_close(IHTMLDocument2 *iface) +static HRESULT WINAPI DocNodeHTMLDocument2_close(IHTMLDocument2 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsresult nsres;
TRACE("(%p)\n", This);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { ERR("!nsdoc\n"); return E_NOTIMPL; }
- nsres = nsIDOMHTMLDocument_Close(This->doc_node->nsdoc); + nsres = nsIDOMHTMLDocument_Close(This->nsdoc); if(NS_FAILED(nsres)) { ERR("Close failed: %08lx\n", nsres); return E_FAIL; @@ -1506,14 +1515,14 @@ static HRESULT WINAPI HTMLDocument_close(IHTMLDocument2 *iface) return S_OK; }
-static HRESULT WINAPI HTMLDocument_clear(IHTMLDocument2 *iface) +static HRESULT WINAPI DocNodeHTMLDocument2_clear(IHTMLDocument2 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsresult nsres;
TRACE("(%p)\n", This);
- nsres = nsIDOMHTMLDocument_Clear(This->doc_node->nsdoc); + nsres = nsIDOMHTMLDocument_Clear(This->nsdoc); if(NS_FAILED(nsres)) { ERR("Clear failed: %08lx\n", nsres); return E_FAIL; @@ -1553,58 +1562,58 @@ static BOOL cmdid_from_string(const WCHAR *str, OLECMDID *cmdid) return FALSE; }
-static HRESULT WINAPI HTMLDocument_queryCommandSupported(IHTMLDocument2 *iface, BSTR cmdID, - VARIANT_BOOL *pfRet) +static HRESULT WINAPI DocNodeHTMLDocument2_queryCommandSupported(IHTMLDocument2 *iface, BSTR cmdID, + VARIANT_BOOL *pfRet) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s %p)\n", This, debugstr_w(cmdID), pfRet); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_queryCommandEnabled(IHTMLDocument2 *iface, BSTR cmdID, - VARIANT_BOOL *pfRet) +static HRESULT WINAPI DocNodeHTMLDocument2_queryCommandEnabled(IHTMLDocument2 *iface, BSTR cmdID, + VARIANT_BOOL *pfRet) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s %p)\n", This, debugstr_w(cmdID), pfRet); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_queryCommandState(IHTMLDocument2 *iface, BSTR cmdID, - VARIANT_BOOL *pfRet) +static HRESULT WINAPI DocNodeHTMLDocument2_queryCommandState(IHTMLDocument2 *iface, BSTR cmdID, + VARIANT_BOOL *pfRet) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s %p)\n", This, debugstr_w(cmdID), pfRet); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_queryCommandIndeterm(IHTMLDocument2 *iface, BSTR cmdID, - VARIANT_BOOL *pfRet) +static HRESULT WINAPI DocNodeHTMLDocument2_queryCommandIndeterm(IHTMLDocument2 *iface, BSTR cmdID, + VARIANT_BOOL *pfRet) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s %p)\n", This, debugstr_w(cmdID), pfRet); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_queryCommandText(IHTMLDocument2 *iface, BSTR cmdID, - BSTR *pfRet) +static HRESULT WINAPI DocNodeHTMLDocument2_queryCommandText(IHTMLDocument2 *iface, BSTR cmdID, + BSTR *pfRet) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s %p)\n", This, debugstr_w(cmdID), pfRet); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_queryCommandValue(IHTMLDocument2 *iface, BSTR cmdID, - VARIANT *pfRet) +static HRESULT WINAPI DocNodeHTMLDocument2_queryCommandValue(IHTMLDocument2 *iface, BSTR cmdID, + VARIANT *pfRet) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s %p)\n", This, debugstr_w(cmdID), pfRet); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_execCommand(IHTMLDocument2 *iface, BSTR cmdID, - VARIANT_BOOL showUI, VARIANT value, VARIANT_BOOL *pfRet) +static HRESULT WINAPI DocNodeHTMLDocument2_execCommand(IHTMLDocument2 *iface, BSTR cmdID, + VARIANT_BOOL showUI, VARIANT value, VARIANT_BOOL *pfRet) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); OLECMDID cmdid; VARIANT ret; HRESULT hres; @@ -1615,7 +1624,7 @@ static HRESULT WINAPI HTMLDocument_execCommand(IHTMLDocument2 *iface, BSTR cmdID return OLECMDERR_E_NOTSUPPORTED;
V_VT(&ret) = VT_EMPTY; - hres = IOleCommandTarget_Exec(&This->doc_node->IOleCommandTarget_iface, &CGID_MSHTML, cmdid, + hres = IOleCommandTarget_Exec(&This->IOleCommandTarget_iface, &CGID_MSHTML, cmdid, showUI ? 0 : OLECMDEXECOPT_DONTPROMPTUSER, &value, &ret); if(FAILED(hres)) return hres; @@ -1629,24 +1638,24 @@ static HRESULT WINAPI HTMLDocument_execCommand(IHTMLDocument2 *iface, BSTR cmdID return S_OK; }
-static HRESULT WINAPI HTMLDocument_execCommandShowHelp(IHTMLDocument2 *iface, BSTR cmdID, - VARIANT_BOOL *pfRet) +static HRESULT WINAPI DocNodeHTMLDocument2_execCommandShowHelp(IHTMLDocument2 *iface, BSTR cmdID, + VARIANT_BOOL *pfRet) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s %p)\n", This, debugstr_w(cmdID), pfRet); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTag, - IHTMLElement **newElem) +static HRESULT WINAPI DocNodeHTMLDocument2_createElement(IHTMLDocument2 *iface, BSTR eTag, + IHTMLElement **newElem) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); HTMLElement *elem; HRESULT hres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(eTag), newElem);
- hres = create_element(This->doc_node, eTag, &elem); + hres = create_element(This, eTag, &elem); if(FAILED(hres)) return hres;
@@ -1654,300 +1663,300 @@ static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTa return S_OK; }
-static HRESULT WINAPI HTMLDocument_put_onhelp(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onhelp(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_onhelp(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onhelp(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_onclick(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onclick(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_CLICK, &v); + return set_doc_event(&This->basedoc, EVENTID_CLICK, &v); }
-static HRESULT WINAPI HTMLDocument_get_onclick(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onclick(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_CLICK, p); + return get_doc_event(&This->basedoc, EVENTID_CLICK, p); }
-static HRESULT WINAPI HTMLDocument_put_ondblclick(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_ondblclick(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_DBLCLICK, &v); + return set_doc_event(&This->basedoc, EVENTID_DBLCLICK, &v); }
-static HRESULT WINAPI HTMLDocument_get_ondblclick(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_ondblclick(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_DBLCLICK, p); + return get_doc_event(&This->basedoc, EVENTID_DBLCLICK, p); }
-static HRESULT WINAPI HTMLDocument_put_onkeyup(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onkeyup(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_KEYUP, &v); + return set_doc_event(&This->basedoc, EVENTID_KEYUP, &v); }
-static HRESULT WINAPI HTMLDocument_get_onkeyup(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onkeyup(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_KEYUP, p); + return get_doc_event(&This->basedoc, EVENTID_KEYUP, p); }
-static HRESULT WINAPI HTMLDocument_put_onkeydown(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onkeydown(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_KEYDOWN, &v); + return set_doc_event(&This->basedoc, EVENTID_KEYDOWN, &v); }
-static HRESULT WINAPI HTMLDocument_get_onkeydown(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onkeydown(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_KEYDOWN, p); + return get_doc_event(&This->basedoc, EVENTID_KEYDOWN, p); }
-static HRESULT WINAPI HTMLDocument_put_onkeypress(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onkeypress(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_KEYPRESS, &v); + return set_doc_event(&This->basedoc, EVENTID_KEYPRESS, &v); }
-static HRESULT WINAPI HTMLDocument_get_onkeypress(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onkeypress(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_KEYPRESS, p); + return get_doc_event(&This->basedoc, EVENTID_KEYPRESS, p); }
-static HRESULT WINAPI HTMLDocument_put_onmouseup(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onmouseup(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_MOUSEUP, &v); + return set_doc_event(&This->basedoc, EVENTID_MOUSEUP, &v); }
-static HRESULT WINAPI HTMLDocument_get_onmouseup(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onmouseup(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_MOUSEUP, p); + return get_doc_event(&This->basedoc, EVENTID_MOUSEUP, p); }
-static HRESULT WINAPI HTMLDocument_put_onmousedown(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onmousedown(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_MOUSEDOWN, &v); + return set_doc_event(&This->basedoc, EVENTID_MOUSEDOWN, &v); }
-static HRESULT WINAPI HTMLDocument_get_onmousedown(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onmousedown(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_MOUSEDOWN, p); + return get_doc_event(&This->basedoc, EVENTID_MOUSEDOWN, p); }
-static HRESULT WINAPI HTMLDocument_put_onmousemove(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onmousemove(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_MOUSEMOVE, &v); + return set_doc_event(&This->basedoc, EVENTID_MOUSEMOVE, &v); }
-static HRESULT WINAPI HTMLDocument_get_onmousemove(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onmousemove(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_MOUSEMOVE, p); + return get_doc_event(&This->basedoc, EVENTID_MOUSEMOVE, p); }
-static HRESULT WINAPI HTMLDocument_put_onmouseout(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onmouseout(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_MOUSEOUT, &v); + return set_doc_event(&This->basedoc, EVENTID_MOUSEOUT, &v); }
-static HRESULT WINAPI HTMLDocument_get_onmouseout(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onmouseout(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_MOUSEOUT, p); + return get_doc_event(&This->basedoc, EVENTID_MOUSEOUT, p); }
-static HRESULT WINAPI HTMLDocument_put_onmouseover(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onmouseover(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_MOUSEOVER, &v); + return set_doc_event(&This->basedoc, EVENTID_MOUSEOVER, &v); }
-static HRESULT WINAPI HTMLDocument_get_onmouseover(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onmouseover(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_MOUSEOVER, p); + return get_doc_event(&This->basedoc, EVENTID_MOUSEOVER, p); }
-static HRESULT WINAPI HTMLDocument_put_onreadystatechange(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onreadystatechange(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_READYSTATECHANGE, &v); + return set_doc_event(&This->basedoc, EVENTID_READYSTATECHANGE, &v); }
-static HRESULT WINAPI HTMLDocument_get_onreadystatechange(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onreadystatechange(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_READYSTATECHANGE, p); + return get_doc_event(&This->basedoc, EVENTID_READYSTATECHANGE, p); }
-static HRESULT WINAPI HTMLDocument_put_onafterupdate(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onafterupdate(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_onafterupdate(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onafterupdate(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_onrowexit(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onrowexit(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_onrowexit(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onrowexit(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_onrowenter(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onrowenter(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_onrowenter(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onrowenter(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_ondragstart(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_ondragstart(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_DRAGSTART, &v); + return set_doc_event(&This->basedoc, EVENTID_DRAGSTART, &v); }
-static HRESULT WINAPI HTMLDocument_get_ondragstart(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_ondragstart(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_DRAGSTART, p); + return get_doc_event(&This->basedoc, EVENTID_DRAGSTART, p); }
-static HRESULT WINAPI HTMLDocument_put_onselectstart(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onselectstart(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_SELECTSTART, &v); + return set_doc_event(&This->basedoc, EVENTID_SELECTSTART, &v); }
-static HRESULT WINAPI HTMLDocument_get_onselectstart(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onselectstart(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_SELECTSTART, p); + return get_doc_event(&This->basedoc, EVENTID_SELECTSTART, p); }
-static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, LONG x, LONG y, - IHTMLElement **elementHit) +static HRESULT WINAPI DocNodeHTMLDocument2_elementFromPoint(IHTMLDocument2 *iface, LONG x, LONG y, + IHTMLElement **elementHit) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMElement *nselem; HTMLElement *element; nsresult nsres; @@ -1955,7 +1964,7 @@ static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, LONG
TRACE("(%p)->(%ld %ld %p)\n", This, x, y, elementHit);
- nsres = nsIDOMHTMLDocument_ElementFromPoint(This->doc_node->nsdoc, x, y, &nselem); + nsres = nsIDOMHTMLDocument_ElementFromPoint(This->nsdoc, x, y, &nselem); if(NS_FAILED(nsres)) { ERR("ElementFromPoint failed: %08lx\n", nsres); return E_FAIL; @@ -1975,21 +1984,21 @@ static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, LONG return S_OK; }
-static HRESULT WINAPI HTMLDocument_get_parentWindow(IHTMLDocument2 *iface, IHTMLWindow2 **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_parentWindow(IHTMLDocument2 *iface, IHTMLWindow2 **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); HRESULT hres;
TRACE("(%p)->(%p)\n", This, p);
- hres = IHTMLDocument7_get_defaultView(&This->IHTMLDocument7_iface, p); + hres = IHTMLDocument7_get_defaultView(&This->basedoc.IHTMLDocument7_iface, p); return hres == S_OK && !*p ? E_FAIL : hres; }
-static HRESULT WINAPI HTMLDocument_get_styleSheets(IHTMLDocument2 *iface, - IHTMLStyleSheetsCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_styleSheets(IHTMLDocument2 *iface, + IHTMLStyleSheetsCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMStyleSheetList *nsstylelist; nsresult nsres; HRESULT hres; @@ -1998,64 +2007,64 @@ static HRESULT WINAPI HTMLDocument_get_styleSheets(IHTMLDocument2 *iface,
*p = NULL;
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
- nsres = nsIDOMHTMLDocument_GetStyleSheets(This->doc_node->nsdoc, &nsstylelist); + nsres = nsIDOMHTMLDocument_GetStyleSheets(This->nsdoc, &nsstylelist); if(NS_FAILED(nsres)) { ERR("GetStyleSheets failed: %08lx\n", nsres); return map_nsresult(nsres); }
hres = create_style_sheet_collection(nsstylelist, - dispex_compat_mode(&This->doc_node->node.event_target.dispex), p); + dispex_compat_mode(&This->node.event_target.dispex), p); nsIDOMStyleSheetList_Release(nsstylelist); return hres; }
-static HRESULT WINAPI HTMLDocument_put_onbeforeupdate(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onbeforeupdate(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_onbeforeupdate(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onbeforeupdate(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_put_onerrorupdate(IHTMLDocument2 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument2_put_onerrorupdate(IHTMLDocument2 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_get_onerrorupdate(IHTMLDocument2 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument2_get_onerrorupdate(IHTMLDocument2 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument_toString(IHTMLDocument2 *iface, BSTR *String) +static HRESULT WINAPI DocNodeHTMLDocument2_toString(IHTMLDocument2 *iface, BSTR *String) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface);
TRACE("(%p)->(%p)\n", This, String);
- return dispex_to_string(&This->doc_node->node.event_target.dispex, String); + return dispex_to_string(&This->node.event_target.dispex, String); }
-static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR bstrHref, - LONG lIndex, IHTMLStyleSheet **ppnewStyleSheet) +static HRESULT WINAPI DocNodeHTMLDocument2_createStyleSheet(IHTMLDocument2 *iface, BSTR bstrHref, + LONG lIndex, IHTMLStyleSheet **ppnewStyleSheet) { - HTMLDocument *This = impl_from_IHTMLDocument2(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument2(iface); nsIDOMHTMLHeadElement *head_elem; IHTMLStyleElement *style_elem; HTMLElement *elem; @@ -2064,7 +2073,7 @@ static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR
TRACE("(%p)->(%s %ld %p)\n", This, debugstr_w(bstrHref), lIndex, ppnewStyleSheet);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { FIXME("not a real doc object\n"); return E_NOTIMPL; } @@ -2074,15 +2083,15 @@ static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR
if(bstrHref && *bstrHref) { FIXME("semi-stub for href %s\n", debugstr_w(bstrHref)); - return create_style_sheet(NULL, dispex_compat_mode(&This->doc_node->node.event_target.dispex), + return create_style_sheet(NULL, dispex_compat_mode(&This->node.event_target.dispex), ppnewStyleSheet); }
- hres = create_element(This->doc_node, L"style", &elem); + hres = create_element(This, L"style", &elem); if(FAILED(hres)) return hres;
- nsres = nsIDOMHTMLDocument_GetHead(This->doc_node->nsdoc, &head_elem); + nsres = nsIDOMHTMLDocument_GetHead(This->nsdoc, &head_elem); if(NS_SUCCEEDED(nsres)) { nsIDOMNode *head_node, *tmp_node;
@@ -2109,123 +2118,652 @@ static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR return hres; }
-static const IHTMLDocument2Vtbl HTMLDocumentVtbl = { - HTMLDocument_QueryInterface, - HTMLDocument_AddRef, - HTMLDocument_Release, - HTMLDocument_GetTypeInfoCount, - HTMLDocument_GetTypeInfo, - HTMLDocument_GetIDsOfNames, - HTMLDocument_Invoke, - HTMLDocument_get_Script, - HTMLDocument_get_all, - HTMLDocument_get_body, - HTMLDocument_get_activeElement, - HTMLDocument_get_images, - HTMLDocument_get_applets, - HTMLDocument_get_links, - HTMLDocument_get_forms, - HTMLDocument_get_anchors, - HTMLDocument_put_title, - HTMLDocument_get_title, - HTMLDocument_get_scripts, - HTMLDocument_put_designMode, - HTMLDocument_get_designMode, - HTMLDocument_get_selection, - HTMLDocument_get_readyState, - HTMLDocument_get_frames, - HTMLDocument_get_embeds, - HTMLDocument_get_plugins, - HTMLDocument_put_alinkColor, - HTMLDocument_get_alinkColor, - HTMLDocument_put_bgColor, - HTMLDocument_get_bgColor, - HTMLDocument_put_fgColor, - HTMLDocument_get_fgColor, - HTMLDocument_put_linkColor, - HTMLDocument_get_linkColor, - HTMLDocument_put_vlinkColor, - HTMLDocument_get_vlinkColor, - HTMLDocument_get_referrer, - HTMLDocument_get_location, - HTMLDocument_get_lastModified, - HTMLDocument_put_URL, - HTMLDocument_get_URL, - HTMLDocument_put_domain, - HTMLDocument_get_domain, - HTMLDocument_put_cookie, - HTMLDocument_get_cookie, - HTMLDocument_put_expando, - HTMLDocument_get_expando, - HTMLDocument_put_charset, - HTMLDocument_get_charset, - HTMLDocument_put_defaultCharset, - HTMLDocument_get_defaultCharset, - HTMLDocument_get_mimeType, - HTMLDocument_get_fileSize, - HTMLDocument_get_fileCreatedDate, - HTMLDocument_get_fileModifiedDate, - HTMLDocument_get_fileUpdatedDate, - HTMLDocument_get_security, - HTMLDocument_get_protocol, - HTMLDocument_get_nameProp, - HTMLDocument_write, - HTMLDocument_writeln, - HTMLDocument_open, - HTMLDocument_close, - HTMLDocument_clear, - HTMLDocument_queryCommandSupported, - HTMLDocument_queryCommandEnabled, - HTMLDocument_queryCommandState, - HTMLDocument_queryCommandIndeterm, - HTMLDocument_queryCommandText, - HTMLDocument_queryCommandValue, - HTMLDocument_execCommand, - HTMLDocument_execCommandShowHelp, - HTMLDocument_createElement, - HTMLDocument_put_onhelp, - HTMLDocument_get_onhelp, - HTMLDocument_put_onclick, - HTMLDocument_get_onclick, - HTMLDocument_put_ondblclick, - HTMLDocument_get_ondblclick, - HTMLDocument_put_onkeyup, - HTMLDocument_get_onkeyup, - HTMLDocument_put_onkeydown, - HTMLDocument_get_onkeydown, - HTMLDocument_put_onkeypress, - HTMLDocument_get_onkeypress, - HTMLDocument_put_onmouseup, - HTMLDocument_get_onmouseup, - HTMLDocument_put_onmousedown, - HTMLDocument_get_onmousedown, - HTMLDocument_put_onmousemove, - HTMLDocument_get_onmousemove, - HTMLDocument_put_onmouseout, - HTMLDocument_get_onmouseout, - HTMLDocument_put_onmouseover, - HTMLDocument_get_onmouseover, - HTMLDocument_put_onreadystatechange, - HTMLDocument_get_onreadystatechange, - HTMLDocument_put_onafterupdate, - HTMLDocument_get_onafterupdate, - HTMLDocument_put_onrowexit, - HTMLDocument_get_onrowexit, - HTMLDocument_put_onrowenter, - HTMLDocument_get_onrowenter, - HTMLDocument_put_ondragstart, - HTMLDocument_get_ondragstart, - HTMLDocument_put_onselectstart, - HTMLDocument_get_onselectstart, - HTMLDocument_elementFromPoint, - HTMLDocument_get_parentWindow, - HTMLDocument_get_styleSheets, - HTMLDocument_put_onbeforeupdate, - HTMLDocument_get_onbeforeupdate, - HTMLDocument_put_onerrorupdate, - HTMLDocument_get_onerrorupdate, - HTMLDocument_toString, - HTMLDocument_createStyleSheet +static const IHTMLDocument2Vtbl DocNodeHTMLDocument2Vtbl = { + DocNodeHTMLDocument2_QueryInterface, + DocNodeHTMLDocument2_AddRef, + DocNodeHTMLDocument2_Release, + DocNodeHTMLDocument2_GetTypeInfoCount, + DocNodeHTMLDocument2_GetTypeInfo, + DocNodeHTMLDocument2_GetIDsOfNames, + DocNodeHTMLDocument2_Invoke, + DocNodeHTMLDocument2_get_Script, + DocNodeHTMLDocument2_get_all, + DocNodeHTMLDocument2_get_body, + DocNodeHTMLDocument2_get_activeElement, + DocNodeHTMLDocument2_get_images, + DocNodeHTMLDocument2_get_applets, + DocNodeHTMLDocument2_get_links, + DocNodeHTMLDocument2_get_forms, + DocNodeHTMLDocument2_get_anchors, + DocNodeHTMLDocument2_put_title, + DocNodeHTMLDocument2_get_title, + DocNodeHTMLDocument2_get_scripts, + DocNodeHTMLDocument2_put_designMode, + DocNodeHTMLDocument2_get_designMode, + DocNodeHTMLDocument2_get_selection, + DocNodeHTMLDocument2_get_readyState, + DocNodeHTMLDocument2_get_frames, + DocNodeHTMLDocument2_get_embeds, + DocNodeHTMLDocument2_get_plugins, + DocNodeHTMLDocument2_put_alinkColor, + DocNodeHTMLDocument2_get_alinkColor, + DocNodeHTMLDocument2_put_bgColor, + DocNodeHTMLDocument2_get_bgColor, + DocNodeHTMLDocument2_put_fgColor, + DocNodeHTMLDocument2_get_fgColor, + DocNodeHTMLDocument2_put_linkColor, + DocNodeHTMLDocument2_get_linkColor, + DocNodeHTMLDocument2_put_vlinkColor, + DocNodeHTMLDocument2_get_vlinkColor, + DocNodeHTMLDocument2_get_referrer, + DocNodeHTMLDocument2_get_location, + DocNodeHTMLDocument2_get_lastModified, + DocNodeHTMLDocument2_put_URL, + DocNodeHTMLDocument2_get_URL, + DocNodeHTMLDocument2_put_domain, + DocNodeHTMLDocument2_get_domain, + DocNodeHTMLDocument2_put_cookie, + DocNodeHTMLDocument2_get_cookie, + DocNodeHTMLDocument2_put_expando, + DocNodeHTMLDocument2_get_expando, + DocNodeHTMLDocument2_put_charset, + DocNodeHTMLDocument2_get_charset, + DocNodeHTMLDocument2_put_defaultCharset, + DocNodeHTMLDocument2_get_defaultCharset, + DocNodeHTMLDocument2_get_mimeType, + DocNodeHTMLDocument2_get_fileSize, + DocNodeHTMLDocument2_get_fileCreatedDate, + DocNodeHTMLDocument2_get_fileModifiedDate, + DocNodeHTMLDocument2_get_fileUpdatedDate, + DocNodeHTMLDocument2_get_security, + DocNodeHTMLDocument2_get_protocol, + DocNodeHTMLDocument2_get_nameProp, + DocNodeHTMLDocument2_write, + DocNodeHTMLDocument2_writeln, + DocNodeHTMLDocument2_open, + DocNodeHTMLDocument2_close, + DocNodeHTMLDocument2_clear, + DocNodeHTMLDocument2_queryCommandSupported, + DocNodeHTMLDocument2_queryCommandEnabled, + DocNodeHTMLDocument2_queryCommandState, + DocNodeHTMLDocument2_queryCommandIndeterm, + DocNodeHTMLDocument2_queryCommandText, + DocNodeHTMLDocument2_queryCommandValue, + DocNodeHTMLDocument2_execCommand, + DocNodeHTMLDocument2_execCommandShowHelp, + DocNodeHTMLDocument2_createElement, + DocNodeHTMLDocument2_put_onhelp, + DocNodeHTMLDocument2_get_onhelp, + DocNodeHTMLDocument2_put_onclick, + DocNodeHTMLDocument2_get_onclick, + DocNodeHTMLDocument2_put_ondblclick, + DocNodeHTMLDocument2_get_ondblclick, + DocNodeHTMLDocument2_put_onkeyup, + DocNodeHTMLDocument2_get_onkeyup, + DocNodeHTMLDocument2_put_onkeydown, + DocNodeHTMLDocument2_get_onkeydown, + DocNodeHTMLDocument2_put_onkeypress, + DocNodeHTMLDocument2_get_onkeypress, + DocNodeHTMLDocument2_put_onmouseup, + DocNodeHTMLDocument2_get_onmouseup, + DocNodeHTMLDocument2_put_onmousedown, + DocNodeHTMLDocument2_get_onmousedown, + DocNodeHTMLDocument2_put_onmousemove, + DocNodeHTMLDocument2_get_onmousemove, + DocNodeHTMLDocument2_put_onmouseout, + DocNodeHTMLDocument2_get_onmouseout, + DocNodeHTMLDocument2_put_onmouseover, + DocNodeHTMLDocument2_get_onmouseover, + DocNodeHTMLDocument2_put_onreadystatechange, + DocNodeHTMLDocument2_get_onreadystatechange, + DocNodeHTMLDocument2_put_onafterupdate, + DocNodeHTMLDocument2_get_onafterupdate, + DocNodeHTMLDocument2_put_onrowexit, + DocNodeHTMLDocument2_get_onrowexit, + DocNodeHTMLDocument2_put_onrowenter, + DocNodeHTMLDocument2_get_onrowenter, + DocNodeHTMLDocument2_put_ondragstart, + DocNodeHTMLDocument2_get_ondragstart, + DocNodeHTMLDocument2_put_onselectstart, + DocNodeHTMLDocument2_get_onselectstart, + DocNodeHTMLDocument2_elementFromPoint, + DocNodeHTMLDocument2_get_parentWindow, + DocNodeHTMLDocument2_get_styleSheets, + DocNodeHTMLDocument2_put_onbeforeupdate, + DocNodeHTMLDocument2_get_onbeforeupdate, + DocNodeHTMLDocument2_put_onerrorupdate, + DocNodeHTMLDocument2_get_onerrorupdate, + DocNodeHTMLDocument2_toString, + DocNodeHTMLDocument2_createStyleSheet +}; + +static inline HTMLDocumentObj *HTMLDocumentObj_from_IHTMLDocument2(IHTMLDocument2 *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocumentObj, IHTMLDocument2_iface); +} + +HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument2) + +static HRESULT WINAPI DocObjHTMLDocument2_get_Script(IHTMLDocument2 *iface, IDispatch **p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + hres = IHTMLDocument7_get_parentWindow(&This->basedoc.IHTMLDocument7_iface, (IHTMLWindow2**)p); + return hres == S_OK && !*p ? E_PENDING : hres; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_all, IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_body, IHTMLElement**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_activeElement, IHTMLElement**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_images, IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_applets, IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_links, IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_forms, IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_anchors, IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_title, BSTR) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_title, BSTR*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_scripts, IHTMLElementCollection**) + +static HRESULT WINAPI DocObjHTMLDocument2_put_designMode(IHTMLDocument2 *iface, BSTR v) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + HRESULT hres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + if(wcsicmp(v, L"on")) { + FIXME("Unsupported arg %s\n", debugstr_w(v)); + return E_NOTIMPL; + } + + hres = setup_edit_mode(This); + if(FAILED(hres)) + return hres; + + call_property_onchanged(&This->cp_container, DISPID_IHTMLDOCUMENT2_DESIGNMODE); + return S_OK; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_designMode(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + + FIXME("(%p)->(%p) always returning Off\n", This, p); + + if(!p) + return E_INVALIDARG; + + *p = SysAllocString(L"Off"); + + return S_OK; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_selection, IHTMLSelectionObject**) + +static HRESULT WINAPI DocObjHTMLDocument2_get_readyState(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + + TRACE("(%p)->(%p)\n", iface, p); + + if(!p) + return E_POINTER; + + return get_readystate_string(This->basedoc.window ? This->basedoc.window->readystate : 0, p); +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_frames(IHTMLDocument2 *iface, IHTMLFramesCollection2 **p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + + TRACE("(%p)->(%p)\n", This, p); + + if(!This->basedoc.window) { + /* Not implemented by IE */ + return E_NOTIMPL; + } + return IHTMLWindow2_get_frames(&This->basedoc.window->base.IHTMLWindow2_iface, p); +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_embeds, IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_plugins, IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_alinkColor, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_alinkColor, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_bgColor, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_bgColor, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_fgColor, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_fgColor, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_linkColor, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_linkColor, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_vlinkColor, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_vlinkColor, VARIANT*) + +static HRESULT WINAPI DocObjHTMLDocument2_get_referrer(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + + FIXME("(%p)->(%p)\n", This, p); + + *p = NULL; + return S_OK; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_location(IHTMLDocument2 *iface, IHTMLLocation **p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + + TRACE("(%p)->(%p)\n", This, p); + + if(!This->basedoc.window || !This->basedoc.window->base.inner_window) { + WARN("NULL window\n"); + return E_UNEXPECTED; + } + + return IHTMLWindow2_get_location(&This->basedoc.window->base.inner_window->base.IHTMLWindow2_iface, p); +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_lastModified, BSTR*) + +static HRESULT WINAPI DocObjHTMLDocument2_put_URL(IHTMLDocument2 *iface, BSTR v) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + if(!This->basedoc.window) { + FIXME("No window available\n"); + return E_FAIL; + } + + return navigate_url(This->basedoc.window, v, This->basedoc.window->uri, BINDING_NAVIGATED); +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_URL(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + + TRACE("(%p)->(%p)\n", iface, p); + + *p = SysAllocString(This->basedoc.window && This->basedoc.window->url ? This->basedoc.window->url : L"about:blank"); + return *p ? S_OK : E_OUTOFMEMORY; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_domain, BSTR) + +static HRESULT WINAPI DocObjHTMLDocument2_get_domain(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + nsresult nsres = NS_ERROR_FAILURE; + nsAString nsstr; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&nsstr, NULL); + + if(This->basedoc.doc_node) + nsres = nsIDOMHTMLDocument_GetDomain(This->basedoc.doc_node->nsdoc, &nsstr); + if(NS_SUCCEEDED(nsres) && This->basedoc.window && This->basedoc.window->uri) { + const PRUnichar *str; + HRESULT hres; + + nsAString_GetData(&nsstr, &str); + if(!*str) { + TRACE("Gecko returned empty string, fallback to loaded URL.\n"); + nsAString_Finish(&nsstr); + hres = IUri_GetHost(This->basedoc.window->uri, p); + return FAILED(hres) ? hres : S_OK; + } + } + + return return_nsstr(nsres, &nsstr, p); +} + +static HRESULT WINAPI DocObjHTMLDocument2_put_cookie(IHTMLDocument2 *iface, BSTR v) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + BOOL bret; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + if(!This->basedoc.window) + return S_OK; + + bret = InternetSetCookieExW(This->basedoc.window->url, NULL, v, 0, 0); + if(!bret) { + FIXME("InternetSetCookieExW failed: %lu\n", GetLastError()); + return HRESULT_FROM_WIN32(GetLastError()); + } + + return S_OK; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_cookie(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + DWORD size; + BOOL bret; + + TRACE("(%p)->(%p)\n", This, p); + + if(!This->basedoc.window) { + *p = NULL; + return S_OK; + } + + size = 0; + bret = InternetGetCookieExW(This->basedoc.window->url, NULL, NULL, &size, 0, NULL); + if(!bret && GetLastError() != ERROR_INSUFFICIENT_BUFFER) { + WARN("InternetGetCookieExW failed: %lu\n", GetLastError()); + *p = NULL; + return S_OK; + } + + if(!size) { + *p = NULL; + return S_OK; + } + + *p = SysAllocStringLen(NULL, size/sizeof(WCHAR)-1); + if(!*p) + return E_OUTOFMEMORY; + + bret = InternetGetCookieExW(This->basedoc.window->url, NULL, *p, &size, 0, NULL); + if(!bret) { + ERR("InternetGetCookieExW failed: %lu\n", GetLastError()); + return E_FAIL; + } + + return S_OK; +} + +static HRESULT WINAPI DocObjHTMLDocument2_put_expando(IHTMLDocument2 *iface, VARIANT_BOOL v) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%x)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_expando(IHTMLDocument2 *iface, VARIANT_BOOL *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_charset, BSTR) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_charset, BSTR*) + +static HRESULT WINAPI DocObjHTMLDocument2_put_defaultCharset(IHTMLDocument2 *iface, BSTR v) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_defaultCharset(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + + TRACE("(%p)->(%p)\n", This, p); + + *p = charset_string_from_cp(GetACP()); + return *p ? S_OK : E_OUTOFMEMORY; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_mimeType(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_fileSize(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_fileCreatedDate(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_fileModifiedDate(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_fileUpdatedDate(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_security(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_protocol(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument2_get_nameProp(IHTMLDocument2 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, write, SAFEARRAY*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, writeln, SAFEARRAY*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_5(HTMLDocument2, open, BSTR,VARIANT,VARIANT,VARIANT,IDispatch**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_0(HTMLDocument2, close) +HTMLDOCUMENTOBJ_FWD_TO_NODE_0(HTMLDocument2, clear) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2, queryCommandSupported, BSTR,VARIANT_BOOL*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2, queryCommandEnabled, BSTR,VARIANT_BOOL*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2, queryCommandState, BSTR,VARIANT_BOOL*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2, queryCommandIndeterm, BSTR,VARIANT_BOOL*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2, queryCommandText, BSTR,BSTR*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2, queryCommandValue, BSTR,VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_4(HTMLDocument2, execCommand, BSTR,VARIANT_BOOL,VARIANT,VARIANT_BOOL*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2, execCommandShowHelp, BSTR,VARIANT_BOOL*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument2, createElement, BSTR,IHTMLElement**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onhelp, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onhelp, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onclick, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onclick, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_ondblclick, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_ondblclick, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onkeyup, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onkeyup, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onkeydown, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onkeydown, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onkeypress, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onkeypress, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onmouseup, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onmouseup, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onmousedown, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onmousedown, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onmousemove, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onmousemove, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onmouseout, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onmouseout, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onmouseover, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onmouseover, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onreadystatechange, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onreadystatechange, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onafterupdate, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onafterupdate, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onrowexit, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onrowexit, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onrowenter, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onrowenter, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_ondragstart, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_ondragstart, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onselectstart, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onselectstart, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument2, elementFromPoint, LONG,LONG,IHTMLElement**) + +static HRESULT WINAPI DocObjHTMLDocument2_get_parentWindow(IHTMLDocument2 *iface, IHTMLWindow2 **p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + hres = IHTMLDocument7_get_defaultView(&This->basedoc.IHTMLDocument7_iface, p); + return hres == S_OK && !*p ? E_FAIL : hres; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_styleSheets, IHTMLStyleSheetsCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onbeforeupdate, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onbeforeupdate, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, put_onerrorupdate, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument2, get_onerrorupdate, VARIANT*) + +static HRESULT WINAPI DocObjHTMLDocument2_toString(IHTMLDocument2 *iface, BSTR *String) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument2(iface); + + TRACE("(%p)->(%p)\n", This, String); + + return dispex_to_string(&This->dispex, String); +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument2, createStyleSheet, BSTR,LONG,IHTMLStyleSheet**) + +static const IHTMLDocument2Vtbl DocObjHTMLDocument2Vtbl = { + DocObjHTMLDocument2_QueryInterface, + DocObjHTMLDocument2_AddRef, + DocObjHTMLDocument2_Release, + DocObjHTMLDocument2_GetTypeInfoCount, + DocObjHTMLDocument2_GetTypeInfo, + DocObjHTMLDocument2_GetIDsOfNames, + DocObjHTMLDocument2_Invoke, + DocObjHTMLDocument2_get_Script, + DocObjHTMLDocument2_get_all, + DocObjHTMLDocument2_get_body, + DocObjHTMLDocument2_get_activeElement, + DocObjHTMLDocument2_get_images, + DocObjHTMLDocument2_get_applets, + DocObjHTMLDocument2_get_links, + DocObjHTMLDocument2_get_forms, + DocObjHTMLDocument2_get_anchors, + DocObjHTMLDocument2_put_title, + DocObjHTMLDocument2_get_title, + DocObjHTMLDocument2_get_scripts, + DocObjHTMLDocument2_put_designMode, + DocObjHTMLDocument2_get_designMode, + DocObjHTMLDocument2_get_selection, + DocObjHTMLDocument2_get_readyState, + DocObjHTMLDocument2_get_frames, + DocObjHTMLDocument2_get_embeds, + DocObjHTMLDocument2_get_plugins, + DocObjHTMLDocument2_put_alinkColor, + DocObjHTMLDocument2_get_alinkColor, + DocObjHTMLDocument2_put_bgColor, + DocObjHTMLDocument2_get_bgColor, + DocObjHTMLDocument2_put_fgColor, + DocObjHTMLDocument2_get_fgColor, + DocObjHTMLDocument2_put_linkColor, + DocObjHTMLDocument2_get_linkColor, + DocObjHTMLDocument2_put_vlinkColor, + DocObjHTMLDocument2_get_vlinkColor, + DocObjHTMLDocument2_get_referrer, + DocObjHTMLDocument2_get_location, + DocObjHTMLDocument2_get_lastModified, + DocObjHTMLDocument2_put_URL, + DocObjHTMLDocument2_get_URL, + DocObjHTMLDocument2_put_domain, + DocObjHTMLDocument2_get_domain, + DocObjHTMLDocument2_put_cookie, + DocObjHTMLDocument2_get_cookie, + DocObjHTMLDocument2_put_expando, + DocObjHTMLDocument2_get_expando, + DocObjHTMLDocument2_put_charset, + DocObjHTMLDocument2_get_charset, + DocObjHTMLDocument2_put_defaultCharset, + DocObjHTMLDocument2_get_defaultCharset, + DocObjHTMLDocument2_get_mimeType, + DocObjHTMLDocument2_get_fileSize, + DocObjHTMLDocument2_get_fileCreatedDate, + DocObjHTMLDocument2_get_fileModifiedDate, + DocObjHTMLDocument2_get_fileUpdatedDate, + DocObjHTMLDocument2_get_security, + DocObjHTMLDocument2_get_protocol, + DocObjHTMLDocument2_get_nameProp, + DocObjHTMLDocument2_write, + DocObjHTMLDocument2_writeln, + DocObjHTMLDocument2_open, + DocObjHTMLDocument2_close, + DocObjHTMLDocument2_clear, + DocObjHTMLDocument2_queryCommandSupported, + DocObjHTMLDocument2_queryCommandEnabled, + DocObjHTMLDocument2_queryCommandState, + DocObjHTMLDocument2_queryCommandIndeterm, + DocObjHTMLDocument2_queryCommandText, + DocObjHTMLDocument2_queryCommandValue, + DocObjHTMLDocument2_execCommand, + DocObjHTMLDocument2_execCommandShowHelp, + DocObjHTMLDocument2_createElement, + DocObjHTMLDocument2_put_onhelp, + DocObjHTMLDocument2_get_onhelp, + DocObjHTMLDocument2_put_onclick, + DocObjHTMLDocument2_get_onclick, + DocObjHTMLDocument2_put_ondblclick, + DocObjHTMLDocument2_get_ondblclick, + DocObjHTMLDocument2_put_onkeyup, + DocObjHTMLDocument2_get_onkeyup, + DocObjHTMLDocument2_put_onkeydown, + DocObjHTMLDocument2_get_onkeydown, + DocObjHTMLDocument2_put_onkeypress, + DocObjHTMLDocument2_get_onkeypress, + DocObjHTMLDocument2_put_onmouseup, + DocObjHTMLDocument2_get_onmouseup, + DocObjHTMLDocument2_put_onmousedown, + DocObjHTMLDocument2_get_onmousedown, + DocObjHTMLDocument2_put_onmousemove, + DocObjHTMLDocument2_get_onmousemove, + DocObjHTMLDocument2_put_onmouseout, + DocObjHTMLDocument2_get_onmouseout, + DocObjHTMLDocument2_put_onmouseover, + DocObjHTMLDocument2_get_onmouseover, + DocObjHTMLDocument2_put_onreadystatechange, + DocObjHTMLDocument2_get_onreadystatechange, + DocObjHTMLDocument2_put_onafterupdate, + DocObjHTMLDocument2_get_onafterupdate, + DocObjHTMLDocument2_put_onrowexit, + DocObjHTMLDocument2_get_onrowexit, + DocObjHTMLDocument2_put_onrowenter, + DocObjHTMLDocument2_get_onrowenter, + DocObjHTMLDocument2_put_ondragstart, + DocObjHTMLDocument2_get_ondragstart, + DocObjHTMLDocument2_put_onselectstart, + DocObjHTMLDocument2_get_onselectstart, + DocObjHTMLDocument2_elementFromPoint, + DocObjHTMLDocument2_get_parentWindow, + DocObjHTMLDocument2_get_styleSheets, + DocObjHTMLDocument2_put_onbeforeupdate, + DocObjHTMLDocument2_get_onbeforeupdate, + DocObjHTMLDocument2_put_onerrorupdate, + DocObjHTMLDocument2_get_onerrorupdate, + DocObjHTMLDocument2_toString, + DocObjHTMLDocument2_createStyleSheet };
static inline HTMLDocument *impl_from_IHTMLDocument3(IHTMLDocument3 *iface) @@ -2602,7 +3140,7 @@ static HRESULT WINAPI HTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface if(FAILED(hres)) return hres;
- *ppNewDoc = &docnode->basedoc.IHTMLDocument2_iface; + *ppNewDoc = &docnode->IHTMLDocument2_iface; return S_OK; }
@@ -3756,7 +4294,7 @@ static HRESULT WINAPI HTMLDocument7_createElement(IHTMLDocument7 *iface, BSTR bs
TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrTag), newElem);
- return IHTMLDocument2_createElement(&This->IHTMLDocument2_iface, bstrTag, newElem); + return IHTMLDocument2_createElement(&This->doc_node->IHTMLDocument2_iface, bstrTag, newElem); }
static HRESULT WINAPI HTMLDocument7_createAttribute(IHTMLDocument7 *iface, BSTR bstrAttrName, IHTMLDOMAttribute **ppAttribute) @@ -3831,7 +4369,7 @@ static HRESULT WINAPI HTMLDocument7_get_all(IHTMLDocument7 *iface, IHTMLElementC
TRACE("(%p)->(%p)\n", This, p);
- return IHTMLDocument2_get_all(&This->IHTMLDocument2_iface, p); + return IHTMLDocument2_get_all(&This->doc_node->IHTMLDocument2_iface, p); }
static HRESULT WINAPI HTMLDocument7_get_inputEncoding(IHTMLDocument7 *iface, BSTR *p) @@ -4478,7 +5016,7 @@ static HRESULT WINAPI HTMLDocument7_get_body(IHTMLDocument7 *iface, IHTMLElement
TRACE("(%p)->(%p)\n", This, p);
- return IHTMLDocument2_get_body(&This->IHTMLDocument2_iface, p); + return IHTMLDocument2_get_body(&This->doc_node->IHTMLDocument2_iface, p); }
static HRESULT WINAPI HTMLDocument7_get_head(IHTMLDocument7 *iface, IHTMLElement **p) @@ -4841,7 +5379,7 @@ static const IDocumentEventVtbl DocNodeDocumentEventVtbl = {
static void HTMLDocumentNode_on_advise(IUnknown *iface, cp_static_data_t *cp) { - HTMLDocumentNode *This = CONTAINING_RECORD((IHTMLDocument2*)iface, HTMLDocumentNode, basedoc.IHTMLDocument2_iface); + HTMLDocumentNode *This = CONTAINING_RECORD((IHTMLDocument2*)iface, HTMLDocumentNode, IHTMLDocument2_iface);
if(This->basedoc.window) update_doc_cp_events(This, cp); @@ -6038,16 +6576,10 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) { *ppv = NULL;
- if(IsEqualGUID(&IID_IUnknown, riid)) - *ppv = &This->IHTMLDocument2_iface; - else if(IsEqualGUID(&IID_IDispatch, riid)) + if(IsEqualGUID(&IID_IDispatch, riid)) *ppv = &This->IDispatchEx_iface; else if(IsEqualGUID(&IID_IDispatchEx, riid)) *ppv = &This->IDispatchEx_iface; - else if(IsEqualGUID(&IID_IHTMLDocument, riid)) - *ppv = &This->IHTMLDocument2_iface; - else if(IsEqualGUID(&IID_IHTMLDocument2, riid)) - *ppv = &This->IHTMLDocument2_iface; else if(IsEqualGUID(&IID_IHTMLDocument3, riid)) *ppv = &This->IHTMLDocument3_iface; else if(IsEqualGUID(&IID_IHTMLDocument4, riid)) @@ -6058,8 +6590,6 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) *ppv = &This->IHTMLDocument6_iface; else if(IsEqualGUID(&IID_IHTMLDocument7, riid)) *ppv = &This->IHTMLDocument7_iface; - else if(IsEqualGUID(&DIID_DispHTMLDocument, riid)) - *ppv = &This->IHTMLDocument2_iface; else return FALSE;
@@ -6081,7 +6611,6 @@ static const cpc_entry_t HTMLDocumentNode_cpc[] = {
static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex) { - doc->IHTMLDocument2_iface.lpVtbl = &HTMLDocumentVtbl; doc->IHTMLDocument3_iface.lpVtbl = &HTMLDocument3Vtbl; doc->IHTMLDocument4_iface.lpVtbl = &HTMLDocument4Vtbl; doc->IHTMLDocument5_iface.lpVtbl = &HTMLDocument5Vtbl; @@ -6107,10 +6636,16 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) if(htmldoc_qi(&This->basedoc, riid, ppv)) return *ppv ? S_OK : E_NOINTERFACE;
- if(IsEqualGUID(&IID_IDocumentSelector, riid)) + if(IsEqualGUID(&IID_IUnknown, riid)) + *ppv = &This->IHTMLDocument2_iface; + else if(IsEqualGUID(&IID_IHTMLDocument, riid) || IsEqualGUID(&IID_IHTMLDocument2, riid)) + *ppv = &This->IHTMLDocument2_iface; + else if(IsEqualGUID(&IID_IDocumentSelector, riid)) *ppv = &This->IDocumentSelector_iface; else if(IsEqualGUID(&IID_IDocumentEvent, riid)) *ppv = &This->IDocumentEvent_iface; + else if(IsEqualGUID(&DIID_DispHTMLDocument, riid)) + *ppv = &This->IHTMLDocument2_iface; else if(IsEqualGUID(&IID_ISupportErrorInfo, riid)) *ppv = &This->ISupportErrorInfo_iface; else if(IsEqualGUID(&IID_IProvideClassInfo, riid)) @@ -6569,6 +7104,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo return NULL;
doc->ref = 1; + doc->IHTMLDocument2_iface.lpVtbl = &DocNodeHTMLDocument2Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocNodeDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocNodeDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocNodeSupportErrorInfoVtbl; @@ -6585,7 +7121,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo
init_doc(&doc->basedoc, (IUnknown*)&doc->node.IHTMLDOMNode_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->IHTMLDocument2_iface, HTMLDocumentNode_cpc); HTMLDocumentNode_Persist_Init(doc); HTMLDocumentNode_Service_Init(doc); HTMLDocumentNode_OleCmd_Init(doc); @@ -6698,12 +7234,16 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii *ppv = &This->IUnknown_inner; }else if(htmldoc_qi(&This->basedoc, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IHTMLDocument, riid) || IsEqualGUID(&IID_IHTMLDocument2, riid)) { + *ppv = &This->IHTMLDocument2_iface; }else if(IsEqualGUID(&IID_ICustomDoc, riid)) { *ppv = &This->ICustomDoc_iface; }else if(IsEqualGUID(&IID_IDocumentSelector, riid)) { *ppv = &This->IDocumentSelector_iface; }else if(IsEqualGUID(&IID_IDocumentEvent, riid)) { *ppv = &This->IDocumentEvent_iface; + }else if(IsEqualGUID(&DIID_DispHTMLDocument, riid)) { + *ppv = &This->IHTMLDocument2_iface; }else if(IsEqualGUID(&IID_ISupportErrorInfo, riid)) { *ppv = &This->ISupportErrorInfo_iface; }else if(IsEqualGUID(&IID_IProvideClassInfo, riid)) { @@ -7006,6 +7546,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii doc->ref = 1; doc->IUnknown_inner.lpVtbl = &HTMLDocumentObjVtbl; doc->ICustomDoc_iface.lpVtbl = &CustomDocVtbl; + doc->IHTMLDocument2_iface.lpVtbl = &DocObjHTMLDocument2Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocObjDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocObjDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocObjSupportErrorInfoVtbl; diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 856f55da6c7..4a8ba9cc855 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1811,7 +1811,7 @@ static HRESULT WINAPI HTMLElement_get_document(IHTMLElement *iface, IDispatch ** if(This->node.vtbl->get_document) return This->node.vtbl->get_document(&This->node, p);
- *p = (IDispatch*)&This->node.doc->basedoc.IHTMLDocument2_iface; + *p = (IDispatch*)&This->node.doc->IHTMLDocument2_iface; IDispatch_AddRef(*p); return S_OK; } diff --git a/dlls/mshtml/htmlframe.c b/dlls/mshtml/htmlframe.c index 985ac13cc2f..707de8eebaa 100644 --- a/dlls/mshtml/htmlframe.c +++ b/dlls/mshtml/htmlframe.c @@ -655,7 +655,7 @@ static HRESULT WINAPI HTMLFrameBase2_get_readyState(IHTMLFrameBase2 *iface, BSTR return E_FAIL; }
- return IHTMLDocument2_get_readyState(&This->content_window->base.inner_window->doc->basedoc.IHTMLDocument2_iface, p); + return IHTMLDocument2_get_readyState(&This->content_window->base.inner_window->doc->IHTMLDocument2_iface, p); }
static HRESULT WINAPI HTMLFrameBase2_put_allowTransparency(IHTMLFrameBase2 *iface, VARIANT_BOOL v) @@ -919,7 +919,7 @@ static HRESULT HTMLFrameElement_get_document(HTMLDOMNode *iface, IDispatch **p) return S_OK; }
- *p = (IDispatch*)&This->framebase.content_window->base.inner_window->doc->basedoc.IHTMLDocument2_iface; + *p = (IDispatch*)&This->framebase.content_window->base.inner_window->doc->IHTMLDocument2_iface; IDispatch_AddRef(*p); return S_OK; } @@ -1512,7 +1512,7 @@ static HRESULT HTMLIFrame_get_document(HTMLDOMNode *iface, IDispatch **p) return S_OK; }
- *p = (IDispatch*)&This->framebase.content_window->base.inner_window->doc->basedoc.IHTMLDocument2_iface; + *p = (IDispatch*)&This->framebase.content_window->base.inner_window->doc->IHTMLDocument2_iface; IDispatch_AddRef(*p); return S_OK; } diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index e1b8e0aca7c..2e04c2fa94a 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -1147,7 +1147,7 @@ static HRESULT WINAPI HTMLDOMNode2_get_ownerDocument(IHTMLDOMNode2 *iface, IDisp if(This == &This->doc->node) { *p = NULL; }else { - *p = (IDispatch*)&This->doc->basedoc.IHTMLDocument2_iface; + *p = (IDispatch*)&This->doc->IHTMLDocument2_iface; IDispatch_AddRef(*p); } return S_OK; diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index bdfcaca729c..9a4df87b529 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -1256,7 +1256,7 @@ static HRESULT WINAPI HTMLWindow2_get_document(IHTMLWindow2 *iface, IHTMLDocumen
if(This->inner_window->doc) { /* FIXME: We should return a wrapper object here */ - *p = &This->inner_window->doc->basedoc.IHTMLDocument2_iface; + *p = &This->inner_window->doc->IHTMLDocument2_iface; IHTMLDocument2_AddRef(*p); }else { *p = NULL; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index cfbb1a2bfbc..9ce987edef0 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -640,7 +640,6 @@ struct ConnectionPoint { };
struct HTMLDocument { - IHTMLDocument2 IHTMLDocument2_iface; IHTMLDocument3 IHTMLDocument3_iface; IHTMLDocument4 IHTMLDocument4_iface; IHTMLDocument5 IHTMLDocument5_iface; @@ -677,6 +676,7 @@ struct HTMLDocumentObj { DispatchEx dispex; IUnknown IUnknown_inner; ICustomDoc ICustomDoc_iface; + IHTMLDocument2 IHTMLDocument2_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface; @@ -896,6 +896,7 @@ struct HTMLDocumentNode { HTMLDOMNode node; HTMLDocument basedoc;
+ IHTMLDocument2 IHTMLDocument2_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface; diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c index 44211a6e0f2..6f0ca73a778 100644 --- a/dlls/mshtml/script.c +++ b/dlls/mshtml/script.c @@ -674,7 +674,7 @@ static HRESULT WINAPI ASServiceProvider_QueryService(IServiceProvider *iface, RE if(!This->window || !This->window->doc) return E_NOINTERFACE;
- return IHTMLDocument2_QueryInterface(&This->window->doc->basedoc.IHTMLDocument2_iface, riid, ppv); + return IHTMLDocument2_QueryInterface(&This->window->doc->IHTMLDocument2_iface, riid, ppv); }
FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); diff --git a/dlls/mshtml/service.c b/dlls/mshtml/service.c index 8f0fa0f691f..d909217fb4e 100644 --- a/dlls/mshtml/service.c +++ b/dlls/mshtml/service.c @@ -362,7 +362,7 @@ static HRESULT WINAPI DocNodeServiceProvider_QueryService(IServiceProvider *ifac
if(IsEqualGUID(&SID_SContainerDispatch, guidService)) { TRACE("SID_SContainerDispatch\n"); - return IHTMLDocument2_QueryInterface(&This->basedoc.IHTMLDocument2_iface, riid, ppv); + return IHTMLDocument2_QueryInterface(&This->IHTMLDocument2_iface, riid, ppv); }
return IServiceProvider_QueryService(&This->basedoc.doc_obj->IServiceProvider_iface, guidService, riid, ppv); @@ -422,7 +422,7 @@ static HRESULT WINAPI DocObjServiceProvider_QueryService(IServiceProvider *iface
if(IsEqualGUID(&SID_SContainerDispatch, guidService)) { TRACE("SID_SContainerDispatch\n"); - return IHTMLDocument2_QueryInterface(&This->basedoc.IHTMLDocument2_iface, riid, ppv); + return IHTMLDocument2_QueryInterface(&This->IHTMLDocument2_iface, riid, ppv); }
if(IsEqualGUID(&IID_IWindowForBindingUI, guidService)) { diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c index b66d6653ee0..96d3372174e 100644 --- a/dlls/mshtml/view.c +++ b/dlls/mshtml/view.c @@ -473,7 +473,7 @@ static HRESULT WINAPI OleDocumentView_GetDocument(IOleDocumentView *iface, IUnkn if(!ppunk) return E_INVALIDARG;
- *ppunk = (IUnknown*)&This->basedoc.IHTMLDocument2_iface; + *ppunk = (IUnknown*)&This->IHTMLDocument2_iface; IUnknown_AddRef(*ppunk); return S_OK; }
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmldoc.c | 555 ++++++++++++++++++++++------------- dlls/mshtml/htmlwindow.c | 4 +- dlls/mshtml/mshtml_private.h | 3 +- 3 files changed, 356 insertions(+), 206 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index af6a1a1a033..cf05323602d 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -2766,71 +2766,67 @@ static const IHTMLDocument2Vtbl DocObjHTMLDocument2Vtbl = { DocObjHTMLDocument2_createStyleSheet };
-static inline HTMLDocument *impl_from_IHTMLDocument3(IHTMLDocument3 *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IHTMLDocument3(IHTMLDocument3 *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument3_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument3_iface); }
-static HRESULT WINAPI HTMLDocument3_QueryInterface(IHTMLDocument3 *iface, - REFIID riid, void **ppv) +static HRESULT WINAPI DocNodeHTMLDocument3_QueryInterface(IHTMLDocument3 *iface, REFIID riid, void **ppv) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); - return htmldoc_query_interface(This, riid, ppv); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static ULONG WINAPI HTMLDocument3_AddRef(IHTMLDocument3 *iface) +static ULONG WINAPI DocNodeHTMLDocument3_AddRef(IHTMLDocument3 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI HTMLDocument3_Release(IHTMLDocument3 *iface) +static ULONG WINAPI DocNodeHTMLDocument3_Release(IHTMLDocument3 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI HTMLDocument3_GetTypeInfoCount(IHTMLDocument3 *iface, UINT *pctinfo) +static HRESULT WINAPI DocNodeHTMLDocument3_GetTypeInfoCount(IHTMLDocument3 *iface, UINT *pctinfo) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); + return IDispatchEx_GetTypeInfoCount(&This->basedoc.IDispatchEx_iface, pctinfo); }
-static HRESULT WINAPI HTMLDocument3_GetTypeInfo(IHTMLDocument3 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) +static HRESULT WINAPI DocNodeHTMLDocument3_GetTypeInfo(IHTMLDocument3 *iface, UINT iTInfo, LCID lcid, + ITypeInfo **ppTInfo) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); + return IDispatchEx_GetTypeInfo(&This->basedoc.IDispatchEx_iface, iTInfo, lcid, ppTInfo); }
-static HRESULT WINAPI HTMLDocument3_GetIDsOfNames(IHTMLDocument3 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) +static HRESULT WINAPI DocNodeHTMLDocument3_GetIDsOfNames(IHTMLDocument3 *iface, REFIID riid, LPOLESTR *rgszNames, + UINT cNames, LCID lcid, DISPID *rgDispId) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, - rgDispId); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); + return IDispatchEx_GetIDsOfNames(&This->basedoc.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); }
-static HRESULT WINAPI HTMLDocument3_Invoke(IHTMLDocument3 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +static HRESULT WINAPI DocNodeHTMLDocument3_Invoke(IHTMLDocument3 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, + WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); + return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); }
-static HRESULT WINAPI HTMLDocument3_releaseCapture(IHTMLDocument3 *iface) +static HRESULT WINAPI DocNodeHTMLDocument3_releaseCapture(IHTMLDocument3 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_recalc(IHTMLDocument3 *iface, VARIANT_BOOL fForce) +static HRESULT WINAPI DocNodeHTMLDocument3_recalc(IHTMLDocument3 *iface, VARIANT_BOOL fForce) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface);
WARN("(%p)->(%x)\n", This, fForce);
@@ -2838,10 +2834,9 @@ static HRESULT WINAPI HTMLDocument3_recalc(IHTMLDocument3 *iface, VARIANT_BOOL f return S_OK; }
-static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR text, - IHTMLDOMNode **newTextNode) +static HRESULT WINAPI DocNodeHTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR text, IHTMLDOMNode **newTextNode) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); nsIDOMText *nstext; HTMLDOMNode *node; nsAString text_str; @@ -2850,20 +2845,20 @@ static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR t
TRACE("(%p)->(%s %p)\n", This, debugstr_w(text), newTextNode);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
nsAString_InitDepend(&text_str, text); - nsres = nsIDOMHTMLDocument_CreateTextNode(This->doc_node->nsdoc, &text_str, &nstext); + nsres = nsIDOMHTMLDocument_CreateTextNode(This->nsdoc, &text_str, &nstext); nsAString_Finish(&text_str); if(NS_FAILED(nsres)) { ERR("CreateTextNode failed: %08lx\n", nsres); return E_FAIL; }
- hres = HTMLDOMTextNode_Create(This->doc_node, (nsIDOMNode*)nstext, &node); + hres = HTMLDOMTextNode_Create(This, (nsIDOMNode*)nstext, &node); nsIDOMText_Release(nstext); if(FAILED(hres)) return hres; @@ -2872,9 +2867,9 @@ static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR t return S_OK; }
-static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, IHTMLElement **p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_documentElement(IHTMLDocument3 *iface, IHTMLElement **p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); nsIDOMElement *nselem = NULL; HTMLElement *element; nsresult nsres; @@ -2882,17 +2877,17 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
TRACE("(%p)->(%p)\n", This, p);
- if(This->window && This->window->readystate == READYSTATE_UNINITIALIZED) { + if(This->basedoc.window && This->basedoc.window->readystate == READYSTATE_UNINITIALIZED) { *p = NULL; return S_OK; }
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
- nsres = nsIDOMHTMLDocument_GetDocumentElement(This->doc_node->nsdoc, &nselem); + nsres = nsIDOMHTMLDocument_GetDocumentElement(This->nsdoc, &nselem); if(NS_FAILED(nsres)) { ERR("GetDocumentElement failed: %08lx\n", nsres); return E_FAIL; @@ -2912,148 +2907,147 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I return hres; }
-static HRESULT WINAPI HTMLDocument3_get_uniqueID(IHTMLDocument3 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_uniqueID(IHTMLDocument3 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface);
TRACE("(%p)->(%p)\n", This, p);
- return elem_unique_id(++This->doc_node->unique_id, p); + return elem_unique_id(++This->unique_id, p); }
-static HRESULT WINAPI HTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR event, - IDispatch* pDisp, VARIANT_BOOL *pfResult) +static HRESULT WINAPI DocNodeHTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR event, IDispatch* pDisp, + VARIANT_BOOL *pfResult) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface);
TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
- return attach_event(&This->doc_node->node.event_target, event, pDisp, pfResult); + return attach_event(&This->node.event_target, event, pDisp, pfResult); }
-static HRESULT WINAPI HTMLDocument3_detachEvent(IHTMLDocument3 *iface, BSTR event, - IDispatch *pDisp) +static HRESULT WINAPI DocNodeHTMLDocument3_detachEvent(IHTMLDocument3 *iface, BSTR event, IDispatch *pDisp) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
- return detach_event(&This->doc_node->node.event_target, event, pDisp); + return detach_event(&This->node.event_target, event, pDisp); }
-static HRESULT WINAPI HTMLDocument3_put_onrowsdelete(IHTMLDocument3 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_onrowsdelete(IHTMLDocument3 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_onrowsdelete(IHTMLDocument3 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_onrowsdelete(IHTMLDocument3 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_put_onrowsinserted(IHTMLDocument3 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_onrowsinserted(IHTMLDocument3 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_onrowsinserted(IHTMLDocument3 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_onrowsinserted(IHTMLDocument3 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_put_oncellchange(IHTMLDocument3 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_oncellchange(IHTMLDocument3 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_oncellchange(IHTMLDocument3 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_oncellchange(IHTMLDocument3 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_put_ondatasetchanged(IHTMLDocument3 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_ondatasetchanged(IHTMLDocument3 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_ondatasetchanged(IHTMLDocument3 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_ondatasetchanged(IHTMLDocument3 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_put_ondataavailable(IHTMLDocument3 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_ondataavailable(IHTMLDocument3 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_ondataavailable(IHTMLDocument3 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_ondataavailable(IHTMLDocument3 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_put_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_put_onpropertychange(IHTMLDocument3 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_onpropertychange(IHTMLDocument3 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_onpropertychange(IHTMLDocument3 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_onpropertychange(IHTMLDocument3 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_put_dir(IHTMLDocument3 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_dir(IHTMLDocument3 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); nsAString dir_str; nsresult nsres;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { FIXME("NULL nsdoc\n"); return E_UNEXPECTED; }
nsAString_InitDepend(&dir_str, v); - nsres = nsIDOMHTMLDocument_SetDir(This->doc_node->nsdoc, &dir_str); + nsres = nsIDOMHTMLDocument_SetDir(This->nsdoc, &dir_str); nsAString_Finish(&dir_str); if(NS_FAILED(nsres)) { ERR("SetDir failed: %08lx\n", nsres); @@ -3063,60 +3057,59 @@ static HRESULT WINAPI HTMLDocument3_put_dir(IHTMLDocument3 *iface, BSTR v) return S_OK; }
-static HRESULT WINAPI HTMLDocument3_get_dir(IHTMLDocument3 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_dir(IHTMLDocument3 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); nsAString dir_str; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { FIXME("NULL nsdoc\n"); return E_UNEXPECTED; }
nsAString_Init(&dir_str, NULL); - nsres = nsIDOMHTMLDocument_GetDir(This->doc_node->nsdoc, &dir_str); + nsres = nsIDOMHTMLDocument_GetDir(This->nsdoc, &dir_str); return return_nsstr(nsres, &dir_str, p); }
-static HRESULT WINAPI HTMLDocument3_put_oncontextmenu(IHTMLDocument3 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_oncontextmenu(IHTMLDocument3 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface);
TRACE("(%p)->()\n", This);
- return set_doc_event(This, EVENTID_CONTEXTMENU, &v); + return set_doc_event(&This->basedoc, EVENTID_CONTEXTMENU, &v); }
-static HRESULT WINAPI HTMLDocument3_get_oncontextmenu(IHTMLDocument3 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_oncontextmenu(IHTMLDocument3 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_CONTEXTMENU, p); + return get_doc_event(&This->basedoc, EVENTID_CONTEXTMENU, p); }
-static HRESULT WINAPI HTMLDocument3_put_onstop(IHTMLDocument3 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_onstop(IHTMLDocument3 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_onstop(IHTMLDocument3 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_onstop(IHTMLDocument3 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface, - IHTMLDocument2 **ppNewDoc) +static HRESULT WINAPI DocNodeHTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface, IHTMLDocument2 **ppNewDoc) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); nsIDOMDocumentFragment *doc_frag; HTMLDocumentNode *docnode; nsresult nsres; @@ -3124,18 +3117,18 @@ static HRESULT WINAPI HTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface
TRACE("(%p)->(%p)\n", This, ppNewDoc);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { FIXME("NULL nsdoc\n"); return E_NOTIMPL; }
- nsres = nsIDOMHTMLDocument_CreateDocumentFragment(This->doc_node->nsdoc, &doc_frag); + nsres = nsIDOMHTMLDocument_CreateDocumentFragment(This->nsdoc, &doc_frag); if(NS_FAILED(nsres)) { ERR("CreateDocumentFragment failed: %08lx\n", nsres); return E_FAIL; }
- hres = create_document_fragment((nsIDOMNode*)doc_frag, This->doc_node, &docnode); + hres = create_document_fragment((nsIDOMNode*)doc_frag, This, &docnode); nsIDOMDocumentFragment_Release(doc_frag); if(FAILED(hres)) return hres; @@ -3144,87 +3137,82 @@ static HRESULT WINAPI HTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface return S_OK; }
-static HRESULT WINAPI HTMLDocument3_get_parentDocument(IHTMLDocument3 *iface, - IHTMLDocument2 **p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_parentDocument(IHTMLDocument3 *iface, IHTMLDocument2 **p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_put_enableDownload(IHTMLDocument3 *iface, - VARIANT_BOOL v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_enableDownload(IHTMLDocument3 *iface, VARIANT_BOOL v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%x)\n", This, v); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_enableDownload(IHTMLDocument3 *iface, - VARIANT_BOOL *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_enableDownload(IHTMLDocument3 *iface, VARIANT_BOOL *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_put_baseUrl(IHTMLDocument3 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_baseUrl(IHTMLDocument3 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%s)\n", This, debugstr_w(v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_baseUrl(IHTMLDocument3 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_baseUrl(IHTMLDocument3 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_childNodes(IHTMLDocument3 *iface, IDispatch **p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_childNodes(IHTMLDocument3 *iface, IDispatch **p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface);
TRACE("(%p)->(%p)\n", This, p);
- return IHTMLDOMNode_get_childNodes(&This->doc_node->node.IHTMLDOMNode_iface, p); + return IHTMLDOMNode_get_childNodes(&This->node.IHTMLDOMNode_iface, p); }
-static HRESULT WINAPI HTMLDocument3_put_inheritStyleSheets(IHTMLDocument3 *iface, - VARIANT_BOOL v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_inheritStyleSheets(IHTMLDocument3 *iface, VARIANT_BOOL v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_inheritStyleSheets(IHTMLDocument3 *iface, - VARIANT_BOOL *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_inheritStyleSheets(IHTMLDocument3 *iface, VARIANT_BOOL *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_put_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument3_put_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_get_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument3_get_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BSTR v, - IHTMLElementCollection **ppelColl) +static HRESULT WINAPI DocNodeHTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BSTR v, + IHTMLElementCollection **ppelColl) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); nsIDOMNodeList *node_list; nsAString selector_str; WCHAR *selector; @@ -3233,7 +3221,7 @@ static HRESULT WINAPI HTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BST
TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), ppelColl);
- if(!This->doc_node || !This->doc_node->nsdoc) { + if(!This || !This->nsdoc) { /* We should probably return an empty collection. */ FIXME("No nsdoc\n"); return E_NOTIMPL; @@ -3250,7 +3238,7 @@ static HRESULT WINAPI HTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BST * types and search should be case insensitive. Those are currently not supported properly. */ nsAString_InitDepend(&selector_str, selector); - nsres = nsIDOMHTMLDocument_QuerySelectorAll(This->doc_node->nsdoc, &selector_str, &node_list); + nsres = nsIDOMHTMLDocument_QuerySelectorAll(This->nsdoc, &selector_str, &node_list); nsAString_Finish(&selector_str); heap_free(selector); if(NS_FAILED(nsres)) { @@ -3258,22 +3246,21 @@ static HRESULT WINAPI HTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BST return E_FAIL; }
- *ppelColl = create_collection_from_nodelist(node_list, This->doc_node->document_mode); + *ppelColl = create_collection_from_nodelist(node_list, This->document_mode); nsIDOMNodeList_Release(node_list); return S_OK; }
-static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v, - IHTMLElement **pel) +static HRESULT WINAPI DocNodeHTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v, IHTMLElement **pel) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); HTMLElement *elem; HRESULT hres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pel);
- hres = get_doc_elem_by_id(This->doc_node, v, &elem); + hres = get_doc_elem_by_id(This, v, &elem); if(FAILED(hres) || !elem) { *pel = NULL; return hres; @@ -3284,19 +3271,19 @@ static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v }
-static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface, BSTR v, - IHTMLElementCollection **pelColl) +static HRESULT WINAPI DocNodeHTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface, BSTR v, + IHTMLElementCollection **pelColl) { - HTMLDocument *This = impl_from_IHTMLDocument3(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument3(iface); nsIDOMNodeList *nslist; nsAString id_str; nsresult nsres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
- if(This->doc_node->nsdoc) { + if(This->nsdoc) { nsAString_InitDepend(&id_str, v); - nsres = nsIDOMHTMLDocument_GetElementsByTagName(This->doc_node->nsdoc, &id_str, &nslist); + nsres = nsIDOMHTMLDocument_GetElementsByTagName(This->nsdoc, &id_str, &nslist); nsAString_Finish(&id_str); if(FAILED(nsres)) { ERR("GetElementByName failed: %08lx\n", nsres); @@ -3316,7 +3303,7 @@ static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface, } }
- nsres = nsIDOMNode_QueryInterface(This->doc_node->node.nsnode, &IID_nsIDOMDocumentFragment, (void**)&docfrag); + nsres = nsIDOMNode_QueryInterface(This->node.nsnode, &IID_nsIDOMDocumentFragment, (void**)&docfrag); if(NS_FAILED(nsres)) { ERR("Could not get nsIDOMDocumentFragment iface: %08lx\n", nsres); return E_UNEXPECTED; @@ -3333,61 +3320,220 @@ static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface, }
- *pelColl = create_collection_from_nodelist(nslist, This->doc_node->document_mode); + *pelColl = create_collection_from_nodelist(nslist, This->document_mode); nsIDOMNodeList_Release(nslist);
return S_OK; }
-static const IHTMLDocument3Vtbl HTMLDocument3Vtbl = { - HTMLDocument3_QueryInterface, - HTMLDocument3_AddRef, - HTMLDocument3_Release, - HTMLDocument3_GetTypeInfoCount, - HTMLDocument3_GetTypeInfo, - HTMLDocument3_GetIDsOfNames, - HTMLDocument3_Invoke, - HTMLDocument3_releaseCapture, - HTMLDocument3_recalc, - HTMLDocument3_createTextNode, - HTMLDocument3_get_documentElement, - HTMLDocument3_get_uniqueID, - HTMLDocument3_attachEvent, - HTMLDocument3_detachEvent, - HTMLDocument3_put_onrowsdelete, - HTMLDocument3_get_onrowsdelete, - HTMLDocument3_put_onrowsinserted, - HTMLDocument3_get_onrowsinserted, - HTMLDocument3_put_oncellchange, - HTMLDocument3_get_oncellchange, - HTMLDocument3_put_ondatasetchanged, - HTMLDocument3_get_ondatasetchanged, - HTMLDocument3_put_ondataavailable, - HTMLDocument3_get_ondataavailable, - HTMLDocument3_put_ondatasetcomplete, - HTMLDocument3_get_ondatasetcomplete, - HTMLDocument3_put_onpropertychange, - HTMLDocument3_get_onpropertychange, - HTMLDocument3_put_dir, - HTMLDocument3_get_dir, - HTMLDocument3_put_oncontextmenu, - HTMLDocument3_get_oncontextmenu, - HTMLDocument3_put_onstop, - HTMLDocument3_get_onstop, - HTMLDocument3_createDocumentFragment, - HTMLDocument3_get_parentDocument, - HTMLDocument3_put_enableDownload, - HTMLDocument3_get_enableDownload, - HTMLDocument3_put_baseUrl, - HTMLDocument3_get_baseUrl, - HTMLDocument3_get_childNodes, - HTMLDocument3_put_inheritStyleSheets, - HTMLDocument3_get_inheritStyleSheets, - HTMLDocument3_put_onbeforeeditfocus, - HTMLDocument3_get_onbeforeeditfocus, - HTMLDocument3_getElementsByName, - HTMLDocument3_getElementById, - HTMLDocument3_getElementsByTagName +static const IHTMLDocument3Vtbl DocNodeHTMLDocument3Vtbl = { + DocNodeHTMLDocument3_QueryInterface, + DocNodeHTMLDocument3_AddRef, + DocNodeHTMLDocument3_Release, + DocNodeHTMLDocument3_GetTypeInfoCount, + DocNodeHTMLDocument3_GetTypeInfo, + DocNodeHTMLDocument3_GetIDsOfNames, + DocNodeHTMLDocument3_Invoke, + DocNodeHTMLDocument3_releaseCapture, + DocNodeHTMLDocument3_recalc, + DocNodeHTMLDocument3_createTextNode, + DocNodeHTMLDocument3_get_documentElement, + DocNodeHTMLDocument3_get_uniqueID, + DocNodeHTMLDocument3_attachEvent, + DocNodeHTMLDocument3_detachEvent, + DocNodeHTMLDocument3_put_onrowsdelete, + DocNodeHTMLDocument3_get_onrowsdelete, + DocNodeHTMLDocument3_put_onrowsinserted, + DocNodeHTMLDocument3_get_onrowsinserted, + DocNodeHTMLDocument3_put_oncellchange, + DocNodeHTMLDocument3_get_oncellchange, + DocNodeHTMLDocument3_put_ondatasetchanged, + DocNodeHTMLDocument3_get_ondatasetchanged, + DocNodeHTMLDocument3_put_ondataavailable, + DocNodeHTMLDocument3_get_ondataavailable, + DocNodeHTMLDocument3_put_ondatasetcomplete, + DocNodeHTMLDocument3_get_ondatasetcomplete, + DocNodeHTMLDocument3_put_onpropertychange, + DocNodeHTMLDocument3_get_onpropertychange, + DocNodeHTMLDocument3_put_dir, + DocNodeHTMLDocument3_get_dir, + DocNodeHTMLDocument3_put_oncontextmenu, + DocNodeHTMLDocument3_get_oncontextmenu, + DocNodeHTMLDocument3_put_onstop, + DocNodeHTMLDocument3_get_onstop, + DocNodeHTMLDocument3_createDocumentFragment, + DocNodeHTMLDocument3_get_parentDocument, + DocNodeHTMLDocument3_put_enableDownload, + DocNodeHTMLDocument3_get_enableDownload, + DocNodeHTMLDocument3_put_baseUrl, + DocNodeHTMLDocument3_get_baseUrl, + DocNodeHTMLDocument3_get_childNodes, + DocNodeHTMLDocument3_put_inheritStyleSheets, + DocNodeHTMLDocument3_get_inheritStyleSheets, + DocNodeHTMLDocument3_put_onbeforeeditfocus, + DocNodeHTMLDocument3_get_onbeforeeditfocus, + DocNodeHTMLDocument3_getElementsByName, + DocNodeHTMLDocument3_getElementById, + DocNodeHTMLDocument3_getElementsByTagName +}; + +static inline HTMLDocumentObj *HTMLDocumentObj_from_IHTMLDocument3(IHTMLDocument3 *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocumentObj, IHTMLDocument3_iface); +} + +HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument3) + +static HRESULT WINAPI DocObjHTMLDocument3_releaseCapture(IHTMLDocument3 *iface) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument3(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument3_recalc(IHTMLDocument3 *iface, VARIANT_BOOL fForce) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument3(iface); + + WARN("(%p)->(%x)\n", This, fForce); + + /* Doing nothing here should be fine for us. */ + return S_OK; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument3, createTextNode, BSTR,IHTMLDOMNode**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_documentElement, IHTMLElement**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_uniqueID, BSTR*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument3, attachEvent, BSTR,IDispatch*,VARIANT_BOOL*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument3, detachEvent, BSTR,IDispatch*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_onrowsdelete, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_onrowsdelete, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_onrowsinserted, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_onrowsinserted, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_oncellchange, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_oncellchange, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_ondatasetchanged, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_ondatasetchanged, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_ondataavailable, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_ondataavailable, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_ondatasetcomplete, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_ondatasetcomplete, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_onpropertychange, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_onpropertychange, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_dir, BSTR) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_dir, BSTR*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_oncontextmenu, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_oncontextmenu, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_onstop, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_onstop, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, createDocumentFragment, IHTMLDocument2**) + +static HRESULT WINAPI DocObjHTMLDocument3_get_parentDocument(IHTMLDocument3 *iface, IHTMLDocument2 **p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument3(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument3_put_enableDownload(IHTMLDocument3 *iface, VARIANT_BOOL v) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument3(iface); + FIXME("(%p)->(%x)\n", This, v); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument3_get_enableDownload(IHTMLDocument3 *iface, VARIANT_BOOL *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument3(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument3_put_baseUrl(IHTMLDocument3 *iface, BSTR v) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument3(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument3_get_baseUrl(IHTMLDocument3 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument3(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_childNodes, IDispatch**) + +static HRESULT WINAPI DocObjHTMLDocument3_put_inheritStyleSheets(IHTMLDocument3 *iface, VARIANT_BOOL v) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument3(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument3_get_inheritStyleSheets(IHTMLDocument3 *iface, VARIANT_BOOL *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument3(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, put_onbeforeeditfocus, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument3, get_onbeforeeditfocus, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument3, getElementsByName, BSTR,IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument3, getElementById, BSTR,IHTMLElement**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument3, getElementsByTagName, BSTR,IHTMLElementCollection**) + +static const IHTMLDocument3Vtbl DocObjHTMLDocument3Vtbl = { + DocObjHTMLDocument3_QueryInterface, + DocObjHTMLDocument3_AddRef, + DocObjHTMLDocument3_Release, + DocObjHTMLDocument3_GetTypeInfoCount, + DocObjHTMLDocument3_GetTypeInfo, + DocObjHTMLDocument3_GetIDsOfNames, + DocObjHTMLDocument3_Invoke, + DocObjHTMLDocument3_releaseCapture, + DocObjHTMLDocument3_recalc, + DocObjHTMLDocument3_createTextNode, + DocObjHTMLDocument3_get_documentElement, + DocObjHTMLDocument3_get_uniqueID, + DocObjHTMLDocument3_attachEvent, + DocObjHTMLDocument3_detachEvent, + DocObjHTMLDocument3_put_onrowsdelete, + DocObjHTMLDocument3_get_onrowsdelete, + DocObjHTMLDocument3_put_onrowsinserted, + DocObjHTMLDocument3_get_onrowsinserted, + DocObjHTMLDocument3_put_oncellchange, + DocObjHTMLDocument3_get_oncellchange, + DocObjHTMLDocument3_put_ondatasetchanged, + DocObjHTMLDocument3_get_ondatasetchanged, + DocObjHTMLDocument3_put_ondataavailable, + DocObjHTMLDocument3_get_ondataavailable, + DocObjHTMLDocument3_put_ondatasetcomplete, + DocObjHTMLDocument3_get_ondatasetcomplete, + DocObjHTMLDocument3_put_onpropertychange, + DocObjHTMLDocument3_get_onpropertychange, + DocObjHTMLDocument3_put_dir, + DocObjHTMLDocument3_get_dir, + DocObjHTMLDocument3_put_oncontextmenu, + DocObjHTMLDocument3_get_oncontextmenu, + DocObjHTMLDocument3_put_onstop, + DocObjHTMLDocument3_get_onstop, + DocObjHTMLDocument3_createDocumentFragment, + DocObjHTMLDocument3_get_parentDocument, + DocObjHTMLDocument3_put_enableDownload, + DocObjHTMLDocument3_get_enableDownload, + DocObjHTMLDocument3_put_baseUrl, + DocObjHTMLDocument3_get_baseUrl, + DocObjHTMLDocument3_get_childNodes, + DocObjHTMLDocument3_put_inheritStyleSheets, + DocObjHTMLDocument3_get_inheritStyleSheets, + DocObjHTMLDocument3_put_onbeforeeditfocus, + DocObjHTMLDocument3_get_onbeforeeditfocus, + DocObjHTMLDocument3_getElementsByName, + DocObjHTMLDocument3_getElementById, + DocObjHTMLDocument3_getElementsByTagName };
static inline HTMLDocument *impl_from_IHTMLDocument4(IHTMLDocument4 *iface) @@ -6580,8 +6726,6 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) *ppv = &This->IDispatchEx_iface; else if(IsEqualGUID(&IID_IDispatchEx, riid)) *ppv = &This->IDispatchEx_iface; - else if(IsEqualGUID(&IID_IHTMLDocument3, riid)) - *ppv = &This->IHTMLDocument3_iface; else if(IsEqualGUID(&IID_IHTMLDocument4, riid)) *ppv = &This->IHTMLDocument4_iface; else if(IsEqualGUID(&IID_IHTMLDocument5, riid)) @@ -6611,7 +6755,6 @@ static const cpc_entry_t HTMLDocumentNode_cpc[] = {
static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex) { - doc->IHTMLDocument3_iface.lpVtbl = &HTMLDocument3Vtbl; doc->IHTMLDocument4_iface.lpVtbl = &HTMLDocument4Vtbl; doc->IHTMLDocument5_iface.lpVtbl = &HTMLDocument5Vtbl; doc->IHTMLDocument6_iface.lpVtbl = &HTMLDocument6Vtbl; @@ -6640,6 +6783,8 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) *ppv = &This->IHTMLDocument2_iface; else if(IsEqualGUID(&IID_IHTMLDocument, riid) || IsEqualGUID(&IID_IHTMLDocument2, riid)) *ppv = &This->IHTMLDocument2_iface; + else if(IsEqualGUID(&IID_IHTMLDocument3, riid)) + *ppv = &This->IHTMLDocument3_iface; else if(IsEqualGUID(&IID_IDocumentSelector, riid)) *ppv = &This->IDocumentSelector_iface; else if(IsEqualGUID(&IID_IDocumentEvent, riid)) @@ -7105,6 +7250,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo
doc->ref = 1; doc->IHTMLDocument2_iface.lpVtbl = &DocNodeHTMLDocument2Vtbl; + doc->IHTMLDocument3_iface.lpVtbl = &DocNodeHTMLDocument3Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocNodeDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocNodeDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocNodeSupportErrorInfoVtbl; @@ -7236,6 +7382,8 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii return *ppv ? S_OK : E_NOINTERFACE; }else if(IsEqualGUID(&IID_IHTMLDocument, riid) || IsEqualGUID(&IID_IHTMLDocument2, riid)) { *ppv = &This->IHTMLDocument2_iface; + }else if(IsEqualGUID(&IID_IHTMLDocument3, riid)) { + *ppv = &This->IHTMLDocument3_iface; }else if(IsEqualGUID(&IID_ICustomDoc, riid)) { *ppv = &This->ICustomDoc_iface; }else if(IsEqualGUID(&IID_IDocumentSelector, riid)) { @@ -7547,6 +7695,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii doc->IUnknown_inner.lpVtbl = &HTMLDocumentObjVtbl; doc->ICustomDoc_iface.lpVtbl = &CustomDocVtbl; doc->IHTMLDocument2_iface.lpVtbl = &DocObjHTMLDocument2Vtbl; + doc->IHTMLDocument3_iface.lpVtbl = &DocObjHTMLDocument3Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocObjDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocObjDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocObjSupportErrorInfoVtbl; diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 9a4df87b529..ac2ca06bb14 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -3607,7 +3607,7 @@ static HRESULT WINAPI WindowDispEx_GetDispID(IDispatchEx *iface, BSTR bstrName, global_prop_t *prop; IHTMLElement *elem;
- hres = IHTMLDocument3_getElementById(&window->base.inner_window->doc->basedoc.IHTMLDocument3_iface, + hres = IHTMLDocument3_getElementById(&window->base.inner_window->doc->IHTMLDocument3_iface, bstrName, &elem); if(SUCCEEDED(hres) && elem) { IHTMLElement_Release(elem); @@ -3813,7 +3813,7 @@ static HRESULT HTMLWindow_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD case DISPATCH_PROPERTYGET: { IHTMLElement *elem;
- hres = IHTMLDocument3_getElementById(&This->base.inner_window->doc->basedoc.IHTMLDocument3_iface, + hres = IHTMLDocument3_getElementById(&This->base.inner_window->doc->IHTMLDocument3_iface, prop->name, &elem); if(FAILED(hres)) return hres; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 9ce987edef0..d2726476d3c 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -640,7 +640,6 @@ struct ConnectionPoint { };
struct HTMLDocument { - IHTMLDocument3 IHTMLDocument3_iface; IHTMLDocument4 IHTMLDocument4_iface; IHTMLDocument5 IHTMLDocument5_iface; IHTMLDocument6 IHTMLDocument6_iface; @@ -677,6 +676,7 @@ struct HTMLDocumentObj { IUnknown IUnknown_inner; ICustomDoc ICustomDoc_iface; IHTMLDocument2 IHTMLDocument2_iface; + IHTMLDocument3 IHTMLDocument3_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface; @@ -897,6 +897,7 @@ struct HTMLDocumentNode { HTMLDocument basedoc;
IHTMLDocument2 IHTMLDocument2_iface; + IHTMLDocument3 IHTMLDocument3_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface;
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmldoc.c | 283 +++++++++++++++++++++++------------ dlls/mshtml/mshtml_private.h | 3 +- 2 files changed, 190 insertions(+), 96 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index cf05323602d..47433af2ed1 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -3536,70 +3536,66 @@ static const IHTMLDocument3Vtbl DocObjHTMLDocument3Vtbl = { DocObjHTMLDocument3_getElementsByTagName };
-static inline HTMLDocument *impl_from_IHTMLDocument4(IHTMLDocument4 *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IHTMLDocument4(IHTMLDocument4 *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument4_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument4_iface); }
-static HRESULT WINAPI HTMLDocument4_QueryInterface(IHTMLDocument4 *iface, - REFIID riid, void **ppv) +static HRESULT WINAPI DocNodeHTMLDocument4_QueryInterface(IHTMLDocument4 *iface, REFIID riid, void **ppv) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); - return htmldoc_query_interface(This, riid, ppv); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static ULONG WINAPI HTMLDocument4_AddRef(IHTMLDocument4 *iface) +static ULONG WINAPI DocNodeHTMLDocument4_AddRef(IHTMLDocument4 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI HTMLDocument4_Release(IHTMLDocument4 *iface) +static ULONG WINAPI DocNodeHTMLDocument4_Release(IHTMLDocument4 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI HTMLDocument4_GetTypeInfoCount(IHTMLDocument4 *iface, UINT *pctinfo) +static HRESULT WINAPI DocNodeHTMLDocument4_GetTypeInfoCount(IHTMLDocument4 *iface, UINT *pctinfo) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); + return IDispatchEx_GetTypeInfoCount(&This->basedoc.IDispatchEx_iface, pctinfo); }
-static HRESULT WINAPI HTMLDocument4_GetTypeInfo(IHTMLDocument4 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) +static HRESULT WINAPI DocNodeHTMLDocument4_GetTypeInfo(IHTMLDocument4 *iface, UINT iTInfo, LCID lcid, + ITypeInfo **ppTInfo) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); + return IDispatchEx_GetTypeInfo(&This->basedoc.IDispatchEx_iface, iTInfo, lcid, ppTInfo); }
-static HRESULT WINAPI HTMLDocument4_GetIDsOfNames(IHTMLDocument4 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) +static HRESULT WINAPI DocNodeHTMLDocument4_GetIDsOfNames(IHTMLDocument4 *iface, REFIID riid, LPOLESTR *rgszNames, + UINT cNames, LCID lcid, DISPID *rgDispId) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, - rgDispId); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); + return IDispatchEx_GetIDsOfNames(&This->basedoc.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); }
-static HRESULT WINAPI HTMLDocument4_Invoke(IHTMLDocument4 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +static HRESULT WINAPI DocNodeHTMLDocument4_Invoke(IHTMLDocument4 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, + WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); + return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); }
-static HRESULT WINAPI HTMLDocument4_focus(IHTMLDocument4 *iface) +static HRESULT WINAPI DocNodeHTMLDocument4_focus(IHTMLDocument4 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); nsIDOMHTMLElement *nsbody; nsresult nsres;
TRACE("(%p)->()\n", This);
- nsres = nsIDOMHTMLDocument_GetBody(This->doc_node->nsdoc, &nsbody); + nsres = nsIDOMHTMLDocument_GetBody(This->nsdoc, &nsbody); if(NS_FAILED(nsres) || !nsbody) { ERR("GetBody failed: %08lx\n", nsres); return E_FAIL; @@ -3615,90 +3611,90 @@ static HRESULT WINAPI HTMLDocument4_focus(IHTMLDocument4 *iface) return S_OK; }
-static HRESULT WINAPI HTMLDocument4_hasFocus(IHTMLDocument4 *iface, VARIANT_BOOL *pfFocus) +static HRESULT WINAPI DocNodeHTMLDocument4_hasFocus(IHTMLDocument4 *iface, VARIANT_BOOL *pfFocus) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); cpp_bool has_focus; nsresult nsres;
TRACE("(%p)->(%p)\n", This, pfFocus);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { FIXME("Unimplemented for fragments.\n"); return E_NOTIMPL; }
- nsres = nsIDOMHTMLDocument_HasFocus(This->doc_node->nsdoc, &has_focus); + nsres = nsIDOMHTMLDocument_HasFocus(This->nsdoc, &has_focus); assert(nsres == NS_OK);
*pfFocus = variant_bool(has_focus); return S_OK; }
-static HRESULT WINAPI HTMLDocument4_put_onselectionchange(IHTMLDocument4 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument4_put_onselectionchange(IHTMLDocument4 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_SELECTIONCHANGE, &v); + return set_doc_event(&This->basedoc, EVENTID_SELECTIONCHANGE, &v); }
-static HRESULT WINAPI HTMLDocument4_get_onselectionchange(IHTMLDocument4 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument4_get_onselectionchange(IHTMLDocument4 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_SELECTIONCHANGE, p); + return get_doc_event(&This->basedoc, EVENTID_SELECTIONCHANGE, p); }
-static HRESULT WINAPI HTMLDocument4_get_namespaces(IHTMLDocument4 *iface, IDispatch **p) +static HRESULT WINAPI DocNodeHTMLDocument4_get_namespaces(IHTMLDocument4 *iface, IDispatch **p) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface);
TRACE("(%p)->(%p)\n", This, p);
- if(!This->doc_node->namespaces) { + if(!This->namespaces) { HRESULT hres;
- hres = create_namespace_collection(dispex_compat_mode(&This->doc_node->node.event_target.dispex), - &This->doc_node->namespaces); + hres = create_namespace_collection(dispex_compat_mode(&This->node.event_target.dispex), + &This->namespaces); if(FAILED(hres)) return hres; }
- IHTMLNamespaceCollection_AddRef(This->doc_node->namespaces); - *p = (IDispatch*)This->doc_node->namespaces; + IHTMLNamespaceCollection_AddRef(This->namespaces); + *p = (IDispatch*)This->namespaces; return S_OK; }
-static HRESULT WINAPI HTMLDocument4_createDocumentFromUrl(IHTMLDocument4 *iface, BSTR bstrUrl, +static HRESULT WINAPI DocNodeHTMLDocument4_createDocumentFromUrl(IHTMLDocument4 *iface, BSTR bstrUrl, BSTR bstrOptions, IHTMLDocument2 **newDoc) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(bstrUrl), debugstr_w(bstrOptions), newDoc); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument4_put_media(IHTMLDocument4 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument4_put_media(IHTMLDocument4 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); FIXME("(%p)->(%s)\n", This, debugstr_w(v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument4_get_media(IHTMLDocument4 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument4_get_media(IHTMLDocument4 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument4_createEventObject(IHTMLDocument4 *iface, +static HRESULT WINAPI DocNodeHTMLDocument4_createEventObject(IHTMLDocument4 *iface, VARIANT *pvarEventObject, IHTMLEventObj **ppEventObj) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_variant(pvarEventObject), ppEventObj);
@@ -3707,70 +3703,164 @@ static HRESULT WINAPI HTMLDocument4_createEventObject(IHTMLDocument4 *iface, return E_NOTIMPL; }
- return create_event_obj(dispex_compat_mode(&This->doc_node->node.event_target.dispex), ppEventObj); + return create_event_obj(dispex_compat_mode(&This->node.event_target.dispex), ppEventObj); }
-static HRESULT WINAPI HTMLDocument4_fireEvent(IHTMLDocument4 *iface, BSTR bstrEventName, +static HRESULT WINAPI DocNodeHTMLDocument4_fireEvent(IHTMLDocument4 *iface, BSTR bstrEventName, VARIANT *pvarEventObject, VARIANT_BOOL *pfCanceled) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface);
TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(bstrEventName), pvarEventObject, pfCanceled);
- return fire_event(&This->doc_node->node, bstrEventName, pvarEventObject, pfCanceled); + return fire_event(&This->node, bstrEventName, pvarEventObject, pfCanceled); }
-static HRESULT WINAPI HTMLDocument4_createRenderStyle(IHTMLDocument4 *iface, BSTR v, +static HRESULT WINAPI DocNodeHTMLDocument4_createRenderStyle(IHTMLDocument4 *iface, BSTR v, IHTMLRenderStyle **ppIHTMLRenderStyle) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), ppIHTMLRenderStyle); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument4_put_oncontrolselect(IHTMLDocument4 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument4_put_oncontrolselect(IHTMLDocument4 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument4_get_oncontrolselect(IHTMLDocument4 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument4_get_oncontrolselect(IHTMLDocument4 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument4_get_URLEncoded(IHTMLDocument4 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument4_get_URLUnencoded(IHTMLDocument4 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument4(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument4(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static const IHTMLDocument4Vtbl HTMLDocument4Vtbl = { - HTMLDocument4_QueryInterface, - HTMLDocument4_AddRef, - HTMLDocument4_Release, - HTMLDocument4_GetTypeInfoCount, - HTMLDocument4_GetTypeInfo, - HTMLDocument4_GetIDsOfNames, - HTMLDocument4_Invoke, - HTMLDocument4_focus, - HTMLDocument4_hasFocus, - HTMLDocument4_put_onselectionchange, - HTMLDocument4_get_onselectionchange, - HTMLDocument4_get_namespaces, - HTMLDocument4_createDocumentFromUrl, - HTMLDocument4_put_media, - HTMLDocument4_get_media, - HTMLDocument4_createEventObject, - HTMLDocument4_fireEvent, - HTMLDocument4_createRenderStyle, - HTMLDocument4_put_oncontrolselect, - HTMLDocument4_get_oncontrolselect, - HTMLDocument4_get_URLEncoded +static const IHTMLDocument4Vtbl DocNodeHTMLDocument4Vtbl = { + DocNodeHTMLDocument4_QueryInterface, + DocNodeHTMLDocument4_AddRef, + DocNodeHTMLDocument4_Release, + DocNodeHTMLDocument4_GetTypeInfoCount, + DocNodeHTMLDocument4_GetTypeInfo, + DocNodeHTMLDocument4_GetIDsOfNames, + DocNodeHTMLDocument4_Invoke, + DocNodeHTMLDocument4_focus, + DocNodeHTMLDocument4_hasFocus, + DocNodeHTMLDocument4_put_onselectionchange, + DocNodeHTMLDocument4_get_onselectionchange, + DocNodeHTMLDocument4_get_namespaces, + DocNodeHTMLDocument4_createDocumentFromUrl, + DocNodeHTMLDocument4_put_media, + DocNodeHTMLDocument4_get_media, + DocNodeHTMLDocument4_createEventObject, + DocNodeHTMLDocument4_fireEvent, + DocNodeHTMLDocument4_createRenderStyle, + DocNodeHTMLDocument4_put_oncontrolselect, + DocNodeHTMLDocument4_get_oncontrolselect, + DocNodeHTMLDocument4_get_URLUnencoded +}; + +static inline HTMLDocumentObj *HTMLDocumentObj_from_IHTMLDocument4(IHTMLDocument4 *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocumentObj, IHTMLDocument4_iface); +} + +HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument4) + +HTMLDOCUMENTOBJ_FWD_TO_NODE_0(HTMLDocument4, focus) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4, hasFocus, VARIANT_BOOL*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4, put_onselectionchange, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4, get_onselectionchange, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4, get_namespaces, IDispatch**) + +static HRESULT WINAPI DocObjHTMLDocument4_createDocumentFromUrl(IHTMLDocument4 *iface, BSTR bstrUrl, + BSTR bstrOptions, IHTMLDocument2 **newDoc) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument4(iface); + FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(bstrUrl), debugstr_w(bstrOptions), newDoc); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument4_put_media(IHTMLDocument4 *iface, BSTR v) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument4(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument4_get_media(IHTMLDocument4 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument4(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI DocObjHTMLDocument4_createEventObject(IHTMLDocument4 *iface, + VARIANT *pvarEventObject, IHTMLEventObj **ppEventObj) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument4(iface); + + TRACE("(%p)->(%s %p)\n", This, debugstr_variant(pvarEventObject), ppEventObj); + + if(pvarEventObject && V_VT(pvarEventObject) != VT_ERROR && V_VT(pvarEventObject) != VT_EMPTY) { + FIXME("unsupported pvarEventObject %s\n", debugstr_variant(pvarEventObject)); + return E_NOTIMPL; + } + + return create_event_obj(dispex_compat_mode(&This->dispex), ppEventObj); +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument4, fireEvent, BSTR,VARIANT*,VARIANT_BOOL*) + +static HRESULT WINAPI DocObjHTMLDocument4_createRenderStyle(IHTMLDocument4 *iface, BSTR v, + IHTMLRenderStyle **ppIHTMLRenderStyle) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument4(iface); + FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), ppIHTMLRenderStyle); + return E_NOTIMPL; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4, put_oncontrolselect, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument4, get_oncontrolselect, VARIANT*) + +static HRESULT WINAPI DocObjHTMLDocument4_get_URLUnencoded(IHTMLDocument4 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument4(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static const IHTMLDocument4Vtbl DocObjHTMLDocument4Vtbl = { + DocObjHTMLDocument4_QueryInterface, + DocObjHTMLDocument4_AddRef, + DocObjHTMLDocument4_Release, + DocObjHTMLDocument4_GetTypeInfoCount, + DocObjHTMLDocument4_GetTypeInfo, + DocObjHTMLDocument4_GetIDsOfNames, + DocObjHTMLDocument4_Invoke, + DocObjHTMLDocument4_focus, + DocObjHTMLDocument4_hasFocus, + DocObjHTMLDocument4_put_onselectionchange, + DocObjHTMLDocument4_get_onselectionchange, + DocObjHTMLDocument4_get_namespaces, + DocObjHTMLDocument4_createDocumentFromUrl, + DocObjHTMLDocument4_put_media, + DocObjHTMLDocument4_get_media, + DocObjHTMLDocument4_createEventObject, + DocObjHTMLDocument4_fireEvent, + DocObjHTMLDocument4_createRenderStyle, + DocObjHTMLDocument4_put_oncontrolselect, + DocObjHTMLDocument4_get_oncontrolselect, + DocObjHTMLDocument4_get_URLUnencoded };
static inline HTMLDocument *impl_from_IHTMLDocument5(IHTMLDocument5 *iface) @@ -6726,8 +6816,6 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) *ppv = &This->IDispatchEx_iface; else if(IsEqualGUID(&IID_IDispatchEx, riid)) *ppv = &This->IDispatchEx_iface; - else if(IsEqualGUID(&IID_IHTMLDocument4, riid)) - *ppv = &This->IHTMLDocument4_iface; else if(IsEqualGUID(&IID_IHTMLDocument5, riid)) *ppv = &This->IHTMLDocument5_iface; else if(IsEqualGUID(&IID_IHTMLDocument6, riid)) @@ -6755,7 +6843,6 @@ static const cpc_entry_t HTMLDocumentNode_cpc[] = {
static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex) { - doc->IHTMLDocument4_iface.lpVtbl = &HTMLDocument4Vtbl; doc->IHTMLDocument5_iface.lpVtbl = &HTMLDocument5Vtbl; doc->IHTMLDocument6_iface.lpVtbl = &HTMLDocument6Vtbl; doc->IHTMLDocument7_iface.lpVtbl = &HTMLDocument7Vtbl; @@ -6785,6 +6872,8 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) *ppv = &This->IHTMLDocument2_iface; else if(IsEqualGUID(&IID_IHTMLDocument3, riid)) *ppv = &This->IHTMLDocument3_iface; + else if(IsEqualGUID(&IID_IHTMLDocument4, riid)) + *ppv = &This->IHTMLDocument4_iface; else if(IsEqualGUID(&IID_IDocumentSelector, riid)) *ppv = &This->IDocumentSelector_iface; else if(IsEqualGUID(&IID_IDocumentEvent, riid)) @@ -7251,6 +7340,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo doc->ref = 1; doc->IHTMLDocument2_iface.lpVtbl = &DocNodeHTMLDocument2Vtbl; doc->IHTMLDocument3_iface.lpVtbl = &DocNodeHTMLDocument3Vtbl; + doc->IHTMLDocument4_iface.lpVtbl = &DocNodeHTMLDocument4Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocNodeDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocNodeDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocNodeSupportErrorInfoVtbl; @@ -7384,6 +7474,8 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii *ppv = &This->IHTMLDocument2_iface; }else if(IsEqualGUID(&IID_IHTMLDocument3, riid)) { *ppv = &This->IHTMLDocument3_iface; + }else if(IsEqualGUID(&IID_IHTMLDocument4, riid)) { + *ppv = &This->IHTMLDocument4_iface; }else if(IsEqualGUID(&IID_ICustomDoc, riid)) { *ppv = &This->ICustomDoc_iface; }else if(IsEqualGUID(&IID_IDocumentSelector, riid)) { @@ -7696,6 +7788,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii doc->ICustomDoc_iface.lpVtbl = &CustomDocVtbl; doc->IHTMLDocument2_iface.lpVtbl = &DocObjHTMLDocument2Vtbl; doc->IHTMLDocument3_iface.lpVtbl = &DocObjHTMLDocument3Vtbl; + doc->IHTMLDocument4_iface.lpVtbl = &DocObjHTMLDocument4Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocObjDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocObjDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocObjSupportErrorInfoVtbl; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index d2726476d3c..c3b5f135fb6 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -640,7 +640,6 @@ struct ConnectionPoint { };
struct HTMLDocument { - IHTMLDocument4 IHTMLDocument4_iface; IHTMLDocument5 IHTMLDocument5_iface; IHTMLDocument6 IHTMLDocument6_iface; IHTMLDocument7 IHTMLDocument7_iface; @@ -677,6 +676,7 @@ struct HTMLDocumentObj { ICustomDoc ICustomDoc_iface; IHTMLDocument2 IHTMLDocument2_iface; IHTMLDocument3 IHTMLDocument3_iface; + IHTMLDocument4 IHTMLDocument4_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface; @@ -898,6 +898,7 @@ struct HTMLDocumentNode {
IHTMLDocument2 IHTMLDocument2_iface; IHTMLDocument3 IHTMLDocument3_iface; + IHTMLDocument4 IHTMLDocument4_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface;
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmldoc.c | 299 +++++++++++++++++++++-------------- dlls/mshtml/mshtml_private.h | 3 +- 2 files changed, 184 insertions(+), 118 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 47433af2ed1..25fea413c73 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -3863,82 +3863,78 @@ static const IHTMLDocument4Vtbl DocObjHTMLDocument4Vtbl = { DocObjHTMLDocument4_get_URLUnencoded };
-static inline HTMLDocument *impl_from_IHTMLDocument5(IHTMLDocument5 *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IHTMLDocument5(IHTMLDocument5 *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument5_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument5_iface); }
-static HRESULT WINAPI HTMLDocument5_QueryInterface(IHTMLDocument5 *iface, - REFIID riid, void **ppv) +static HRESULT WINAPI DocNodeHTMLDocument5_QueryInterface(IHTMLDocument5 *iface, REFIID riid, void **ppv) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); - return htmldoc_query_interface(This, riid, ppv); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static ULONG WINAPI HTMLDocument5_AddRef(IHTMLDocument5 *iface) +static ULONG WINAPI DocNodeHTMLDocument5_AddRef(IHTMLDocument5 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI HTMLDocument5_Release(IHTMLDocument5 *iface) +static ULONG WINAPI DocNodeHTMLDocument5_Release(IHTMLDocument5 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI HTMLDocument5_GetTypeInfoCount(IHTMLDocument5 *iface, UINT *pctinfo) +static HRESULT WINAPI DocNodeHTMLDocument5_GetTypeInfoCount(IHTMLDocument5 *iface, UINT *pctinfo) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); + return IDispatchEx_GetTypeInfoCount(&This->basedoc.IDispatchEx_iface, pctinfo); }
-static HRESULT WINAPI HTMLDocument5_GetTypeInfo(IHTMLDocument5 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) +static HRESULT WINAPI DocNodeHTMLDocument5_GetTypeInfo(IHTMLDocument5 *iface, UINT iTInfo, LCID lcid, + ITypeInfo **ppTInfo) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); + return IDispatchEx_GetTypeInfo(&This->basedoc.IDispatchEx_iface, iTInfo, lcid, ppTInfo); }
-static HRESULT WINAPI HTMLDocument5_GetIDsOfNames(IHTMLDocument5 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +static HRESULT WINAPI DocNodeHTMLDocument5_GetIDsOfNames(IHTMLDocument5 *iface, REFIID riid, LPOLESTR *rgszNames, + UINT cNames, LCID lcid, DISPID *rgDispId) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, - rgDispId); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); + return IDispatchEx_GetIDsOfNames(&This->basedoc.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); }
-static HRESULT WINAPI HTMLDocument5_Invoke(IHTMLDocument5 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +static HRESULT WINAPI DocNodeHTMLDocument5_Invoke(IHTMLDocument5 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, + WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); + return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); }
-static HRESULT WINAPI HTMLDocument5_put_onmousewheel(IHTMLDocument5 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument5_put_onmousewheel(IHTMLDocument5 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_MOUSEWHEEL, &v); + return set_doc_event(&This->basedoc, EVENTID_MOUSEWHEEL, &v); }
-static HRESULT WINAPI HTMLDocument5_get_onmousewheel(IHTMLDocument5 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument5_get_onmousewheel(IHTMLDocument5 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_MOUSEWHEEL, p); + return get_doc_event(&This->basedoc, EVENTID_MOUSEWHEEL, p); }
-static HRESULT WINAPI HTMLDocument5_get_doctype(IHTMLDocument5 *iface, IHTMLDOMNode **p) +static HRESULT WINAPI DocNodeHTMLDocument5_get_doctype(IHTMLDocument5 *iface, IHTMLDOMNode **p) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); - HTMLDocumentNode *doc_node = This->doc_node; + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); nsIDOMDocumentType *nsdoctype; HTMLDOMNode *doctype_node; nsresult nsres; @@ -3946,12 +3942,12 @@ static HRESULT WINAPI HTMLDocument5_get_doctype(IHTMLDocument5 *iface, IHTMLDOMN
TRACE("(%p)->(%p)\n", This, p);
- if(dispex_compat_mode(&doc_node->node.event_target.dispex) < COMPAT_MODE_IE9) { + if(dispex_compat_mode(&This->node.event_target.dispex) < COMPAT_MODE_IE9) { *p = NULL; return S_OK; }
- nsres = nsIDOMHTMLDocument_GetDoctype(doc_node->nsdoc, &nsdoctype); + nsres = nsIDOMHTMLDocument_GetDoctype(This->nsdoc, &nsdoctype); if(NS_FAILED(nsres)) return map_nsresult(nsres); if(!nsdoctype) { @@ -3967,36 +3963,35 @@ static HRESULT WINAPI HTMLDocument5_get_doctype(IHTMLDocument5 *iface, IHTMLDOMN return hres; }
-static HRESULT WINAPI HTMLDocument5_get_implementation(IHTMLDocument5 *iface, IHTMLDOMImplementation **p) +static HRESULT WINAPI DocNodeHTMLDocument5_get_implementation(IHTMLDocument5 *iface, IHTMLDOMImplementation **p) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); - HTMLDocumentNode *doc_node = This->doc_node; + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface);
TRACE("(%p)->(%p)\n", This, p);
- if(!doc_node->dom_implementation) { + if(!This->dom_implementation) { HRESULT hres;
- hres = create_dom_implementation(doc_node, &doc_node->dom_implementation); + hres = create_dom_implementation(This, &This->dom_implementation); if(FAILED(hres)) return hres; }
- IHTMLDOMImplementation_AddRef(doc_node->dom_implementation); - *p = doc_node->dom_implementation; + IHTMLDOMImplementation_AddRef(This->dom_implementation); + *p = This->dom_implementation; return S_OK; }
-static HRESULT WINAPI HTMLDocument5_createAttribute(IHTMLDocument5 *iface, BSTR bstrattrName, +static HRESULT WINAPI DocNodeHTMLDocument5_createAttribute(IHTMLDocument5 *iface, BSTR bstrattrName, IHTMLDOMAttribute **ppattribute) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); HTMLDOMAttribute *attr; HRESULT hres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrattrName), ppattribute);
- hres = HTMLDOMAttribute_Create(bstrattrName, NULL, 0, dispex_compat_mode(&This->doc_node->node.event_target.dispex), &attr); + hres = HTMLDOMAttribute_Create(bstrattrName, NULL, 0, dispex_compat_mode(&This->node.event_target.dispex), &attr); if(FAILED(hres)) return hres;
@@ -4004,10 +3999,10 @@ static HRESULT WINAPI HTMLDocument5_createAttribute(IHTMLDocument5 *iface, BSTR return S_OK; }
-static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bstrdata, +static HRESULT WINAPI DocNodeHTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bstrdata, IHTMLDOMNode **ppRetNode) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); nsIDOMComment *nscomment; HTMLElement *elem; nsAString str; @@ -4016,20 +4011,20 @@ static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bs
TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrdata), ppRetNode);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; }
nsAString_InitDepend(&str, bstrdata); - nsres = nsIDOMHTMLDocument_CreateComment(This->doc_node->nsdoc, &str, &nscomment); + nsres = nsIDOMHTMLDocument_CreateComment(This->nsdoc, &str, &nscomment); nsAString_Finish(&str); if(NS_FAILED(nsres)) { ERR("CreateTextNode failed: %08lx\n", nsres); return E_FAIL; }
- hres = HTMLCommentElement_Create(This->doc_node, (nsIDOMNode*)nscomment, &elem); + hres = HTMLCommentElement_Create(This, (nsIDOMNode*)nscomment, &elem); nsIDOMComment_Release(nscomment); if(FAILED(hres)) return hres; @@ -4038,135 +4033,202 @@ static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bs return S_OK; }
-static HRESULT WINAPI HTMLDocument5_put_onfocusin(IHTMLDocument5 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument5_put_onfocusin(IHTMLDocument5 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_FOCUSIN, &v); + return set_doc_event(&This->basedoc, EVENTID_FOCUSIN, &v); }
-static HRESULT WINAPI HTMLDocument5_get_onfocusin(IHTMLDocument5 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument5_get_onfocusin(IHTMLDocument5 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_FOCUSIN, p); + return get_doc_event(&This->basedoc, EVENTID_FOCUSIN, p); }
-static HRESULT WINAPI HTMLDocument5_put_onfocusout(IHTMLDocument5 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument5_put_onfocusout(IHTMLDocument5 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_FOCUSOUT, &v); + return set_doc_event(&This->basedoc, EVENTID_FOCUSOUT, &v); }
-static HRESULT WINAPI HTMLDocument5_get_onfocusout(IHTMLDocument5 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument5_get_onfocusout(IHTMLDocument5 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_FOCUSOUT, p); + return get_doc_event(&This->basedoc, EVENTID_FOCUSOUT, p); }
-static HRESULT WINAPI HTMLDocument5_put_onactivate(IHTMLDocument5 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument5_put_onactivate(IHTMLDocument5 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument5_get_onactivate(IHTMLDocument5 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument5_get_onactivate(IHTMLDocument5 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument5_put_ondeactivate(IHTMLDocument5 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument5_put_ondeactivate(IHTMLDocument5 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument5_get_ondeactivate(IHTMLDocument5 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument5_get_ondeactivate(IHTMLDocument5 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument5_put_onbeforeactivate(IHTMLDocument5 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument5_put_onbeforeactivate(IHTMLDocument5 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument5_get_onbeforeactivate(IHTMLDocument5 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument5_get_onbeforeactivate(IHTMLDocument5 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument5_put_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument5_put_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument5_get_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument5_get_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument5(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument5(iface);
TRACE("(%p)->(%p)\n", This, p);
- *p = SysAllocString(This->doc_node->document_mode <= COMPAT_MODE_IE5 ? L"BackCompat" : L"CSS1Compat"); + *p = SysAllocString(This->document_mode <= COMPAT_MODE_IE5 ? L"BackCompat" : L"CSS1Compat"); return *p ? S_OK : E_OUTOFMEMORY; }
-static const IHTMLDocument5Vtbl HTMLDocument5Vtbl = { - HTMLDocument5_QueryInterface, - HTMLDocument5_AddRef, - HTMLDocument5_Release, - HTMLDocument5_GetTypeInfoCount, - HTMLDocument5_GetTypeInfo, - HTMLDocument5_GetIDsOfNames, - HTMLDocument5_Invoke, - HTMLDocument5_put_onmousewheel, - HTMLDocument5_get_onmousewheel, - HTMLDocument5_get_doctype, - HTMLDocument5_get_implementation, - HTMLDocument5_createAttribute, - HTMLDocument5_createComment, - HTMLDocument5_put_onfocusin, - HTMLDocument5_get_onfocusin, - HTMLDocument5_put_onfocusout, - HTMLDocument5_get_onfocusout, - HTMLDocument5_put_onactivate, - HTMLDocument5_get_onactivate, - HTMLDocument5_put_ondeactivate, - HTMLDocument5_get_ondeactivate, - HTMLDocument5_put_onbeforeactivate, - HTMLDocument5_get_onbeforeactivate, - HTMLDocument5_put_onbeforedeactivate, - HTMLDocument5_get_onbeforedeactivate, - HTMLDocument5_get_compatMode +static const IHTMLDocument5Vtbl DocNodeHTMLDocument5Vtbl = { + DocNodeHTMLDocument5_QueryInterface, + DocNodeHTMLDocument5_AddRef, + DocNodeHTMLDocument5_Release, + DocNodeHTMLDocument5_GetTypeInfoCount, + DocNodeHTMLDocument5_GetTypeInfo, + DocNodeHTMLDocument5_GetIDsOfNames, + DocNodeHTMLDocument5_Invoke, + DocNodeHTMLDocument5_put_onmousewheel, + DocNodeHTMLDocument5_get_onmousewheel, + DocNodeHTMLDocument5_get_doctype, + DocNodeHTMLDocument5_get_implementation, + DocNodeHTMLDocument5_createAttribute, + DocNodeHTMLDocument5_createComment, + DocNodeHTMLDocument5_put_onfocusin, + DocNodeHTMLDocument5_get_onfocusin, + DocNodeHTMLDocument5_put_onfocusout, + DocNodeHTMLDocument5_get_onfocusout, + DocNodeHTMLDocument5_put_onactivate, + DocNodeHTMLDocument5_get_onactivate, + DocNodeHTMLDocument5_put_ondeactivate, + DocNodeHTMLDocument5_get_ondeactivate, + DocNodeHTMLDocument5_put_onbeforeactivate, + DocNodeHTMLDocument5_get_onbeforeactivate, + DocNodeHTMLDocument5_put_onbeforedeactivate, + DocNodeHTMLDocument5_get_onbeforedeactivate, + DocNodeHTMLDocument5_get_compatMode +}; + +static inline HTMLDocumentObj *HTMLDocumentObj_from_IHTMLDocument5(IHTMLDocument5 *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocumentObj, IHTMLDocument5_iface); +} + +HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument5) + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, put_onmousewheel, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, get_onmousewheel, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, get_doctype, IHTMLDOMNode**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, get_implementation, IHTMLDOMImplementation**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument5, createAttribute, BSTR,IHTMLDOMAttribute**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument5, createComment, BSTR,IHTMLDOMNode**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, put_onfocusin, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, get_onfocusin, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, put_onfocusout, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, get_onfocusout, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, put_onactivate, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, get_onactivate, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, put_ondeactivate, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, get_ondeactivate, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, put_onbeforeactivate, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, get_onbeforeactivate, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, put_onbeforedeactivate, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument5, get_onbeforedeactivate, VARIANT*) + +static HRESULT WINAPI DocObjHTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument5(iface); + + if(This->basedoc.doc_node) + return IHTMLDocument5_get_compatMode(&This->basedoc.doc_node->IHTMLDocument5_iface, p); + + TRACE("(%p)->(%p)\n", This, p); + + return (*p = SysAllocString(L"BackCompat")) ? S_OK : E_OUTOFMEMORY; +} + +static const IHTMLDocument5Vtbl DocObjHTMLDocument5Vtbl = { + DocObjHTMLDocument5_QueryInterface, + DocObjHTMLDocument5_AddRef, + DocObjHTMLDocument5_Release, + DocObjHTMLDocument5_GetTypeInfoCount, + DocObjHTMLDocument5_GetTypeInfo, + DocObjHTMLDocument5_GetIDsOfNames, + DocObjHTMLDocument5_Invoke, + DocObjHTMLDocument5_put_onmousewheel, + DocObjHTMLDocument5_get_onmousewheel, + DocObjHTMLDocument5_get_doctype, + DocObjHTMLDocument5_get_implementation, + DocObjHTMLDocument5_createAttribute, + DocObjHTMLDocument5_createComment, + DocObjHTMLDocument5_put_onfocusin, + DocObjHTMLDocument5_get_onfocusin, + DocObjHTMLDocument5_put_onfocusout, + DocObjHTMLDocument5_get_onfocusout, + DocObjHTMLDocument5_put_onactivate, + DocObjHTMLDocument5_get_onactivate, + DocObjHTMLDocument5_put_ondeactivate, + DocObjHTMLDocument5_get_ondeactivate, + DocObjHTMLDocument5_put_onbeforeactivate, + DocObjHTMLDocument5_get_onbeforeactivate, + DocObjHTMLDocument5_put_onbeforedeactivate, + DocObjHTMLDocument5_get_onbeforedeactivate, + DocObjHTMLDocument5_get_compatMode };
static inline HTMLDocument *impl_from_IHTMLDocument6(IHTMLDocument6 *iface) @@ -4539,7 +4601,7 @@ static HRESULT WINAPI HTMLDocument7_createAttribute(IHTMLDocument7 *iface, BSTR
TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrAttrName), ppAttribute);
- return IHTMLDocument5_createAttribute(&This->IHTMLDocument5_iface, bstrAttrName, ppAttribute); + return IHTMLDocument5_createAttribute(&This->doc_node->IHTMLDocument5_iface, bstrAttrName, ppAttribute); }
static HRESULT WINAPI HTMLDocument7_getElementsByClassName(IHTMLDocument7 *iface, BSTR v, IHTMLElementCollection **pel) @@ -6816,8 +6878,6 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) *ppv = &This->IDispatchEx_iface; else if(IsEqualGUID(&IID_IDispatchEx, riid)) *ppv = &This->IDispatchEx_iface; - else if(IsEqualGUID(&IID_IHTMLDocument5, riid)) - *ppv = &This->IHTMLDocument5_iface; else if(IsEqualGUID(&IID_IHTMLDocument6, riid)) *ppv = &This->IHTMLDocument6_iface; else if(IsEqualGUID(&IID_IHTMLDocument7, riid)) @@ -6843,7 +6903,6 @@ static const cpc_entry_t HTMLDocumentNode_cpc[] = {
static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex) { - doc->IHTMLDocument5_iface.lpVtbl = &HTMLDocument5Vtbl; doc->IHTMLDocument6_iface.lpVtbl = &HTMLDocument6Vtbl; doc->IHTMLDocument7_iface.lpVtbl = &HTMLDocument7Vtbl; doc->IDispatchEx_iface.lpVtbl = &DocDispatchExVtbl; @@ -6874,6 +6933,8 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) *ppv = &This->IHTMLDocument3_iface; else if(IsEqualGUID(&IID_IHTMLDocument4, riid)) *ppv = &This->IHTMLDocument4_iface; + else if(IsEqualGUID(&IID_IHTMLDocument5, riid)) + *ppv = &This->IHTMLDocument5_iface; else if(IsEqualGUID(&IID_IDocumentSelector, riid)) *ppv = &This->IDocumentSelector_iface; else if(IsEqualGUID(&IID_IDocumentEvent, riid)) @@ -7341,6 +7402,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo doc->IHTMLDocument2_iface.lpVtbl = &DocNodeHTMLDocument2Vtbl; doc->IHTMLDocument3_iface.lpVtbl = &DocNodeHTMLDocument3Vtbl; doc->IHTMLDocument4_iface.lpVtbl = &DocNodeHTMLDocument4Vtbl; + doc->IHTMLDocument5_iface.lpVtbl = &DocNodeHTMLDocument5Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocNodeDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocNodeDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocNodeSupportErrorInfoVtbl; @@ -7476,6 +7538,8 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii *ppv = &This->IHTMLDocument3_iface; }else if(IsEqualGUID(&IID_IHTMLDocument4, riid)) { *ppv = &This->IHTMLDocument4_iface; + }else if(IsEqualGUID(&IID_IHTMLDocument5, riid)) { + *ppv = &This->IHTMLDocument5_iface; }else if(IsEqualGUID(&IID_ICustomDoc, riid)) { *ppv = &This->ICustomDoc_iface; }else if(IsEqualGUID(&IID_IDocumentSelector, riid)) { @@ -7789,6 +7853,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii doc->IHTMLDocument2_iface.lpVtbl = &DocObjHTMLDocument2Vtbl; doc->IHTMLDocument3_iface.lpVtbl = &DocObjHTMLDocument3Vtbl; doc->IHTMLDocument4_iface.lpVtbl = &DocObjHTMLDocument4Vtbl; + doc->IHTMLDocument5_iface.lpVtbl = &DocObjHTMLDocument5Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocObjDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocObjDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocObjSupportErrorInfoVtbl; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index c3b5f135fb6..a6a0159f4ac 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -640,7 +640,6 @@ struct ConnectionPoint { };
struct HTMLDocument { - IHTMLDocument5 IHTMLDocument5_iface; IHTMLDocument6 IHTMLDocument6_iface; IHTMLDocument7 IHTMLDocument7_iface; IDispatchEx IDispatchEx_iface; @@ -677,6 +676,7 @@ struct HTMLDocumentObj { IHTMLDocument2 IHTMLDocument2_iface; IHTMLDocument3 IHTMLDocument3_iface; IHTMLDocument4 IHTMLDocument4_iface; + IHTMLDocument5 IHTMLDocument5_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface; @@ -899,6 +899,7 @@ struct HTMLDocumentNode { IHTMLDocument2 IHTMLDocument2_iface; IHTMLDocument3 IHTMLDocument3_iface; IHTMLDocument4 IHTMLDocument4_iface; + IHTMLDocument5 IHTMLDocument5_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface;
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmldoc.c | 187 +++++++++++++++++++++-------------- dlls/mshtml/mshtml_private.h | 3 +- 2 files changed, 113 insertions(+), 77 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 25fea413c73..4a55bb38180 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -4231,126 +4231,118 @@ static const IHTMLDocument5Vtbl DocObjHTMLDocument5Vtbl = { DocObjHTMLDocument5_get_compatMode };
-static inline HTMLDocument *impl_from_IHTMLDocument6(IHTMLDocument6 *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IHTMLDocument6(IHTMLDocument6 *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument6_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument6_iface); }
-static HRESULT WINAPI HTMLDocument6_QueryInterface(IHTMLDocument6 *iface, - REFIID riid, void **ppv) +static HRESULT WINAPI DocNodeHTMLDocument6_QueryInterface(IHTMLDocument6 *iface, REFIID riid, void **ppv) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); - return htmldoc_query_interface(This, riid, ppv); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static ULONG WINAPI HTMLDocument6_AddRef(IHTMLDocument6 *iface) +static ULONG WINAPI DocNodeHTMLDocument6_AddRef(IHTMLDocument6 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI HTMLDocument6_Release(IHTMLDocument6 *iface) +static ULONG WINAPI DocNodeHTMLDocument6_Release(IHTMLDocument6 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI HTMLDocument6_GetTypeInfoCount(IHTMLDocument6 *iface, UINT *pctinfo) +static HRESULT WINAPI DocNodeHTMLDocument6_GetTypeInfoCount(IHTMLDocument6 *iface, UINT *pctinfo) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface); + return IDispatchEx_GetTypeInfoCount(&This->basedoc.IDispatchEx_iface, pctinfo); }
-static HRESULT WINAPI HTMLDocument6_GetTypeInfo(IHTMLDocument6 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) +static HRESULT WINAPI DocNodeHTMLDocument6_GetTypeInfo(IHTMLDocument6 *iface, UINT iTInfo, LCID lcid, + ITypeInfo **ppTInfo) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface); + return IDispatchEx_GetTypeInfo(&This->basedoc.IDispatchEx_iface, iTInfo, lcid, ppTInfo); }
-static HRESULT WINAPI HTMLDocument6_GetIDsOfNames(IHTMLDocument6 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +static HRESULT WINAPI DocNodeHTMLDocument6_GetIDsOfNames(IHTMLDocument6 *iface, REFIID riid, LPOLESTR *rgszNames, + UINT cNames, LCID lcid, DISPID *rgDispId) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, - rgDispId); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface); + return IDispatchEx_GetIDsOfNames(&This->basedoc.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); }
-static HRESULT WINAPI HTMLDocument6_Invoke(IHTMLDocument6 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +static HRESULT WINAPI DocNodeHTMLDocument6_Invoke(IHTMLDocument6 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, + WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface); + return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); }
-static HRESULT WINAPI HTMLDocument6_get_compatible(IHTMLDocument6 *iface, +static HRESULT WINAPI DocNodeHTMLDocument6_get_compatible(IHTMLDocument6 *iface, IHTMLDocumentCompatibleInfoCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument6_get_documentMode(IHTMLDocument6 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument6_get_documentMode(IHTMLDocument6 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface);
TRACE("(%p)->(%p)\n", This, p);
- if(!This->doc_node) { - FIXME("NULL doc_node\n"); - return E_UNEXPECTED; - } - V_VT(p) = VT_R4; - V_R4(p) = compat_mode_info[This->doc_node->document_mode].document_mode; + V_R4(p) = compat_mode_info[This->document_mode].document_mode; return S_OK; }
-static HRESULT WINAPI HTMLDocument6_get_onstorage(IHTMLDocument6 *iface, +static HRESULT WINAPI DocNodeHTMLDocument6_get_onstorage(IHTMLDocument6 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_STORAGE, p); + return get_doc_event(&This->basedoc, EVENTID_STORAGE, p); }
-static HRESULT WINAPI HTMLDocument6_put_onstorage(IHTMLDocument6 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument6_put_onstorage(IHTMLDocument6 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_STORAGE, &v); + return set_doc_event(&This->basedoc, EVENTID_STORAGE, &v); }
-static HRESULT WINAPI HTMLDocument6_get_onstoragecommit(IHTMLDocument6 *iface, +static HRESULT WINAPI DocNodeHTMLDocument6_get_onstoragecommit(IHTMLDocument6 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface);
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(This, EVENTID_STORAGECOMMIT, p); + return get_doc_event(&This->basedoc, EVENTID_STORAGECOMMIT, p); }
-static HRESULT WINAPI HTMLDocument6_put_onstoragecommit(IHTMLDocument6 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument6_put_onstoragecommit(IHTMLDocument6 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(This, EVENTID_STORAGECOMMIT, &v); + return set_doc_event(&This->basedoc, EVENTID_STORAGECOMMIT, &v); }
-static HRESULT WINAPI HTMLDocument6_getElementById(IHTMLDocument6 *iface, +static HRESULT WINAPI DocNodeHTMLDocument6_getElementById(IHTMLDocument6 *iface, BSTR bstrId, IHTMLElement2 **p) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface); nsIDOMElement *nselem; HTMLElement *elem; nsAString nsstr; @@ -4364,13 +4356,13 @@ static HRESULT WINAPI HTMLDocument6_getElementById(IHTMLDocument6 *iface, * not search for name attributes, so we may simply let Gecko do the right thing. */
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { FIXME("Not a document\n"); return E_FAIL; }
nsAString_InitDepend(&nsstr, bstrId); - nsres = nsIDOMHTMLDocument_GetElementById(This->doc_node->nsdoc, &nsstr, &nselem); + nsres = nsIDOMHTMLDocument_GetElementById(This->nsdoc, &nsstr, &nselem); nsAString_Finish(&nsstr); if(NS_FAILED(nsres)) { ERR("GetElementById failed: %08lx\n", nsres); @@ -4391,29 +4383,69 @@ static HRESULT WINAPI HTMLDocument6_getElementById(IHTMLDocument6 *iface, return S_OK; }
-static HRESULT WINAPI HTMLDocument6_updateSettings(IHTMLDocument6 *iface) +static HRESULT WINAPI DocNodeHTMLDocument6_updateSettings(IHTMLDocument6 *iface) +{ + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument6(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static const IHTMLDocument6Vtbl DocNodeHTMLDocument6Vtbl = { + DocNodeHTMLDocument6_QueryInterface, + DocNodeHTMLDocument6_AddRef, + DocNodeHTMLDocument6_Release, + DocNodeHTMLDocument6_GetTypeInfoCount, + DocNodeHTMLDocument6_GetTypeInfo, + DocNodeHTMLDocument6_GetIDsOfNames, + DocNodeHTMLDocument6_Invoke, + DocNodeHTMLDocument6_get_compatible, + DocNodeHTMLDocument6_get_documentMode, + DocNodeHTMLDocument6_put_onstorage, + DocNodeHTMLDocument6_get_onstorage, + DocNodeHTMLDocument6_put_onstoragecommit, + DocNodeHTMLDocument6_get_onstoragecommit, + DocNodeHTMLDocument6_getElementById, + DocNodeHTMLDocument6_updateSettings +}; + +static inline HTMLDocumentObj *HTMLDocumentObj_from_IHTMLDocument6(IHTMLDocument6 *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocumentObj, IHTMLDocument6_iface); +} + +HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument6) + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6, get_compatible, IHTMLDocumentCompatibleInfoCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6, get_documentMode, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6, put_onstorage, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6, get_onstorage, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6, put_onstoragecommit, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument6, get_onstoragecommit, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument6, getElementById, BSTR,IHTMLElement2**) + +static HRESULT WINAPI DocObjHTMLDocument6_updateSettings(IHTMLDocument6 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument6(iface); + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument6(iface); FIXME("(%p)->()\n", This); return E_NOTIMPL; }
-static const IHTMLDocument6Vtbl HTMLDocument6Vtbl = { - HTMLDocument6_QueryInterface, - HTMLDocument6_AddRef, - HTMLDocument6_Release, - HTMLDocument6_GetTypeInfoCount, - HTMLDocument6_GetTypeInfo, - HTMLDocument6_GetIDsOfNames, - HTMLDocument6_Invoke, - HTMLDocument6_get_compatible, - HTMLDocument6_get_documentMode, - HTMLDocument6_put_onstorage, - HTMLDocument6_get_onstorage, - HTMLDocument6_put_onstoragecommit, - HTMLDocument6_get_onstoragecommit, - HTMLDocument6_getElementById, - HTMLDocument6_updateSettings +static const IHTMLDocument6Vtbl DocObjHTMLDocument6Vtbl = { + DocObjHTMLDocument6_QueryInterface, + DocObjHTMLDocument6_AddRef, + DocObjHTMLDocument6_Release, + DocObjHTMLDocument6_GetTypeInfoCount, + DocObjHTMLDocument6_GetTypeInfo, + DocObjHTMLDocument6_GetIDsOfNames, + DocObjHTMLDocument6_Invoke, + DocObjHTMLDocument6_get_compatible, + DocObjHTMLDocument6_get_documentMode, + DocObjHTMLDocument6_put_onstorage, + DocObjHTMLDocument6_get_onstorage, + DocObjHTMLDocument6_put_onstoragecommit, + DocObjHTMLDocument6_get_onstoragecommit, + DocObjHTMLDocument6_getElementById, + DocObjHTMLDocument6_updateSettings };
static inline HTMLDocument *impl_from_IHTMLDocument7(IHTMLDocument7 *iface) @@ -6878,8 +6910,6 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) *ppv = &This->IDispatchEx_iface; else if(IsEqualGUID(&IID_IDispatchEx, riid)) *ppv = &This->IDispatchEx_iface; - else if(IsEqualGUID(&IID_IHTMLDocument6, riid)) - *ppv = &This->IHTMLDocument6_iface; else if(IsEqualGUID(&IID_IHTMLDocument7, riid)) *ppv = &This->IHTMLDocument7_iface; else @@ -6903,7 +6933,6 @@ static const cpc_entry_t HTMLDocumentNode_cpc[] = {
static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex) { - doc->IHTMLDocument6_iface.lpVtbl = &HTMLDocument6Vtbl; doc->IHTMLDocument7_iface.lpVtbl = &HTMLDocument7Vtbl; doc->IDispatchEx_iface.lpVtbl = &DocDispatchExVtbl;
@@ -6935,6 +6964,8 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) *ppv = &This->IHTMLDocument4_iface; else if(IsEqualGUID(&IID_IHTMLDocument5, riid)) *ppv = &This->IHTMLDocument5_iface; + else if(IsEqualGUID(&IID_IHTMLDocument6, riid)) + *ppv = &This->IHTMLDocument6_iface; else if(IsEqualGUID(&IID_IDocumentSelector, riid)) *ppv = &This->IDocumentSelector_iface; else if(IsEqualGUID(&IID_IDocumentEvent, riid)) @@ -7403,6 +7434,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo doc->IHTMLDocument3_iface.lpVtbl = &DocNodeHTMLDocument3Vtbl; doc->IHTMLDocument4_iface.lpVtbl = &DocNodeHTMLDocument4Vtbl; doc->IHTMLDocument5_iface.lpVtbl = &DocNodeHTMLDocument5Vtbl; + doc->IHTMLDocument6_iface.lpVtbl = &DocNodeHTMLDocument6Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocNodeDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocNodeDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocNodeSupportErrorInfoVtbl; @@ -7540,6 +7572,8 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii *ppv = &This->IHTMLDocument4_iface; }else if(IsEqualGUID(&IID_IHTMLDocument5, riid)) { *ppv = &This->IHTMLDocument5_iface; + }else if(IsEqualGUID(&IID_IHTMLDocument6, riid)) { + *ppv = &This->IHTMLDocument6_iface; }else if(IsEqualGUID(&IID_ICustomDoc, riid)) { *ppv = &This->ICustomDoc_iface; }else if(IsEqualGUID(&IID_IDocumentSelector, riid)) { @@ -7854,6 +7888,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii doc->IHTMLDocument3_iface.lpVtbl = &DocObjHTMLDocument3Vtbl; doc->IHTMLDocument4_iface.lpVtbl = &DocObjHTMLDocument4Vtbl; doc->IHTMLDocument5_iface.lpVtbl = &DocObjHTMLDocument5Vtbl; + doc->IHTMLDocument6_iface.lpVtbl = &DocObjHTMLDocument6Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocObjDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocObjDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocObjSupportErrorInfoVtbl; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index a6a0159f4ac..de572a627d9 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -640,7 +640,6 @@ struct ConnectionPoint { };
struct HTMLDocument { - IHTMLDocument6 IHTMLDocument6_iface; IHTMLDocument7 IHTMLDocument7_iface; IDispatchEx IDispatchEx_iface;
@@ -677,6 +676,7 @@ struct HTMLDocumentObj { IHTMLDocument3 IHTMLDocument3_iface; IHTMLDocument4 IHTMLDocument4_iface; IHTMLDocument5 IHTMLDocument5_iface; + IHTMLDocument6 IHTMLDocument6_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface; @@ -900,6 +900,7 @@ struct HTMLDocumentNode { IHTMLDocument3 IHTMLDocument3_iface; IHTMLDocument4 IHTMLDocument4_iface; IHTMLDocument5 IHTMLDocument5_iface; + IHTMLDocument6 IHTMLDocument6_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface;
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmldoc.c | 1070 +++++++++++++++++++++------------- dlls/mshtml/htmlevent.h | 8 +- dlls/mshtml/mshtml_private.h | 3 +- dlls/mshtml/omnavigator.c | 2 +- 4 files changed, 667 insertions(+), 416 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 4a55bb38180..ec62c378ff7 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -554,7 +554,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_Script(IHTMLDocument2 *iface, IDi
TRACE("(%p)->(%p)\n", This, p);
- hres = IHTMLDocument7_get_parentWindow(&This->basedoc.IHTMLDocument7_iface, (IHTMLWindow2**)p); + hres = IHTMLDocument7_get_parentWindow(&This->IHTMLDocument7_iface, (IHTMLWindow2**)p); return hres == S_OK && !*p ? E_PENDING : hres; }
@@ -1298,7 +1298,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_charset(IHTMLDocument2 *iface, BS
TRACE("(%p)->(%p)\n", This, p);
- return IHTMLDocument7_get_characterSet(&This->basedoc.IHTMLDocument7_iface, p); + return IHTMLDocument7_get_characterSet(&This->IHTMLDocument7_iface, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_defaultCharset(IHTMLDocument2 *iface, BSTR v) @@ -1683,7 +1683,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onclick(IHTMLDocument2 *iface, VA
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_CLICK, &v); + return set_doc_event(This, EVENTID_CLICK, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onclick(IHTMLDocument2 *iface, VARIANT *p) @@ -1692,7 +1692,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onclick(IHTMLDocument2 *iface, VA
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_CLICK, p); + return get_doc_event(This, EVENTID_CLICK, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_ondblclick(IHTMLDocument2 *iface, VARIANT v) @@ -1701,7 +1701,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_ondblclick(IHTMLDocument2 *iface,
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_DBLCLICK, &v); + return set_doc_event(This, EVENTID_DBLCLICK, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_ondblclick(IHTMLDocument2 *iface, VARIANT *p) @@ -1710,7 +1710,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_ondblclick(IHTMLDocument2 *iface,
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_DBLCLICK, p); + return get_doc_event(This, EVENTID_DBLCLICK, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onkeyup(IHTMLDocument2 *iface, VARIANT v) @@ -1719,7 +1719,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onkeyup(IHTMLDocument2 *iface, VA
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_KEYUP, &v); + return set_doc_event(This, EVENTID_KEYUP, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onkeyup(IHTMLDocument2 *iface, VARIANT *p) @@ -1728,7 +1728,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onkeyup(IHTMLDocument2 *iface, VA
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_KEYUP, p); + return get_doc_event(This, EVENTID_KEYUP, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onkeydown(IHTMLDocument2 *iface, VARIANT v) @@ -1737,7 +1737,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onkeydown(IHTMLDocument2 *iface,
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_KEYDOWN, &v); + return set_doc_event(This, EVENTID_KEYDOWN, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onkeydown(IHTMLDocument2 *iface, VARIANT *p) @@ -1746,7 +1746,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onkeydown(IHTMLDocument2 *iface,
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_KEYDOWN, p); + return get_doc_event(This, EVENTID_KEYDOWN, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onkeypress(IHTMLDocument2 *iface, VARIANT v) @@ -1755,7 +1755,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onkeypress(IHTMLDocument2 *iface,
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_KEYPRESS, &v); + return set_doc_event(This, EVENTID_KEYPRESS, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onkeypress(IHTMLDocument2 *iface, VARIANT *p) @@ -1764,7 +1764,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onkeypress(IHTMLDocument2 *iface,
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_KEYPRESS, p); + return get_doc_event(This, EVENTID_KEYPRESS, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onmouseup(IHTMLDocument2 *iface, VARIANT v) @@ -1773,7 +1773,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onmouseup(IHTMLDocument2 *iface,
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_MOUSEUP, &v); + return set_doc_event(This, EVENTID_MOUSEUP, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onmouseup(IHTMLDocument2 *iface, VARIANT *p) @@ -1782,7 +1782,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onmouseup(IHTMLDocument2 *iface,
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_MOUSEUP, p); + return get_doc_event(This, EVENTID_MOUSEUP, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onmousedown(IHTMLDocument2 *iface, VARIANT v) @@ -1791,7 +1791,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onmousedown(IHTMLDocument2 *iface
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_MOUSEDOWN, &v); + return set_doc_event(This, EVENTID_MOUSEDOWN, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onmousedown(IHTMLDocument2 *iface, VARIANT *p) @@ -1800,7 +1800,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onmousedown(IHTMLDocument2 *iface
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_MOUSEDOWN, p); + return get_doc_event(This, EVENTID_MOUSEDOWN, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onmousemove(IHTMLDocument2 *iface, VARIANT v) @@ -1809,7 +1809,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onmousemove(IHTMLDocument2 *iface
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_MOUSEMOVE, &v); + return set_doc_event(This, EVENTID_MOUSEMOVE, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onmousemove(IHTMLDocument2 *iface, VARIANT *p) @@ -1818,7 +1818,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onmousemove(IHTMLDocument2 *iface
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_MOUSEMOVE, p); + return get_doc_event(This, EVENTID_MOUSEMOVE, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onmouseout(IHTMLDocument2 *iface, VARIANT v) @@ -1827,7 +1827,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onmouseout(IHTMLDocument2 *iface,
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_MOUSEOUT, &v); + return set_doc_event(This, EVENTID_MOUSEOUT, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onmouseout(IHTMLDocument2 *iface, VARIANT *p) @@ -1836,7 +1836,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onmouseout(IHTMLDocument2 *iface,
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_MOUSEOUT, p); + return get_doc_event(This, EVENTID_MOUSEOUT, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onmouseover(IHTMLDocument2 *iface, VARIANT v) @@ -1845,7 +1845,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onmouseover(IHTMLDocument2 *iface
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_MOUSEOVER, &v); + return set_doc_event(This, EVENTID_MOUSEOVER, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onmouseover(IHTMLDocument2 *iface, VARIANT *p) @@ -1854,7 +1854,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onmouseover(IHTMLDocument2 *iface
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_MOUSEOVER, p); + return get_doc_event(This, EVENTID_MOUSEOVER, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onreadystatechange(IHTMLDocument2 *iface, VARIANT v) @@ -1863,7 +1863,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onreadystatechange(IHTMLDocument2
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_READYSTATECHANGE, &v); + return set_doc_event(This, EVENTID_READYSTATECHANGE, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onreadystatechange(IHTMLDocument2 *iface, VARIANT *p) @@ -1872,7 +1872,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onreadystatechange(IHTMLDocument2
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_READYSTATECHANGE, p); + return get_doc_event(This, EVENTID_READYSTATECHANGE, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onafterupdate(IHTMLDocument2 *iface, VARIANT v) @@ -1923,7 +1923,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_ondragstart(IHTMLDocument2 *iface
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_DRAGSTART, &v); + return set_doc_event(This, EVENTID_DRAGSTART, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_ondragstart(IHTMLDocument2 *iface, VARIANT *p) @@ -1932,7 +1932,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_ondragstart(IHTMLDocument2 *iface
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_DRAGSTART, p); + return get_doc_event(This, EVENTID_DRAGSTART, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_put_onselectstart(IHTMLDocument2 *iface, VARIANT v) @@ -1941,7 +1941,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_put_onselectstart(IHTMLDocument2 *ifa
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_SELECTSTART, &v); + return set_doc_event(This, EVENTID_SELECTSTART, &v); }
static HRESULT WINAPI DocNodeHTMLDocument2_get_onselectstart(IHTMLDocument2 *iface, VARIANT *p) @@ -1950,7 +1950,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_onselectstart(IHTMLDocument2 *ifa
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_SELECTSTART, p); + return get_doc_event(This, EVENTID_SELECTSTART, p); }
static HRESULT WINAPI DocNodeHTMLDocument2_elementFromPoint(IHTMLDocument2 *iface, LONG x, LONG y, @@ -1991,7 +1991,7 @@ static HRESULT WINAPI DocNodeHTMLDocument2_get_parentWindow(IHTMLDocument2 *ifac
TRACE("(%p)->(%p)\n", This, p);
- hres = IHTMLDocument7_get_defaultView(&This->basedoc.IHTMLDocument7_iface, p); + hres = IHTMLDocument7_get_defaultView(&This->IHTMLDocument7_iface, p); return hres == S_OK && !*p ? E_FAIL : hres; }
@@ -2251,7 +2251,7 @@ static HRESULT WINAPI DocObjHTMLDocument2_get_Script(IHTMLDocument2 *iface, IDis
TRACE("(%p)->(%p)\n", This, p);
- hres = IHTMLDocument7_get_parentWindow(&This->basedoc.IHTMLDocument7_iface, (IHTMLWindow2**)p); + hres = IHTMLDocument7_get_parentWindow(&This->IHTMLDocument7_iface, (IHTMLWindow2**)p); return hres == S_OK && !*p ? E_PENDING : hres; }
@@ -2626,7 +2626,7 @@ static HRESULT WINAPI DocObjHTMLDocument2_get_parentWindow(IHTMLDocument2 *iface
TRACE("(%p)->(%p)\n", This, p);
- hres = IHTMLDocument7_get_defaultView(&This->basedoc.IHTMLDocument7_iface, p); + hres = IHTMLDocument7_get_defaultView(&This->IHTMLDocument7_iface, p); return hres == S_OK && !*p ? E_FAIL : hres; }
@@ -3081,7 +3081,7 @@ static HRESULT WINAPI DocNodeHTMLDocument3_put_oncontextmenu(IHTMLDocument3 *ifa
TRACE("(%p)->()\n", This);
- return set_doc_event(&This->basedoc, EVENTID_CONTEXTMENU, &v); + return set_doc_event(This, EVENTID_CONTEXTMENU, &v); }
static HRESULT WINAPI DocNodeHTMLDocument3_get_oncontextmenu(IHTMLDocument3 *iface, VARIANT *p) @@ -3090,7 +3090,7 @@ static HRESULT WINAPI DocNodeHTMLDocument3_get_oncontextmenu(IHTMLDocument3 *ifa
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_CONTEXTMENU, p); + return get_doc_event(This, EVENTID_CONTEXTMENU, p); }
static HRESULT WINAPI DocNodeHTMLDocument3_put_onstop(IHTMLDocument3 *iface, VARIANT v) @@ -3637,7 +3637,7 @@ static HRESULT WINAPI DocNodeHTMLDocument4_put_onselectionchange(IHTMLDocument4
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_SELECTIONCHANGE, &v); + return set_doc_event(This, EVENTID_SELECTIONCHANGE, &v); }
static HRESULT WINAPI DocNodeHTMLDocument4_get_onselectionchange(IHTMLDocument4 *iface, VARIANT *p) @@ -3646,7 +3646,7 @@ static HRESULT WINAPI DocNodeHTMLDocument4_get_onselectionchange(IHTMLDocument4
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_SELECTIONCHANGE, p); + return get_doc_event(This, EVENTID_SELECTIONCHANGE, p); }
static HRESULT WINAPI DocNodeHTMLDocument4_get_namespaces(IHTMLDocument4 *iface, IDispatch **p) @@ -3920,7 +3920,7 @@ static HRESULT WINAPI DocNodeHTMLDocument5_put_onmousewheel(IHTMLDocument5 *ifac
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_MOUSEWHEEL, &v); + return set_doc_event(This, EVENTID_MOUSEWHEEL, &v); }
static HRESULT WINAPI DocNodeHTMLDocument5_get_onmousewheel(IHTMLDocument5 *iface, VARIANT *p) @@ -3929,7 +3929,7 @@ static HRESULT WINAPI DocNodeHTMLDocument5_get_onmousewheel(IHTMLDocument5 *ifac
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_MOUSEWHEEL, p); + return get_doc_event(This, EVENTID_MOUSEWHEEL, p); }
static HRESULT WINAPI DocNodeHTMLDocument5_get_doctype(IHTMLDocument5 *iface, IHTMLDOMNode **p) @@ -4039,7 +4039,7 @@ static HRESULT WINAPI DocNodeHTMLDocument5_put_onfocusin(IHTMLDocument5 *iface,
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_FOCUSIN, &v); + return set_doc_event(This, EVENTID_FOCUSIN, &v); }
static HRESULT WINAPI DocNodeHTMLDocument5_get_onfocusin(IHTMLDocument5 *iface, VARIANT *p) @@ -4048,7 +4048,7 @@ static HRESULT WINAPI DocNodeHTMLDocument5_get_onfocusin(IHTMLDocument5 *iface,
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_FOCUSIN, p); + return get_doc_event(This, EVENTID_FOCUSIN, p); }
static HRESULT WINAPI DocNodeHTMLDocument5_put_onfocusout(IHTMLDocument5 *iface, VARIANT v) @@ -4057,7 +4057,7 @@ static HRESULT WINAPI DocNodeHTMLDocument5_put_onfocusout(IHTMLDocument5 *iface,
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_FOCUSOUT, &v); + return set_doc_event(This, EVENTID_FOCUSOUT, &v); }
static HRESULT WINAPI DocNodeHTMLDocument5_get_onfocusout(IHTMLDocument5 *iface, VARIANT *p) @@ -4066,7 +4066,7 @@ static HRESULT WINAPI DocNodeHTMLDocument5_get_onfocusout(IHTMLDocument5 *iface,
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_FOCUSOUT, p); + return get_doc_event(This, EVENTID_FOCUSOUT, p); }
static HRESULT WINAPI DocNodeHTMLDocument5_put_onactivate(IHTMLDocument5 *iface, VARIANT v) @@ -4308,7 +4308,7 @@ static HRESULT WINAPI DocNodeHTMLDocument6_get_onstorage(IHTMLDocument6 *iface,
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_STORAGE, p); + return get_doc_event(This, EVENTID_STORAGE, p); }
static HRESULT WINAPI DocNodeHTMLDocument6_put_onstorage(IHTMLDocument6 *iface, VARIANT v) @@ -4317,7 +4317,7 @@ static HRESULT WINAPI DocNodeHTMLDocument6_put_onstorage(IHTMLDocument6 *iface,
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_STORAGE, &v); + return set_doc_event(This, EVENTID_STORAGE, &v); }
static HRESULT WINAPI DocNodeHTMLDocument6_get_onstoragecommit(IHTMLDocument6 *iface, @@ -4327,7 +4327,7 @@ static HRESULT WINAPI DocNodeHTMLDocument6_get_onstoragecommit(IHTMLDocument6 *i
TRACE("(%p)->(%p)\n", This, p);
- return get_doc_event(&This->basedoc, EVENTID_STORAGECOMMIT, p); + return get_doc_event(This, EVENTID_STORAGECOMMIT, p); }
static HRESULT WINAPI DocNodeHTMLDocument6_put_onstoragecommit(IHTMLDocument6 *iface, VARIANT v) @@ -4336,7 +4336,7 @@ static HRESULT WINAPI DocNodeHTMLDocument6_put_onstoragecommit(IHTMLDocument6 *i
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return set_doc_event(&This->basedoc, EVENTID_STORAGECOMMIT, &v); + return set_doc_event(This, EVENTID_STORAGECOMMIT, &v); }
static HRESULT WINAPI DocNodeHTMLDocument6_getElementById(IHTMLDocument6 *iface, @@ -4448,62 +4448,60 @@ static const IHTMLDocument6Vtbl DocObjHTMLDocument6Vtbl = { DocObjHTMLDocument6_updateSettings };
-static inline HTMLDocument *impl_from_IHTMLDocument7(IHTMLDocument7 *iface) +static inline HTMLDocumentNode *HTMLDocumentNode_from_IHTMLDocument7(IHTMLDocument7 *iface) { - return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument7_iface); + return CONTAINING_RECORD(iface, HTMLDocumentNode, IHTMLDocument7_iface); }
-static HRESULT WINAPI HTMLDocument7_QueryInterface(IHTMLDocument7 *iface, REFIID riid, void **ppv) +static HRESULT WINAPI DocNodeHTMLDocument7_QueryInterface(IHTMLDocument7 *iface, REFIID riid, void **ppv) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); - return htmldoc_query_interface(This, riid, ppv); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); + return htmldoc_query_interface(&This->basedoc, riid, ppv); }
-static ULONG WINAPI HTMLDocument7_AddRef(IHTMLDocument7 *iface) +static ULONG WINAPI DocNodeHTMLDocument7_AddRef(IHTMLDocument7 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); - return htmldoc_addref(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); + return htmldoc_addref(&This->basedoc); }
-static ULONG WINAPI HTMLDocument7_Release(IHTMLDocument7 *iface) +static ULONG WINAPI DocNodeHTMLDocument7_Release(IHTMLDocument7 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); - return htmldoc_release(This); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); + return htmldoc_release(&This->basedoc); }
-static HRESULT WINAPI HTMLDocument7_GetTypeInfoCount(IHTMLDocument7 *iface, UINT *pctinfo) +static HRESULT WINAPI DocNodeHTMLDocument7_GetTypeInfoCount(IHTMLDocument7 *iface, UINT *pctinfo) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); - return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); + return IDispatchEx_GetTypeInfoCount(&This->basedoc.IDispatchEx_iface, pctinfo); }
-static HRESULT WINAPI HTMLDocument7_GetTypeInfo(IHTMLDocument7 *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) +static HRESULT WINAPI DocNodeHTMLDocument7_GetTypeInfo(IHTMLDocument7 *iface, UINT iTInfo, LCID lcid, + ITypeInfo **ppTInfo) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); - return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); + return IDispatchEx_GetTypeInfo(&This->basedoc.IDispatchEx_iface, iTInfo, lcid, ppTInfo); }
-static HRESULT WINAPI HTMLDocument7_GetIDsOfNames(IHTMLDocument7 *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +static HRESULT WINAPI DocNodeHTMLDocument7_GetIDsOfNames(IHTMLDocument7 *iface, REFIID riid, LPOLESTR *rgszNames, + UINT cNames, LCID lcid, DISPID *rgDispId) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); - return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid, - rgDispId); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); + return IDispatchEx_GetIDsOfNames(&This->basedoc.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); }
-static HRESULT WINAPI HTMLDocument7_Invoke(IHTMLDocument7 *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +static HRESULT WINAPI DocNodeHTMLDocument7_Invoke(IHTMLDocument7 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, + WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); - return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); + return IDispatchEx_Invoke(&This->basedoc.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); }
-static HRESULT WINAPI HTMLDocument7_get_defaultView(IHTMLDocument7 *iface, IHTMLWindow2 **p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_defaultView(IHTMLDocument7 *iface, IHTMLWindow2 **p) { - HTMLDocumentNode *This = impl_from_IHTMLDocument7(iface)->doc_node; + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
@@ -4516,31 +4514,31 @@ static HRESULT WINAPI HTMLDocument7_get_defaultView(IHTMLDocument7 *iface, IHTML return S_OK; }
-static HRESULT WINAPI HTMLDocument7_createCDATASection(IHTMLDocument7 *iface, BSTR text, IHTMLDOMNode **newCDATASectionNode) +static HRESULT WINAPI DocNodeHTMLDocument7_createCDATASection(IHTMLDocument7 *iface, BSTR text, IHTMLDOMNode **newCDATASectionNode) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, newCDATASectionNode); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_getSelection(IHTMLDocument7 *iface, IHTMLSelection **ppIHTMLSelection) +static HRESULT WINAPI DocNodeHTMLDocument7_getSelection(IHTMLDocument7 *iface, IHTMLSelection **ppIHTMLSelection) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, ppIHTMLSelection); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_getElementsByTagNameNS(IHTMLDocument7 *iface, VARIANT *pvarNS, +static HRESULT WINAPI DocNodeHTMLDocument7_getElementsByTagNameNS(IHTMLDocument7 *iface, VARIANT *pvarNS, BSTR bstrLocalName, IHTMLElementCollection **pelColl) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s %s %p)\n", This, debugstr_variant(pvarNS), debugstr_w(bstrLocalName), pelColl); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_createElementNS(IHTMLDocument7 *iface, VARIANT *pvarNS, BSTR bstrTag, IHTMLElement **newElem) +static HRESULT WINAPI DocNodeHTMLDocument7_createElementNS(IHTMLDocument7 *iface, VARIANT *pvarNS, BSTR bstrTag, IHTMLElement **newElem) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); nsIDOMElement *dom_element; HTMLElement *element; nsAString ns, tag; @@ -4549,7 +4547,7 @@ static HRESULT WINAPI HTMLDocument7_createElementNS(IHTMLDocument7 *iface, VARIA
TRACE("(%p)->(%s %s %p)\n", This, debugstr_variant(pvarNS), debugstr_w(bstrTag), newElem);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { FIXME("NULL nsdoc\n"); return E_FAIL; } @@ -4559,7 +4557,7 @@ static HRESULT WINAPI HTMLDocument7_createElementNS(IHTMLDocument7 *iface, VARIA
nsAString_InitDepend(&ns, pvarNS && V_VT(pvarNS) == VT_BSTR ? V_BSTR(pvarNS) : NULL); nsAString_InitDepend(&tag, bstrTag); - nsres = nsIDOMHTMLDocument_CreateElementNS(This->doc_node->nsdoc, &ns, &tag, &dom_element); + nsres = nsIDOMHTMLDocument_CreateElementNS(This->nsdoc, &ns, &tag, &dom_element); nsAString_Finish(&ns); nsAString_Finish(&tag); if(NS_FAILED(nsres)) { @@ -4567,7 +4565,7 @@ static HRESULT WINAPI HTMLDocument7_createElementNS(IHTMLDocument7 *iface, VARIA return map_nsresult(nsres); }
- hres = HTMLElement_Create(This->doc_node, (nsIDOMNode*)dom_element, FALSE, &element); + hres = HTMLElement_Create(This, (nsIDOMNode*)dom_element, FALSE, &element); nsIDOMElement_Release(dom_element); if(FAILED(hres)) return hres; @@ -4576,82 +4574,82 @@ static HRESULT WINAPI HTMLDocument7_createElementNS(IHTMLDocument7 *iface, VARIA return S_OK; }
-static HRESULT WINAPI HTMLDocument7_createAttributeNS(IHTMLDocument7 *iface, VARIANT *pvarNS, +static HRESULT WINAPI DocNodeHTMLDocument7_createAttributeNS(IHTMLDocument7 *iface, VARIANT *pvarNS, BSTR bstrAttrName, IHTMLDOMAttribute **ppAttribute) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s %s %p)\n", This, debugstr_variant(pvarNS), debugstr_w(bstrAttrName), ppAttribute); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onmsthumbnailclick(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onmsthumbnailclick(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onmsthumbnailclick(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onmsthumbnailclick(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_MSTHUMBNAILCLICK, p); }
-static HRESULT WINAPI HTMLDocument7_get_characterSet(IHTMLDocument7 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_characterSet(IHTMLDocument7 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); nsAString charset_str; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { FIXME("NULL nsdoc\n"); return E_FAIL; }
nsAString_Init(&charset_str, NULL); - nsres = nsIDOMHTMLDocument_GetCharacterSet(This->doc_node->nsdoc, &charset_str); + nsres = nsIDOMHTMLDocument_GetCharacterSet(This->nsdoc, &charset_str); return return_nsstr(nsres, &charset_str, p); }
-static HRESULT WINAPI HTMLDocument7_createElement(IHTMLDocument7 *iface, BSTR bstrTag, IHTMLElement **newElem) +static HRESULT WINAPI DocNodeHTMLDocument7_createElement(IHTMLDocument7 *iface, BSTR bstrTag, IHTMLElement **newElem) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrTag), newElem);
- return IHTMLDocument2_createElement(&This->doc_node->IHTMLDocument2_iface, bstrTag, newElem); + return IHTMLDocument2_createElement(&This->IHTMLDocument2_iface, bstrTag, newElem); }
-static HRESULT WINAPI HTMLDocument7_createAttribute(IHTMLDocument7 *iface, BSTR bstrAttrName, IHTMLDOMAttribute **ppAttribute) +static HRESULT WINAPI DocNodeHTMLDocument7_createAttribute(IHTMLDocument7 *iface, BSTR bstrAttrName, IHTMLDOMAttribute **ppAttribute) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrAttrName), ppAttribute);
- return IHTMLDocument5_createAttribute(&This->doc_node->IHTMLDocument5_iface, bstrAttrName, ppAttribute); + return IHTMLDocument5_createAttribute(&This->IHTMLDocument5_iface, bstrAttrName, ppAttribute); }
-static HRESULT WINAPI HTMLDocument7_getElementsByClassName(IHTMLDocument7 *iface, BSTR v, IHTMLElementCollection **pel) +static HRESULT WINAPI DocNodeHTMLDocument7_getElementsByClassName(IHTMLDocument7 *iface, BSTR v, IHTMLElementCollection **pel) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); nsIDOMNodeList *nslist; nsAString nsstr; nsresult nsres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pel);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { FIXME("NULL nsdoc not supported\n"); return E_NOTIMPL; }
nsAString_InitDepend(&nsstr, v); - nsres = nsIDOMHTMLDocument_GetElementsByClassName(This->doc_node->nsdoc, &nsstr, &nslist); + nsres = nsIDOMHTMLDocument_GetElementsByClassName(This->nsdoc, &nsstr, &nslist); nsAString_Finish(&nsstr); if(FAILED(nsres)) { ERR("GetElementByClassName failed: %08lx\n", nsres); @@ -4659,699 +4657,699 @@ static HRESULT WINAPI HTMLDocument7_getElementsByClassName(IHTMLDocument7 *iface }
- *pel = create_collection_from_nodelist(nslist, This->doc_node->document_mode); + *pel = create_collection_from_nodelist(nslist, This->document_mode); nsIDOMNodeList_Release(nslist); return S_OK; }
-static HRESULT WINAPI HTMLDocument7_createProcessingInstruction(IHTMLDocument7 *iface, BSTR target, +static HRESULT WINAPI DocNodeHTMLDocument7_createProcessingInstruction(IHTMLDocument7 *iface, BSTR target, BSTR data, IDOMProcessingInstruction **newProcessingInstruction) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(target), debugstr_w(data), newProcessingInstruction); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_adoptNode(IHTMLDocument7 *iface, IHTMLDOMNode *pNodeSource, IHTMLDOMNode3 **ppNodeDest) +static HRESULT WINAPI DocNodeHTMLDocument7_adoptNode(IHTMLDocument7 *iface, IHTMLDOMNode *pNodeSource, IHTMLDOMNode3 **ppNodeDest) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p %p)\n", This, pNodeSource, ppNodeDest); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onmssitemodejumplistitemremoved(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onmssitemodejumplistitemremoved(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onmssitemodejumplistitemremoved(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onmssitemodejumplistitemremoved(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_all(IHTMLDocument7 *iface, IHTMLElementCollection **p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_all(IHTMLDocument7 *iface, IHTMLElementCollection **p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
- return IHTMLDocument2_get_all(&This->doc_node->IHTMLDocument2_iface, p); + return IHTMLDocument2_get_all(&This->IHTMLDocument2_iface, p); }
-static HRESULT WINAPI HTMLDocument7_get_inputEncoding(IHTMLDocument7 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_inputEncoding(IHTMLDocument7 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_xmlEncoding(IHTMLDocument7 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_xmlEncoding(IHTMLDocument7 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_xmlStandalone(IHTMLDocument7 *iface, VARIANT_BOOL v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_xmlStandalone(IHTMLDocument7 *iface, VARIANT_BOOL v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%x)\n", This, v); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_xmlStandalone(IHTMLDocument7 *iface, VARIANT_BOOL *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_xmlStandalone(IHTMLDocument7 *iface, VARIANT_BOOL *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_xmlVersion(IHTMLDocument7 *iface, BSTR v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_xmlVersion(IHTMLDocument7 *iface, BSTR v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_w(v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_xmlVersion(IHTMLDocument7 *iface, BSTR *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_xmlVersion(IHTMLDocument7 *iface, BSTR *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_hasAttributes(IHTMLDocument7 *iface, VARIANT_BOOL *pfHasAttributes) +static HRESULT WINAPI DocNodeHTMLDocument7_hasAttributes(IHTMLDocument7 *iface, VARIANT_BOOL *pfHasAttributes) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, pfHasAttributes); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onabort(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onabort(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_ABORT, &v); }
-static HRESULT WINAPI HTMLDocument7_get_onabort(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onabort(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_ABORT, p); }
-static HRESULT WINAPI HTMLDocument7_put_onblur(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onblur(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_BLUR, &v); }
-static HRESULT WINAPI HTMLDocument7_get_onblur(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onblur(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_BLUR, p); }
-static HRESULT WINAPI HTMLDocument7_put_oncanplay(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_oncanplay(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_oncanplay(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_oncanplay(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_oncanplaythrough(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_oncanplaythrough(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_oncanplaythrough(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_oncanplaythrough(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onchange(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onchange(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_CHANGE, &v); }
-static HRESULT WINAPI HTMLDocument7_get_onchange(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onchange(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_CHANGE, p); }
-static HRESULT WINAPI HTMLDocument7_put_ondrag(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_ondrag(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_DRAG, &v); }
-static HRESULT WINAPI HTMLDocument7_get_ondrag(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_ondrag(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_DRAG, p); }
-static HRESULT WINAPI HTMLDocument7_put_ondragend(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_ondragend(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_ondragend(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_ondragend(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_ondragenter(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_ondragenter(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_ondragenter(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_ondragenter(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_ondragleave(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_ondragleave(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_ondragleave(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_ondragleave(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_ondragover(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_ondragover(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_ondragover(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_ondragover(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_ondrop(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_ondrop(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_ondrop(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_ondrop(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_ondurationchange(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_ondurationchange(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_ondurationchange(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_ondurationchange(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onemptied(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onemptied(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onemptied(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onemptied(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onended(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onended(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onended(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onended(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onerror(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onerror(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_ERROR, &v); }
-static HRESULT WINAPI HTMLDocument7_get_onerror(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onerror(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_ERROR, p); }
-static HRESULT WINAPI HTMLDocument7_put_onfocus(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onfocus(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_FOCUS, &v); }
-static HRESULT WINAPI HTMLDocument7_get_onfocus(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onfocus(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_FOCUS, p); }
-static HRESULT WINAPI HTMLDocument7_put_oninput(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_oninput(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_INPUT, &v); }
-static HRESULT WINAPI HTMLDocument7_get_oninput(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_oninput(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_INPUT, p); }
-static HRESULT WINAPI HTMLDocument7_put_onload(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onload(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_LOAD, &v); }
-static HRESULT WINAPI HTMLDocument7_get_onload(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onload(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_LOAD, p); }
-static HRESULT WINAPI HTMLDocument7_put_onloadeddata(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onloadeddata(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onloadeddata(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onloadeddata(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onloadedmetadata(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onloadedmetadata(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onloadedmetadata(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onloadedmetadata(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onloadstart(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onloadstart(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onloadstart(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onloadstart(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onpause(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onpause(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onpause(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onpause(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onplay(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onplay(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onplay(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onplay(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onplaying(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onplaying(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onplaying(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onplaying(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onprogress(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onprogress(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onprogress(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onprogress(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onratechange(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onratechange(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onratechange(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onratechange(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onreset(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onreset(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onreset(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onreset(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onscroll(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onscroll(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_SCROLL, &v); }
-static HRESULT WINAPI HTMLDocument7_get_onscroll(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onscroll(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_SCROLL, p); }
-static HRESULT WINAPI HTMLDocument7_put_onseekend(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onseeked(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onseekend(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onseeked(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onseeking(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onseeking(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onseeking(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onseeking(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onselect(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onselect(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onselect(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onselect(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onstalled(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onstalled(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onstalled(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onstalled(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onsubmit(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onsubmit(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_SUBMIT, &v); }
-static HRESULT WINAPI HTMLDocument7_get_onsubmit(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onsubmit(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_SUBMIT, p); }
-static HRESULT WINAPI HTMLDocument7_put_onsuspend(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onsuspend(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onsuspend(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onsuspend(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_ontimeupdate(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_ontimeupdate(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_ontimeupdate(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_ontimeupdate(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onvolumechange(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onvolumechange(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onvolumechange(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onvolumechange(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_put_onwaiting(IHTMLDocument7 *iface, VARIANT v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_onwaiting(IHTMLDocument7 *iface, VARIANT v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_onwaiting(IHTMLDocument7 *iface, VARIANT *p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_onwaiting(IHTMLDocument7 *iface, VARIANT *p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, p); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_normalize(IHTMLDocument7 *iface) +static HRESULT WINAPI DocNodeHTMLDocument7_normalize(IHTMLDocument7 *iface) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)\n", This); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_importNode(IHTMLDocument7 *iface, IHTMLDOMNode *pNodeSource, +static HRESULT WINAPI DocNodeHTMLDocument7_importNode(IHTMLDocument7 *iface, IHTMLDOMNode *pNodeSource, VARIANT_BOOL fDeep, IHTMLDOMNode3 **ppNodeDest) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p %x %p)\n", This, pNodeSource, fDeep, ppNodeDest); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_parentWindow(IHTMLDocument7 *iface, IHTMLWindow2 **p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_parentWindow(IHTMLDocument7 *iface, IHTMLWindow2 **p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
return IHTMLDocument7_get_defaultView(&This->IHTMLDocument7_iface, p); }
-static HRESULT WINAPI HTMLDocument7_put_body(IHTMLDocument7 *iface, IHTMLElement *v) +static HRESULT WINAPI DocNodeHTMLDocument7_put_body(IHTMLDocument7 *iface, IHTMLElement *v) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); FIXME("(%p)->(%p)\n", This, v); return E_NOTIMPL; }
-static HRESULT WINAPI HTMLDocument7_get_body(IHTMLDocument7 *iface, IHTMLElement **p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_body(IHTMLDocument7 *iface, IHTMLElement **p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface);
TRACE("(%p)->(%p)\n", This, p);
- return IHTMLDocument2_get_body(&This->doc_node->IHTMLDocument2_iface, p); + return IHTMLDocument2_get_body(&This->IHTMLDocument2_iface, p); }
-static HRESULT WINAPI HTMLDocument7_get_head(IHTMLDocument7 *iface, IHTMLElement **p) +static HRESULT WINAPI DocNodeHTMLDocument7_get_head(IHTMLDocument7 *iface, IHTMLElement **p) { - HTMLDocument *This = impl_from_IHTMLDocument7(iface); + HTMLDocumentNode *This = HTMLDocumentNode_from_IHTMLDocument7(iface); nsIDOMHTMLHeadElement *nshead; nsIDOMElement *nselem; HTMLElement *elem; @@ -5360,12 +5358,12 @@ static HRESULT WINAPI HTMLDocument7_get_head(IHTMLDocument7 *iface, IHTMLElement
TRACE("(%p)->(%p)\n", This, p);
- if(!This->doc_node->nsdoc) { + if(!This->nsdoc) { FIXME("No document\n"); return E_FAIL; }
- nsres = nsIDOMHTMLDocument_GetHead(This->doc_node->nsdoc, &nshead); + nsres = nsIDOMHTMLDocument_GetHead(This->nsdoc, &nshead); assert(nsres == NS_OK);
if(!nshead) { @@ -5386,118 +5384,367 @@ static HRESULT WINAPI HTMLDocument7_get_head(IHTMLDocument7 *iface, IHTMLElement return S_OK; }
-static const IHTMLDocument7Vtbl HTMLDocument7Vtbl = { - HTMLDocument7_QueryInterface, - HTMLDocument7_AddRef, - HTMLDocument7_Release, - HTMLDocument7_GetTypeInfoCount, - HTMLDocument7_GetTypeInfo, - HTMLDocument7_GetIDsOfNames, - HTMLDocument7_Invoke, - HTMLDocument7_get_defaultView, - HTMLDocument7_createCDATASection, - HTMLDocument7_getSelection, - HTMLDocument7_getElementsByTagNameNS, - HTMLDocument7_createElementNS, - HTMLDocument7_createAttributeNS, - HTMLDocument7_put_onmsthumbnailclick, - HTMLDocument7_get_onmsthumbnailclick, - HTMLDocument7_get_characterSet, - HTMLDocument7_createElement, - HTMLDocument7_createAttribute, - HTMLDocument7_getElementsByClassName, - HTMLDocument7_createProcessingInstruction, - HTMLDocument7_adoptNode, - HTMLDocument7_put_onmssitemodejumplistitemremoved, - HTMLDocument7_get_onmssitemodejumplistitemremoved, - HTMLDocument7_get_all, - HTMLDocument7_get_inputEncoding, - HTMLDocument7_get_xmlEncoding, - HTMLDocument7_put_xmlStandalone, - HTMLDocument7_get_xmlStandalone, - HTMLDocument7_put_xmlVersion, - HTMLDocument7_get_xmlVersion, - HTMLDocument7_hasAttributes, - HTMLDocument7_put_onabort, - HTMLDocument7_get_onabort, - HTMLDocument7_put_onblur, - HTMLDocument7_get_onblur, - HTMLDocument7_put_oncanplay, - HTMLDocument7_get_oncanplay, - HTMLDocument7_put_oncanplaythrough, - HTMLDocument7_get_oncanplaythrough, - HTMLDocument7_put_onchange, - HTMLDocument7_get_onchange, - HTMLDocument7_put_ondrag, - HTMLDocument7_get_ondrag, - HTMLDocument7_put_ondragend, - HTMLDocument7_get_ondragend, - HTMLDocument7_put_ondragenter, - HTMLDocument7_get_ondragenter, - HTMLDocument7_put_ondragleave, - HTMLDocument7_get_ondragleave, - HTMLDocument7_put_ondragover, - HTMLDocument7_get_ondragover, - HTMLDocument7_put_ondrop, - HTMLDocument7_get_ondrop, - HTMLDocument7_put_ondurationchange, - HTMLDocument7_get_ondurationchange, - HTMLDocument7_put_onemptied, - HTMLDocument7_get_onemptied, - HTMLDocument7_put_onended, - HTMLDocument7_get_onended, - HTMLDocument7_put_onerror, - HTMLDocument7_get_onerror, - HTMLDocument7_put_onfocus, - HTMLDocument7_get_onfocus, - HTMLDocument7_put_oninput, - HTMLDocument7_get_oninput, - HTMLDocument7_put_onload, - HTMLDocument7_get_onload, - HTMLDocument7_put_onloadeddata, - HTMLDocument7_get_onloadeddata, - HTMLDocument7_put_onloadedmetadata, - HTMLDocument7_get_onloadedmetadata, - HTMLDocument7_put_onloadstart, - HTMLDocument7_get_onloadstart, - HTMLDocument7_put_onpause, - HTMLDocument7_get_onpause, - HTMLDocument7_put_onplay, - HTMLDocument7_get_onplay, - HTMLDocument7_put_onplaying, - HTMLDocument7_get_onplaying, - HTMLDocument7_put_onprogress, - HTMLDocument7_get_onprogress, - HTMLDocument7_put_onratechange, - HTMLDocument7_get_onratechange, - HTMLDocument7_put_onreset, - HTMLDocument7_get_onreset, - HTMLDocument7_put_onscroll, - HTMLDocument7_get_onscroll, - HTMLDocument7_put_onseekend, - HTMLDocument7_get_onseekend, - HTMLDocument7_put_onseeking, - HTMLDocument7_get_onseeking, - HTMLDocument7_put_onselect, - HTMLDocument7_get_onselect, - HTMLDocument7_put_onstalled, - HTMLDocument7_get_onstalled, - HTMLDocument7_put_onsubmit, - HTMLDocument7_get_onsubmit, - HTMLDocument7_put_onsuspend, - HTMLDocument7_get_onsuspend, - HTMLDocument7_put_ontimeupdate, - HTMLDocument7_get_ontimeupdate, - HTMLDocument7_put_onvolumechange, - HTMLDocument7_get_onvolumechange, - HTMLDocument7_put_onwaiting, - HTMLDocument7_get_onwaiting, - HTMLDocument7_normalize, - HTMLDocument7_importNode, - HTMLDocument7_get_parentWindow, - HTMLDocument7_put_body, - HTMLDocument7_get_body, - HTMLDocument7_get_head +static const IHTMLDocument7Vtbl DocNodeHTMLDocument7Vtbl = { + DocNodeHTMLDocument7_QueryInterface, + DocNodeHTMLDocument7_AddRef, + DocNodeHTMLDocument7_Release, + DocNodeHTMLDocument7_GetTypeInfoCount, + DocNodeHTMLDocument7_GetTypeInfo, + DocNodeHTMLDocument7_GetIDsOfNames, + DocNodeHTMLDocument7_Invoke, + DocNodeHTMLDocument7_get_defaultView, + DocNodeHTMLDocument7_createCDATASection, + DocNodeHTMLDocument7_getSelection, + DocNodeHTMLDocument7_getElementsByTagNameNS, + DocNodeHTMLDocument7_createElementNS, + DocNodeHTMLDocument7_createAttributeNS, + DocNodeHTMLDocument7_put_onmsthumbnailclick, + DocNodeHTMLDocument7_get_onmsthumbnailclick, + DocNodeHTMLDocument7_get_characterSet, + DocNodeHTMLDocument7_createElement, + DocNodeHTMLDocument7_createAttribute, + DocNodeHTMLDocument7_getElementsByClassName, + DocNodeHTMLDocument7_createProcessingInstruction, + DocNodeHTMLDocument7_adoptNode, + DocNodeHTMLDocument7_put_onmssitemodejumplistitemremoved, + DocNodeHTMLDocument7_get_onmssitemodejumplistitemremoved, + DocNodeHTMLDocument7_get_all, + DocNodeHTMLDocument7_get_inputEncoding, + DocNodeHTMLDocument7_get_xmlEncoding, + DocNodeHTMLDocument7_put_xmlStandalone, + DocNodeHTMLDocument7_get_xmlStandalone, + DocNodeHTMLDocument7_put_xmlVersion, + DocNodeHTMLDocument7_get_xmlVersion, + DocNodeHTMLDocument7_hasAttributes, + DocNodeHTMLDocument7_put_onabort, + DocNodeHTMLDocument7_get_onabort, + DocNodeHTMLDocument7_put_onblur, + DocNodeHTMLDocument7_get_onblur, + DocNodeHTMLDocument7_put_oncanplay, + DocNodeHTMLDocument7_get_oncanplay, + DocNodeHTMLDocument7_put_oncanplaythrough, + DocNodeHTMLDocument7_get_oncanplaythrough, + DocNodeHTMLDocument7_put_onchange, + DocNodeHTMLDocument7_get_onchange, + DocNodeHTMLDocument7_put_ondrag, + DocNodeHTMLDocument7_get_ondrag, + DocNodeHTMLDocument7_put_ondragend, + DocNodeHTMLDocument7_get_ondragend, + DocNodeHTMLDocument7_put_ondragenter, + DocNodeHTMLDocument7_get_ondragenter, + DocNodeHTMLDocument7_put_ondragleave, + DocNodeHTMLDocument7_get_ondragleave, + DocNodeHTMLDocument7_put_ondragover, + DocNodeHTMLDocument7_get_ondragover, + DocNodeHTMLDocument7_put_ondrop, + DocNodeHTMLDocument7_get_ondrop, + DocNodeHTMLDocument7_put_ondurationchange, + DocNodeHTMLDocument7_get_ondurationchange, + DocNodeHTMLDocument7_put_onemptied, + DocNodeHTMLDocument7_get_onemptied, + DocNodeHTMLDocument7_put_onended, + DocNodeHTMLDocument7_get_onended, + DocNodeHTMLDocument7_put_onerror, + DocNodeHTMLDocument7_get_onerror, + DocNodeHTMLDocument7_put_onfocus, + DocNodeHTMLDocument7_get_onfocus, + DocNodeHTMLDocument7_put_oninput, + DocNodeHTMLDocument7_get_oninput, + DocNodeHTMLDocument7_put_onload, + DocNodeHTMLDocument7_get_onload, + DocNodeHTMLDocument7_put_onloadeddata, + DocNodeHTMLDocument7_get_onloadeddata, + DocNodeHTMLDocument7_put_onloadedmetadata, + DocNodeHTMLDocument7_get_onloadedmetadata, + DocNodeHTMLDocument7_put_onloadstart, + DocNodeHTMLDocument7_get_onloadstart, + DocNodeHTMLDocument7_put_onpause, + DocNodeHTMLDocument7_get_onpause, + DocNodeHTMLDocument7_put_onplay, + DocNodeHTMLDocument7_get_onplay, + DocNodeHTMLDocument7_put_onplaying, + DocNodeHTMLDocument7_get_onplaying, + DocNodeHTMLDocument7_put_onprogress, + DocNodeHTMLDocument7_get_onprogress, + DocNodeHTMLDocument7_put_onratechange, + DocNodeHTMLDocument7_get_onratechange, + DocNodeHTMLDocument7_put_onreset, + DocNodeHTMLDocument7_get_onreset, + DocNodeHTMLDocument7_put_onscroll, + DocNodeHTMLDocument7_get_onscroll, + DocNodeHTMLDocument7_put_onseeked, + DocNodeHTMLDocument7_get_onseeked, + DocNodeHTMLDocument7_put_onseeking, + DocNodeHTMLDocument7_get_onseeking, + DocNodeHTMLDocument7_put_onselect, + DocNodeHTMLDocument7_get_onselect, + DocNodeHTMLDocument7_put_onstalled, + DocNodeHTMLDocument7_get_onstalled, + DocNodeHTMLDocument7_put_onsubmit, + DocNodeHTMLDocument7_get_onsubmit, + DocNodeHTMLDocument7_put_onsuspend, + DocNodeHTMLDocument7_get_onsuspend, + DocNodeHTMLDocument7_put_ontimeupdate, + DocNodeHTMLDocument7_get_ontimeupdate, + DocNodeHTMLDocument7_put_onvolumechange, + DocNodeHTMLDocument7_get_onvolumechange, + DocNodeHTMLDocument7_put_onwaiting, + DocNodeHTMLDocument7_get_onwaiting, + DocNodeHTMLDocument7_normalize, + DocNodeHTMLDocument7_importNode, + DocNodeHTMLDocument7_get_parentWindow, + DocNodeHTMLDocument7_put_body, + DocNodeHTMLDocument7_get_body, + DocNodeHTMLDocument7_get_head +}; + +static inline HTMLDocumentObj *HTMLDocumentObj_from_IHTMLDocument7(IHTMLDocument7 *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocumentObj, IHTMLDocument7_iface); +} + +HTMLDOCUMENTOBJ_IDISPATCH_METHODS(HTMLDocument7) + +static HRESULT WINAPI DocObjHTMLDocument7_get_defaultView(IHTMLDocument7 *iface, IHTMLWindow2 **p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument7(iface); + + TRACE("(%p)->(%p)\n", This, p); + + if(This->basedoc.window) { + *p = &This->basedoc.window->base.IHTMLWindow2_iface; + IHTMLWindow2_AddRef(*p); + }else { + *p = NULL; + } + return S_OK; +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument7, createCDATASection, BSTR,IHTMLDOMNode**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, getSelection, IHTMLSelection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument7, getElementsByTagNameNS, VARIANT*,BSTR,IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument7, createElementNS, VARIANT*,BSTR,IHTMLElement**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument7, createAttributeNS, VARIANT*,BSTR,IHTMLDOMAttribute**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onmsthumbnailclick, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onmsthumbnailclick, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_characterSet, BSTR*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument7, createElement, BSTR,IHTMLElement**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument7, createAttribute, BSTR,IHTMLDOMAttribute**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument7, getElementsByClassName, BSTR,IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument7, createProcessingInstruction, BSTR,BSTR,IDOMProcessingInstruction**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_2(HTMLDocument7, adoptNode, IHTMLDOMNode*,IHTMLDOMNode3**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onmssitemodejumplistitemremoved, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onmssitemodejumplistitemremoved, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_all, IHTMLElementCollection**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_inputEncoding, BSTR*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_xmlEncoding, BSTR*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_xmlStandalone, VARIANT_BOOL) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_xmlStandalone, VARIANT_BOOL*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_xmlVersion, BSTR) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_xmlVersion, BSTR*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, hasAttributes, VARIANT_BOOL*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onabort, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onabort, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onblur, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onblur, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_oncanplay, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_oncanplay, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_oncanplaythrough, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_oncanplaythrough, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onchange, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onchange, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_ondrag, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_ondrag, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_ondragend, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_ondragend, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_ondragenter, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_ondragenter, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_ondragleave, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_ondragleave, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_ondragover, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_ondragover, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_ondrop, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_ondrop, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_ondurationchange, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_ondurationchange, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onemptied, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onemptied, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onended, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onended, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onerror, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onerror, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onfocus, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onfocus, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_oninput, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_oninput, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onload, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onload, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onloadeddata, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onloadeddata, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onloadedmetadata, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onloadedmetadata, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onloadstart, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onloadstart, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onpause, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onpause, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onplay, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onplay, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onplaying, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onplaying, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onprogress, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onprogress, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onratechange, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onratechange, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onreset, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onreset, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onscroll, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onscroll, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onseeked, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onseeked, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onseeking, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onseeking, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onselect, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onselect, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onstalled, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onstalled, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onsubmit, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onsubmit, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onsuspend, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onsuspend, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_ontimeupdate, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_ontimeupdate, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onvolumechange, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onvolumechange, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, put_onwaiting, VARIANT) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_onwaiting, VARIANT*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_0(HTMLDocument7, normalize) +HTMLDOCUMENTOBJ_FWD_TO_NODE_3(HTMLDocument7, importNode, IHTMLDOMNode*,VARIANT_BOOL,IHTMLDOMNode3**) + +static HRESULT WINAPI DocObjHTMLDocument7_get_parentWindow(IHTMLDocument7 *iface, IHTMLWindow2 **p) +{ + HTMLDocumentObj *This = HTMLDocumentObj_from_IHTMLDocument7(iface); + + TRACE("(%p)->(%p)\n", This, p); + + return IHTMLDocument7_get_defaultView(&This->IHTMLDocument7_iface, p); +} + +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, putref_body, IHTMLElement*) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_body, IHTMLElement**) +HTMLDOCUMENTOBJ_FWD_TO_NODE_1(HTMLDocument7, get_head, IHTMLElement**) + +static const IHTMLDocument7Vtbl DocObjHTMLDocument7Vtbl = { + DocObjHTMLDocument7_QueryInterface, + DocObjHTMLDocument7_AddRef, + DocObjHTMLDocument7_Release, + DocObjHTMLDocument7_GetTypeInfoCount, + DocObjHTMLDocument7_GetTypeInfo, + DocObjHTMLDocument7_GetIDsOfNames, + DocObjHTMLDocument7_Invoke, + DocObjHTMLDocument7_get_defaultView, + DocObjHTMLDocument7_createCDATASection, + DocObjHTMLDocument7_getSelection, + DocObjHTMLDocument7_getElementsByTagNameNS, + DocObjHTMLDocument7_createElementNS, + DocObjHTMLDocument7_createAttributeNS, + DocObjHTMLDocument7_put_onmsthumbnailclick, + DocObjHTMLDocument7_get_onmsthumbnailclick, + DocObjHTMLDocument7_get_characterSet, + DocObjHTMLDocument7_createElement, + DocObjHTMLDocument7_createAttribute, + DocObjHTMLDocument7_getElementsByClassName, + DocObjHTMLDocument7_createProcessingInstruction, + DocObjHTMLDocument7_adoptNode, + DocObjHTMLDocument7_put_onmssitemodejumplistitemremoved, + DocObjHTMLDocument7_get_onmssitemodejumplistitemremoved, + DocObjHTMLDocument7_get_all, + DocObjHTMLDocument7_get_inputEncoding, + DocObjHTMLDocument7_get_xmlEncoding, + DocObjHTMLDocument7_put_xmlStandalone, + DocObjHTMLDocument7_get_xmlStandalone, + DocObjHTMLDocument7_put_xmlVersion, + DocObjHTMLDocument7_get_xmlVersion, + DocObjHTMLDocument7_hasAttributes, + DocObjHTMLDocument7_put_onabort, + DocObjHTMLDocument7_get_onabort, + DocObjHTMLDocument7_put_onblur, + DocObjHTMLDocument7_get_onblur, + DocObjHTMLDocument7_put_oncanplay, + DocObjHTMLDocument7_get_oncanplay, + DocObjHTMLDocument7_put_oncanplaythrough, + DocObjHTMLDocument7_get_oncanplaythrough, + DocObjHTMLDocument7_put_onchange, + DocObjHTMLDocument7_get_onchange, + DocObjHTMLDocument7_put_ondrag, + DocObjHTMLDocument7_get_ondrag, + DocObjHTMLDocument7_put_ondragend, + DocObjHTMLDocument7_get_ondragend, + DocObjHTMLDocument7_put_ondragenter, + DocObjHTMLDocument7_get_ondragenter, + DocObjHTMLDocument7_put_ondragleave, + DocObjHTMLDocument7_get_ondragleave, + DocObjHTMLDocument7_put_ondragover, + DocObjHTMLDocument7_get_ondragover, + DocObjHTMLDocument7_put_ondrop, + DocObjHTMLDocument7_get_ondrop, + DocObjHTMLDocument7_put_ondurationchange, + DocObjHTMLDocument7_get_ondurationchange, + DocObjHTMLDocument7_put_onemptied, + DocObjHTMLDocument7_get_onemptied, + DocObjHTMLDocument7_put_onended, + DocObjHTMLDocument7_get_onended, + DocObjHTMLDocument7_put_onerror, + DocObjHTMLDocument7_get_onerror, + DocObjHTMLDocument7_put_onfocus, + DocObjHTMLDocument7_get_onfocus, + DocObjHTMLDocument7_put_oninput, + DocObjHTMLDocument7_get_oninput, + DocObjHTMLDocument7_put_onload, + DocObjHTMLDocument7_get_onload, + DocObjHTMLDocument7_put_onloadeddata, + DocObjHTMLDocument7_get_onloadeddata, + DocObjHTMLDocument7_put_onloadedmetadata, + DocObjHTMLDocument7_get_onloadedmetadata, + DocObjHTMLDocument7_put_onloadstart, + DocObjHTMLDocument7_get_onloadstart, + DocObjHTMLDocument7_put_onpause, + DocObjHTMLDocument7_get_onpause, + DocObjHTMLDocument7_put_onplay, + DocObjHTMLDocument7_get_onplay, + DocObjHTMLDocument7_put_onplaying, + DocObjHTMLDocument7_get_onplaying, + DocObjHTMLDocument7_put_onprogress, + DocObjHTMLDocument7_get_onprogress, + DocObjHTMLDocument7_put_onratechange, + DocObjHTMLDocument7_get_onratechange, + DocObjHTMLDocument7_put_onreset, + DocObjHTMLDocument7_get_onreset, + DocObjHTMLDocument7_put_onscroll, + DocObjHTMLDocument7_get_onscroll, + DocObjHTMLDocument7_put_onseeked, + DocObjHTMLDocument7_get_onseeked, + DocObjHTMLDocument7_put_onseeking, + DocObjHTMLDocument7_get_onseeking, + DocObjHTMLDocument7_put_onselect, + DocObjHTMLDocument7_get_onselect, + DocObjHTMLDocument7_put_onstalled, + DocObjHTMLDocument7_get_onstalled, + DocObjHTMLDocument7_put_onsubmit, + DocObjHTMLDocument7_get_onsubmit, + DocObjHTMLDocument7_put_onsuspend, + DocObjHTMLDocument7_get_onsuspend, + DocObjHTMLDocument7_put_ontimeupdate, + DocObjHTMLDocument7_get_ontimeupdate, + DocObjHTMLDocument7_put_onvolumechange, + DocObjHTMLDocument7_get_onvolumechange, + DocObjHTMLDocument7_put_onwaiting, + DocObjHTMLDocument7_get_onwaiting, + DocObjHTMLDocument7_normalize, + DocObjHTMLDocument7_importNode, + DocObjHTMLDocument7_get_parentWindow, + DocObjHTMLDocument7_putref_body, + DocObjHTMLDocument7_get_body, + DocObjHTMLDocument7_get_head };
static inline HTMLDocumentNode *HTMLDocumentNode_from_IDocumentSelector(IDocumentSelector *iface) @@ -6910,8 +7157,6 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) *ppv = &This->IDispatchEx_iface; else if(IsEqualGUID(&IID_IDispatchEx, riid)) *ppv = &This->IDispatchEx_iface; - else if(IsEqualGUID(&IID_IHTMLDocument7, riid)) - *ppv = &This->IHTMLDocument7_iface; else return FALSE;
@@ -6933,7 +7178,6 @@ static const cpc_entry_t HTMLDocumentNode_cpc[] = {
static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex) { - doc->IHTMLDocument7_iface.lpVtbl = &HTMLDocument7Vtbl; doc->IDispatchEx_iface.lpVtbl = &DocDispatchExVtbl;
doc->outer_unk = outer; @@ -6966,6 +7210,8 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) *ppv = &This->IHTMLDocument5_iface; else if(IsEqualGUID(&IID_IHTMLDocument6, riid)) *ppv = &This->IHTMLDocument6_iface; + else if(IsEqualGUID(&IID_IHTMLDocument7, riid)) + *ppv = &This->IHTMLDocument7_iface; else if(IsEqualGUID(&IID_IDocumentSelector, riid)) *ppv = &This->IDocumentSelector_iface; else if(IsEqualGUID(&IID_IDocumentEvent, riid)) @@ -7435,6 +7681,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo doc->IHTMLDocument4_iface.lpVtbl = &DocNodeHTMLDocument4Vtbl; doc->IHTMLDocument5_iface.lpVtbl = &DocNodeHTMLDocument5Vtbl; doc->IHTMLDocument6_iface.lpVtbl = &DocNodeHTMLDocument6Vtbl; + doc->IHTMLDocument7_iface.lpVtbl = &DocNodeHTMLDocument7Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocNodeDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocNodeDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocNodeSupportErrorInfoVtbl; @@ -7574,6 +7821,8 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii *ppv = &This->IHTMLDocument5_iface; }else if(IsEqualGUID(&IID_IHTMLDocument6, riid)) { *ppv = &This->IHTMLDocument6_iface; + }else if(IsEqualGUID(&IID_IHTMLDocument7, riid)) { + *ppv = &This->IHTMLDocument7_iface; }else if(IsEqualGUID(&IID_ICustomDoc, riid)) { *ppv = &This->ICustomDoc_iface; }else if(IsEqualGUID(&IID_IDocumentSelector, riid)) { @@ -7889,6 +8138,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii doc->IHTMLDocument4_iface.lpVtbl = &DocObjHTMLDocument4Vtbl; doc->IHTMLDocument5_iface.lpVtbl = &DocObjHTMLDocument5Vtbl; doc->IHTMLDocument6_iface.lpVtbl = &DocObjHTMLDocument6Vtbl; + doc->IHTMLDocument7_iface.lpVtbl = &DocObjHTMLDocument7Vtbl; doc->IDocumentSelector_iface.lpVtbl = &DocObjDocumentSelectorVtbl; doc->IDocumentEvent_iface.lpVtbl = &DocObjDocumentEventVtbl; doc->ISupportErrorInfo_iface.lpVtbl = &DocObjSupportErrorInfoVtbl; diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index fb2b395ca7a..f78c4a0f188 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -149,12 +149,12 @@ static inline HRESULT get_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT * return get_event_handler(get_node_event_prop_target(node, eid), eid, var); }
-static inline HRESULT set_doc_event(HTMLDocument *doc, eventid_t eid, VARIANT *var) +static inline HRESULT set_doc_event(HTMLDocumentNode *doc, eventid_t eid, VARIANT *var) { - return set_event_handler(&doc->doc_node->node.event_target, eid, var); + return set_event_handler(&doc->node.event_target, eid, var); }
-static inline HRESULT get_doc_event(HTMLDocument *doc, eventid_t eid, VARIANT *var) +static inline HRESULT get_doc_event(HTMLDocumentNode *doc, eventid_t eid, VARIANT *var) { - return get_event_handler(&doc->doc_node->node.event_target, eid, var); + return get_event_handler(&doc->node.event_target, eid, var); } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index de572a627d9..3f16910dde1 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -640,7 +640,6 @@ struct ConnectionPoint { };
struct HTMLDocument { - IHTMLDocument7 IHTMLDocument7_iface; IDispatchEx IDispatchEx_iface;
IUnknown *outer_unk; @@ -677,6 +676,7 @@ struct HTMLDocumentObj { IHTMLDocument4 IHTMLDocument4_iface; IHTMLDocument5 IHTMLDocument5_iface; IHTMLDocument6 IHTMLDocument6_iface; + IHTMLDocument7 IHTMLDocument7_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface; @@ -901,6 +901,7 @@ struct HTMLDocumentNode { IHTMLDocument4 IHTMLDocument4_iface; IHTMLDocument5 IHTMLDocument5_iface; IHTMLDocument6 IHTMLDocument6_iface; + IHTMLDocument7 IHTMLDocument7_iface; IDocumentSelector IDocumentSelector_iface; IDocumentEvent IDocumentEvent_iface; ISupportErrorInfo ISupportErrorInfo_iface; diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index c49f1b4f55f..d3ffc29af4b 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -270,7 +270,7 @@ static HRESULT WINAPI HTMLDOMImplementation2_createHTMLDocument(IHTMLDOMImplemen if(FAILED(hres)) return hres;
- *new_document = &new_document_node->basedoc.IHTMLDocument7_iface; + *new_document = &new_document_node->IHTMLDocument7_iface; return S_OK; }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=125213
Your paranoid android.
=== debian11 (build log) ===
Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24723. Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24723. Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24723.
I think that it would be better to make htmldoc.c exclusively about document node and move document object implementation out of it (to oleobj.c, maybe?). I also don't see the point of renaming implementation functions of IHTML* interfaces to DocNodeHTML*, I'd suggest to keep current names for node object implementation.