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;