#416: M1308908 M1342433(no tests)

This commit is contained in:
Cameron Kaiser 2017-07-31 21:58:00 -07:00
parent 2f4742e523
commit 5757a9534e
2 changed files with 8 additions and 12 deletions

View File

@ -597,8 +597,7 @@ static void
MaybeFireNameChange(AtkObject* aAtkObj, const nsString& aNewName)
{
NS_ConvertUTF16toUTF8 newNameUTF8(aNewName);
if (aAtkObj->name &&
!strncmp(aAtkObj->name, newNameUTF8.get(), newNameUTF8.Length()))
if (aAtkObj->name && !strcmp(aAtkObj->name, newNameUTF8.get()))
return;
// Below we duplicate the functionality of atk_object_set_name(),

View File

@ -314,16 +314,13 @@ nsAccessibilityService::ListenersChanged(nsIArray* aEventChanges)
nsIDocument* ownerDoc = node->OwnerDoc();
DocAccessible* document = GetExistingDocAccessible(ownerDoc);
// Always recreate for onclick changes.
if (document) {
if (nsCoreUtils::HasClickListener(node)) {
if (!document->GetAccessible(node)) {
document->RecreateAccessible(node);
}
} else {
if (document->GetAccessible(node)) {
document->RecreateAccessible(node);
}
// Create an accessible for a inaccessible element having click event
// handler.
if (document && !document->HasAccessible(node) &&
nsCoreUtils::HasClickListener(node)) {
nsIContent* parentEl = node->GetFlattenedTreeParent();
if (parentEl) {
document->ContentInserted(parentEl, node, node->GetNextSibling());
}
break;
}