Gabriel Ivăncescu : mshtml: Use proper compat mode for HTMLDOMAttribute.
Alexandre Julliard
julliard at winehq.org
Wed Oct 6 15:51:39 CDT 2021
Module: wine
Branch: master
Commit: 240e0d1d7c1c77d8ff3ded596577e8a51c6cfd81
URL: https://source.winehq.org/git/wine.git/?a=commit;h=240e0d1d7c1c77d8ff3ded596577e8a51c6cfd81
Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date: Wed Oct 6 18:11:35 2021 +0300
mshtml: Use proper compat mode for HTMLDOMAttribute.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlattr.c | 3 +--
dlls/mshtml/htmldoc.c | 2 +-
dlls/mshtml/htmlelem.c | 2 +-
dlls/mshtml/mshtml_private.h | 2 +-
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c
index e10c7c3826f..e4c98d9af06 100644
--- a/dlls/mshtml/htmlattr.c
+++ b/dlls/mshtml/htmlattr.c
@@ -495,9 +495,8 @@ HTMLDOMAttribute *unsafe_impl_from_IHTMLDOMAttribute(IHTMLDOMAttribute *iface)
return iface->lpVtbl == &HTMLDOMAttributeVtbl ? impl_from_IHTMLDOMAttribute(iface) : NULL;
}
-HRESULT HTMLDOMAttribute_Create(const WCHAR *name, HTMLElement *elem, DISPID dispid, HTMLDOMAttribute **attr)
+HRESULT HTMLDOMAttribute_Create(const WCHAR *name, HTMLElement *elem, DISPID dispid, compat_mode_t compat_mode, 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;
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 6bbf058aed4..12fce6d3015 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -2856,7 +2856,7 @@ static HRESULT WINAPI HTMLDocument5_createAttribute(IHTMLDocument5 *iface, BSTR
TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrattrName), ppattribute);
- hres = HTMLDOMAttribute_Create(bstrattrName, NULL, 0, &attr);
+ hres = HTMLDOMAttribute_Create(bstrattrName, NULL, 0, dispex_compat_mode(&This->doc_node->node.event_target.dispex), &attr);
if(FAILED(hres))
return hres;
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c
index cb7a528be39..dada4de9ab7 100644
--- a/dlls/mshtml/htmlelem.c
+++ b/dlls/mshtml/htmlelem.c
@@ -7251,7 +7251,7 @@ static inline HRESULT get_domattr(HTMLAttributeCollection *This, DISPID id, LONG
return E_UNEXPECTED;
}
- hres = HTMLDOMAttribute_Create(NULL, This->elem, id, attr);
+ hres = HTMLDOMAttribute_Create(NULL, This->elem, id, dispex_compat_mode(&This->elem->node.event_target.dispex), attr);
if(FAILED(hres))
return hres;
}
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 9429a4bb5b4..6ee510572e6 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -1090,7 +1090,7 @@ typedef struct {
HTMLDOMAttribute *unsafe_impl_from_IHTMLDOMAttribute(IHTMLDOMAttribute*) DECLSPEC_HIDDEN;
-HRESULT HTMLDOMAttribute_Create(const WCHAR*,HTMLElement*,DISPID,HTMLDOMAttribute**) DECLSPEC_HIDDEN;
+HRESULT HTMLDOMAttribute_Create(const WCHAR*,HTMLElement*,DISPID,compat_mode_t,HTMLDOMAttribute**) DECLSPEC_HIDDEN;
HRESULT HTMLElement_Create(HTMLDocumentNode*,nsIDOMNode*,BOOL,HTMLElement**) DECLSPEC_HIDDEN;
HRESULT HTMLCommentElement_Create(HTMLDocumentNode*,nsIDOMNode*,HTMLElement**) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list