зеркало из https://github.com/mozilla/pjs.git
Bug 702528 - IAccessible::get_accName should return S_FALSE when there's no accessible name, r=davidb
This commit is contained in:
Родитель
e67c65485f
Коммит
3fc78fe48c
|
@ -289,15 +289,12 @@ __try {
|
|||
nsresult rv = xpAccessible->GetName(name);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
if (name.IsVoid()) {
|
||||
// Valid return value for the name:
|
||||
// The name was not provided, e.g. no alt attribute for an image.
|
||||
// A screen reader may choose to invent its own accessible name, e.g. from
|
||||
// an image src attribute.
|
||||
// See nsHTMLImageAccessible::GetName()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// The name was not provided, e.g. no alt attribute for an image. A screen
|
||||
// reader may choose to invent its own accessible name, e.g. from an image src
|
||||
// attribute. Refer to NS_OK_EMPTY_NAME return value.
|
||||
if (name.IsVoid())
|
||||
return S_FALSE;
|
||||
|
||||
*pszName = ::SysAllocStringLen(name.get(), name.Length());
|
||||
if (!*pszName)
|
||||
|
|
Загрузка…
Ссылка в новой задаче