mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 21:20:25 +00:00
mshtml: Use get_elem_attr_value helper in is_elem_name.
This commit is contained in:
parent
3efaaacf3c
commit
d0898685a6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user