Module: wine Branch: master Commit: 4a4582d2e07fa5480185675492f19e104c3a5106 URL: https://gitlab.winehq.org/wine/wine/-/commit/4a4582d2e07fa5480185675492f19e1...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Jul 15 13:33:39 2024 +0200
mshtml: Use host object script bindings for MSNamespaceInfoCollection class.
---
dlls/mshtml/htmldoc.c | 3 +-- dlls/mshtml/mshtml_private.h | 2 +- dlls/mshtml/omnavigator.c | 5 +++-- dlls/mshtml/tests/documentmode.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index ca76318c1b3..172ad524538 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -2819,8 +2819,7 @@ static HRESULT WINAPI HTMLDocument4_get_namespaces(IHTMLDocument4 *iface, IDispa if(!This->namespaces) { HRESULT hres;
- hres = create_namespace_collection(dispex_compat_mode(&This->node.event_target.dispex), - &This->namespaces); + hres = create_namespace_collection(This, &This->namespaces); if(FAILED(hres)) return hres; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 080ad008cbe..c7b4c972a31 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -1049,7 +1049,7 @@ HRESULT create_navigator(HTMLInnerWindow*,IOmNavigator**); HRESULT create_html_screen(HTMLInnerWindow*,IHTMLScreen**); HRESULT create_performance(HTMLInnerWindow*,IHTMLPerformance**); HRESULT create_history(HTMLInnerWindow*,OmHistory**); -HRESULT create_namespace_collection(compat_mode_t,IHTMLNamespaceCollection**); +HRESULT create_namespace_collection(HTMLDocumentNode*,IHTMLNamespaceCollection**); HRESULT create_dom_implementation(HTMLDocumentNode*,IHTMLDOMImplementation**); void detach_dom_implementation(IHTMLDOMImplementation*); HRESULT create_html_storage(HTMLInnerWindow*,BOOL,IHTMLStorage**); diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 4fd8e9ee03f..900c4ee0ca7 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -1920,7 +1920,7 @@ static dispex_static_data_t HTMLNamespaceCollection_dispex = { HTMLNamespaceCollection_iface_tids };
-HRESULT create_namespace_collection(compat_mode_t compat_mode, IHTMLNamespaceCollection **ret) +HRESULT create_namespace_collection(HTMLDocumentNode *doc, IHTMLNamespaceCollection **ret) { HTMLNamespaceCollection *namespaces;
@@ -1928,7 +1928,8 @@ HRESULT create_namespace_collection(compat_mode_t compat_mode, IHTMLNamespaceCol return E_OUTOFMEMORY;
namespaces->IHTMLNamespaceCollection_iface.lpVtbl = &HTMLNamespaceCollectionVtbl; - init_dispatch(&namespaces->dispex, &HTMLNamespaceCollection_dispex, NULL, compat_mode); + init_dispatch(&namespaces->dispex, &HTMLNamespaceCollection_dispex, doc->script_global, + dispex_compat_mode(&doc->node.event_target.dispex)); *ret = &namespaces->IHTMLNamespaceCollection_iface; return S_OK; } diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index b6f055e3c85..e6a39922157 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -320,7 +320,7 @@ sync_test("builtin_toString", function() { test("window", window, "Window", "[object Window]", true); test("xmlHttpRequest", new XMLHttpRequest(), "XMLHttpRequest", null, true); if(v < 10) { - test("namespaces", document.namespaces, "MSNamespaceInfoCollection", null, true); + test("namespaces", document.namespaces, "MSNamespaceInfoCollection"); } if(v < 11) { test("eventObject", document.createEventObject(), "MSEventObj", null, true);