mshtml: Initialize HTMLNamespaceCollection object with compat mode.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-03-15 16:18:04 +01:00 committed by Alexandre Julliard
parent 974a215d48
commit 51e348e919
3 changed files with 6 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}