Commit d0898685 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use get_elem_attr_value helper in is_elem_name.

parent 3efaaacf
......@@ -368,7 +368,7 @@ static BOOL is_elem_id(HTMLElement *elem, LPCWSTR name)
static BOOL is_elem_name(HTMLElement *elem, LPCWSTR name)
{
const PRUnichar *str;
nsAString nsstr, nsname;
nsAString nsstr;
BOOL ret = FALSE;
nsresult nsres;
......@@ -385,15 +385,12 @@ static BOOL is_elem_name(HTMLElement *elem, LPCWSTR name)
return TRUE;
}
nsAString_InitDepend(&nsname, nameW);
nsres = nsIDOMHTMLElement_GetAttribute(elem->nselem, &nsname, &nsstr);
nsAString_Finish(&nsname);
nsres = get_elem_attr_value(elem->nselem, nameW, &nsstr, &str);
if(NS_SUCCEEDED(nsres)) {
nsAString_GetData(&nsstr, &str);
ret = !strcmpiW(str, name);
nsAString_Finish(&nsstr);
}
nsAString_Finish(&nsstr);
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment