Jacek Caban : mshtml: Initialize HTMLNamespaceCollection object with compat mode.
Module: wine Branch: master Commit: 51e348e919b63a9ebfefcfd0d9d80374e86444ed URL: https://source.winehq.org/git/wine.git/?a=commit;h=51e348e919b63a9ebfefcfd0d... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 15 16:18:04 2021 +0100 mshtml: Initialize HTMLNamespaceCollection object with compat mode. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmldoc.c | 3 ++- dlls/mshtml/mshtml_private.h | 2 +- dlls/mshtml/omnavigator.c | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 4e56d548f47..54273f5a6e0 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -2637,7 +2637,8 @@ static HRESULT WINAPI HTMLDocument4_get_namespaces(IHTMLDocument4 *iface, IDispa if(!This->doc_node->namespaces) { HRESULT hres; - hres = create_namespace_collection(&This->doc_node->namespaces); + hres = create_namespace_collection(dispex_compat_mode(&This->doc_node->node.event_target.dispex), + &This->doc_node->namespaces); if(FAILED(hres)) return hres; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 03aa7e33b16..be19d98637f 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -915,7 +915,7 @@ HRESULT create_navigator(compat_mode_t,IOmNavigator**) DECLSPEC_HIDDEN; HRESULT create_html_screen(compat_mode_t,IHTMLScreen**) DECLSPEC_HIDDEN; HRESULT create_performance(compat_mode_t,IHTMLPerformance**) DECLSPEC_HIDDEN; HRESULT create_history(HTMLInnerWindow*,OmHistory**) DECLSPEC_HIDDEN; -HRESULT create_namespace_collection(IHTMLNamespaceCollection**) DECLSPEC_HIDDEN; +HRESULT create_namespace_collection(compat_mode_t,IHTMLNamespaceCollection**) DECLSPEC_HIDDEN; HRESULT create_dom_implementation(HTMLDocumentNode*,IHTMLDOMImplementation**) DECLSPEC_HIDDEN; void detach_dom_implementation(IHTMLDOMImplementation*) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index e43328bf5b2..e55753a83d9 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -2330,7 +2330,7 @@ static dispex_static_data_t HTMLNamespaceCollection_dispex = { HTMLNamespaceCollection_iface_tids }; -HRESULT create_namespace_collection(IHTMLNamespaceCollection **ret) +HRESULT create_namespace_collection(compat_mode_t compat_mode, IHTMLNamespaceCollection **ret) { HTMLNamespaceCollection *namespaces; @@ -2339,7 +2339,8 @@ HRESULT create_namespace_collection(IHTMLNamespaceCollection **ret) namespaces->IHTMLNamespaceCollection_iface.lpVtbl = &HTMLNamespaceCollectionVtbl; namespaces->ref = 1; - init_dispex(&namespaces->dispex, (IUnknown*)&namespaces->IHTMLNamespaceCollection_iface, &HTMLNamespaceCollection_dispex); + init_dispex_with_compat_mode(&namespaces->dispex, (IUnknown*)&namespaces->IHTMLNamespaceCollection_iface, + &HTMLNamespaceCollection_dispex, compat_mode); *ret = &namespaces->IHTMLNamespaceCollection_iface; return S_OK; }
participants (1)
-
Alexandre Julliard