Jacek Caban : mshtml: Initialize HTMLScreen object with compat mode.
Alexandre Julliard
julliard at winehq.org
Fri Mar 12 14:36:16 CST 2021
Module: wine
Branch: master
Commit: 16b4bc2319614ba08929380734d18e9108ac828b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=16b4bc2319614ba08929380734d18e9108ac828b
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Mar 12 17:40:13 2021 +0100
mshtml: Initialize HTMLScreen 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 | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 69717ff7848..a373bbe1916 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -1305,7 +1305,7 @@ static HRESULT WINAPI HTMLWindow2_get_screen(IHTMLWindow2 *iface, IHTMLScreen **
if(!window->screen) {
HRESULT hres;
- hres = HTMLScreen_Create(&window->screen);
+ hres = create_html_screen(dispex_compat_mode(&window->event_target.dispex), &window->screen);
if(FAILED(hres))
return hres;
}
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index e048127ee1a..784432b30b2 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -911,7 +911,7 @@ HRESULT HTMLImageElementFactory_Create(HTMLInnerWindow*,HTMLImageElementFactory*
HRESULT HTMLXMLHttpRequestFactory_Create(HTMLInnerWindow*,HTMLXMLHttpRequestFactory**) DECLSPEC_HIDDEN;
HRESULT HTMLLocation_Create(HTMLInnerWindow*,HTMLLocation**) DECLSPEC_HIDDEN;
IOmNavigator *OmNavigator_Create(void) DECLSPEC_HIDDEN;
-HRESULT HTMLScreen_Create(IHTMLScreen**) DECLSPEC_HIDDEN;
+HRESULT create_html_screen(compat_mode_t,IHTMLScreen**) DECLSPEC_HIDDEN;
HRESULT create_performance(IHTMLPerformance**) DECLSPEC_HIDDEN;
HRESULT create_history(HTMLInnerWindow*,OmHistory**) DECLSPEC_HIDDEN;
HRESULT create_namespace_collection(IHTMLNamespaceCollection**) DECLSPEC_HIDDEN;
diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c
index f09b796e423..2a98c159332 100644
--- a/dlls/mshtml/omnavigator.c
+++ b/dlls/mshtml/omnavigator.c
@@ -561,7 +561,7 @@ static dispex_static_data_t HTMLScreen_dispex = {
HTMLScreen_iface_tids
};
-HRESULT HTMLScreen_Create(IHTMLScreen **ret)
+HRESULT create_html_screen(compat_mode_t compat_mode, IHTMLScreen **ret)
{
HTMLScreen *screen;
@@ -572,7 +572,7 @@ HRESULT HTMLScreen_Create(IHTMLScreen **ret)
screen->IHTMLScreen_iface.lpVtbl = &HTMLSreenVtbl;
screen->ref = 1;
- init_dispex(&screen->dispex, (IUnknown*)&screen->IHTMLScreen_iface, &HTMLScreen_dispex);
+ init_dispex_with_compat_mode(&screen->dispex, (IUnknown*)&screen->IHTMLScreen_iface, &HTMLScreen_dispex, compat_mode);
*ret = &screen->IHTMLScreen_iface;
return S_OK;
More information about the wine-cvs
mailing list