Jacek Caban : mshtml: Initialize HTMLStorage object with compat mode.
Alexandre Julliard
julliard at winehq.org
Tue Mar 16 16:39:04 CDT 2021
Module: wine
Branch: master
Commit: c4fe86dabd6c60a81b04ec0154d43c3fae5c9395
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c4fe86dabd6c60a81b04ec0154d43c3fae5c9395
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Mar 16 19:57:01 2021 +0100
mshtml: Initialize HTMLStorage object with compat mode.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlstorage.c | 4 ++--
dlls/mshtml/htmlwindow.c | 6 ++++--
dlls/mshtml/mshtml_private.h | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/mshtml/htmlstorage.c b/dlls/mshtml/htmlstorage.c
index bc4b59b7f05..705c6248802 100644
--- a/dlls/mshtml/htmlstorage.c
+++ b/dlls/mshtml/htmlstorage.c
@@ -197,7 +197,7 @@ static dispex_static_data_t HTMLStorage_dispex = {
HTMLStorage_iface_tids
};
-HRESULT create_storage(IHTMLStorage **p)
+HRESULT create_html_storage(compat_mode_t compat_mode, IHTMLStorage **p)
{
HTMLStorage *storage;
@@ -207,7 +207,7 @@ HRESULT create_storage(IHTMLStorage **p)
storage->IHTMLStorage_iface.lpVtbl = &HTMLStorageVtbl;
storage->ref = 1;
- init_dispex(&storage->dispex, (IUnknown*)&storage->IHTMLStorage_iface, &HTMLStorage_dispex);
+ init_dispex_with_compat_mode(&storage->dispex, (IUnknown*)&storage->IHTMLStorage_iface, &HTMLStorage_dispex, compat_mode);
*p = &storage->IHTMLStorage_iface;
return S_OK;
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index bc12d0decbc..9da2f7ccbae 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -2137,7 +2137,8 @@ static HRESULT WINAPI HTMLWindow6_get_sessionStorage(IHTMLWindow6 *iface, IHTMLS
if(!This->inner_window->session_storage) {
HRESULT hres;
- hres = create_storage(&This->inner_window->session_storage);
+ hres = create_html_storage(dispex_compat_mode(&This->inner_window->event_target.dispex),
+ &This->inner_window->session_storage);
if(FAILED(hres))
return hres;
}
@@ -2156,7 +2157,8 @@ static HRESULT WINAPI HTMLWindow6_get_localStorage(IHTMLWindow6 *iface, IHTMLSto
if(!This->inner_window->local_storage) {
HRESULT hres;
- hres = create_storage(&This->inner_window->local_storage);
+ hres = create_html_storage(dispex_compat_mode(&This->inner_window->event_target.dispex),
+ &This->inner_window->local_storage);
if(FAILED(hres))
return hres;
}
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index e213cd698ba..c58a6a563df 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -919,7 +919,7 @@ HRESULT create_namespace_collection(compat_mode_t,IHTMLNamespaceCollection**) DE
HRESULT create_dom_implementation(HTMLDocumentNode*,IHTMLDOMImplementation**) DECLSPEC_HIDDEN;
void detach_dom_implementation(IHTMLDOMImplementation*) DECLSPEC_HIDDEN;
-HRESULT create_storage(IHTMLStorage**) DECLSPEC_HIDDEN;
+HRESULT create_html_storage(compat_mode_t,IHTMLStorage**) DECLSPEC_HIDDEN;
void HTMLDocument_Persist_Init(HTMLDocument*) DECLSPEC_HIDDEN;
void HTMLDocument_OleCmd_Init(HTMLDocument*) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list