Jacek Caban : mshtml: Initialize attribute object with compatibility mode.
Alexandre Julliard
julliard at winehq.org
Thu Mar 11 15:59:36 CST 2021
Module: wine
Branch: master
Commit: 5a813f6f6e15bb00dcb64dde7907b08098d52d60
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5a813f6f6e15bb00dcb64dde7907b08098d52d60
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Mar 11 20:39:54 2021 +0100
mshtml: Initialize attribute object with compatibility mode.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlattr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c
index 61c6455027a..8e72c9a8045 100644
--- a/dlls/mshtml/htmlattr.c
+++ b/dlls/mshtml/htmlattr.c
@@ -497,6 +497,7 @@ HTMLDOMAttribute *unsafe_impl_from_IHTMLDOMAttribute(IHTMLDOMAttribute *iface)
HRESULT HTMLDOMAttribute_Create(const WCHAR *name, HTMLElement *elem, DISPID dispid, HTMLDOMAttribute **attr)
{
+ compat_mode_t compat_mode = elem ? dispex_compat_mode(&elem->node.event_target.dispex) : COMPAT_MODE_QUIRKS;
HTMLAttributeCollection *col;
HTMLDOMAttribute *ret;
HRESULT hres;
@@ -511,8 +512,8 @@ HRESULT HTMLDOMAttribute_Create(const WCHAR *name, HTMLElement *elem, DISPID dis
ret->dispid = dispid;
ret->elem = elem;
- init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLDOMAttribute_iface,
- &HTMLDOMAttribute_dispex);
+ init_dispex_with_compat_mode(&ret->dispex, (IUnknown*)&ret->IHTMLDOMAttribute_iface,
+ &HTMLDOMAttribute_dispex, compat_mode);
/* For attributes attached to an element, (elem,dispid) pair should be valid used for its operation. */
if(elem) {
More information about the wine-cvs
mailing list