mshtml: Added support for IHTMLDOMAttribute2::get_value on detached attributes.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a3ab8d6792
commit
7ad4aeb735
|
@ -310,12 +310,11 @@ static HRESULT WINAPI HTMLDOMAttribute2_get_value(IHTMLDOMAttribute2 *iface, BST
|
|||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
if(!This->elem) {
|
||||
FIXME("NULL This->elem\n");
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
hres = get_elem_attr_value_by_dispid(This->elem, This->dispid, &val);
|
||||
V_VT(&val) = VT_EMPTY;
|
||||
if(This->elem)
|
||||
hres = get_elem_attr_value_by_dispid(This->elem, This->dispid, &val);
|
||||
else
|
||||
hres = VariantCopy(&val, &This->value);
|
||||
if(SUCCEEDED(hres))
|
||||
hres = attr_value_to_string(&val);
|
||||
if(FAILED(hres))
|
||||
|
|
|
@ -8610,11 +8610,18 @@ static void test_attr(IHTMLDocument2 *doc, IHTMLElement *elem)
|
|||
|
||||
get_attr_node_value(attr, &v, VT_I4);
|
||||
ok(V_I4(&v) == 1, "nodeValue = %d\n", V_I4(&v));
|
||||
test_attr_value(attr, "1");
|
||||
|
||||
V_VT(&v) = VT_EMPTY;
|
||||
put_attr_node_value(attr, v);
|
||||
get_attr_node_value(attr, &v, VT_EMPTY);
|
||||
|
||||
V_VT(&v) = VT_BSTR;
|
||||
V_BSTR(&v) = a2bstr("testing");
|
||||
put_attr_node_value(attr, v);
|
||||
SysFreeString(V_BSTR(&v));
|
||||
test_attr_value(attr, "testing");
|
||||
|
||||
IHTMLDOMAttribute_Release(attr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue