Jacek Caban : mshtml: Initialize HTMLPerformance object with compat mode.

Alexandre Julliard julliard at winehq.org
Mon Mar 15 16:59:13 CDT 2021


Module: wine
Branch: master
Commit: 19992377b01111fd9b92f03db2d4ae44b4abcc5c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=19992377b01111fd9b92f03db2d4ae44b4abcc5c

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Mar 15 16:17:52 2021 +0100

mshtml: Initialize HTMLPerformance object with compat mode.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/htmlwindow.c     | 2 +-
 dlls/mshtml/mshtml_private.h | 2 +-
 dlls/mshtml/omnavigator.c    | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 5d9a603e686..bc12d0decbc 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -2398,7 +2398,7 @@ static HRESULT WINAPI HTMLWindow7_get_performance(IHTMLWindow7 *iface, VARIANT *
     if(!This->performance_initialized) {
         IHTMLPerformance *performance;
 
-        hres = create_performance(&performance);
+        hres = create_performance(dispex_compat_mode(&This->event_target.dispex), &performance);
         if(FAILED(hres))
             return hres;
 
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index f870c05f2cb..03aa7e33b16 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -913,7 +913,7 @@ HRESULT HTMLXMLHttpRequestFactory_Create(HTMLInnerWindow*,HTMLXMLHttpRequestFact
 HRESULT HTMLLocation_Create(HTMLInnerWindow*,HTMLLocation**) DECLSPEC_HIDDEN;
 HRESULT create_navigator(compat_mode_t,IOmNavigator**) DECLSPEC_HIDDEN;
 HRESULT create_html_screen(compat_mode_t,IHTMLScreen**) DECLSPEC_HIDDEN;
-HRESULT create_performance(IHTMLPerformance**) 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_dom_implementation(HTMLDocumentNode*,IHTMLDOMImplementation**) DECLSPEC_HIDDEN;
diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c
index 624e66b4c95..ed65f18caaf 100644
--- a/dlls/mshtml/omnavigator.c
+++ b/dlls/mshtml/omnavigator.c
@@ -2172,7 +2172,7 @@ static dispex_static_data_t HTMLPerformance_dispex = {
     HTMLPerformance_iface_tids
 };
 
-HRESULT create_performance(IHTMLPerformance **ret)
+HRESULT create_performance(compat_mode_t compat_mode, IHTMLPerformance **ret)
 {
     HTMLPerformance *performance;
 
@@ -2183,8 +2183,8 @@ HRESULT create_performance(IHTMLPerformance **ret)
     performance->IHTMLPerformance_iface.lpVtbl = &HTMLPerformanceVtbl;
     performance->ref = 1;
 
-    init_dispex(&performance->dispex, (IUnknown*)&performance->IHTMLPerformance_iface,
-                &HTMLPerformance_dispex);
+    init_dispex_with_compat_mode(&performance->dispex, (IUnknown*)&performance->IHTMLPerformance_iface,
+                                 &HTMLPerformance_dispex, compat_mode);
 
     *ret = &performance->IHTMLPerformance_iface;
     return S_OK;




More information about the wine-cvs mailing list