From 4e9324c43e639b50edfe614fbec0697c86f7b8f1 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 1 Mar 2016 14:28:52 +0100 Subject: [PATCH] mshtml: Always return false in IHTMLDOMAttribute2::get_expando for detached attributes. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/htmlattr.c | 2 +- dlls/mshtml/tests/dom.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index 446cb6f5894..885b2aa7f62 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -335,7 +335,7 @@ static HRESULT WINAPI HTMLDOMAttribute2_get_expando(IHTMLDOMAttribute2 *iface, V TRACE("(%p)->(%p)\n", This, p); - *p = get_dispid_type(This->dispid) == DISPEXPROP_BUILTIN ? VARIANT_FALSE : VARIANT_TRUE; + *p = !This->elem || get_dispid_type(This->dispid) == DISPEXPROP_BUILTIN ? VARIANT_FALSE : VARIANT_TRUE; return S_OK; } diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index e27339afb05..11e9d279bc1 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -8919,6 +8919,7 @@ static void test_create_elems(IHTMLDocument2 *doc) test_no_iface((IUnknown*)attr, &IID_IHTMLDOMNode); test_attr_node_name(attr, "Test"); + test_attr_expando(attr, VARIANT_FALSE); IHTMLDOMAttribute_Release(attr); }