#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) MaybeFireNameChange(AtkObject* aAtkObj, const nsString& aNewName)
{ {
NS_ConvertUTF16toUTF8 newNameUTF8(aNewName); NS_ConvertUTF16toUTF8 newNameUTF8(aNewName);
if (aAtkObj->name && if (aAtkObj->name && !strcmp(aAtkObj->name, newNameUTF8.get()))
!strncmp(aAtkObj->name, newNameUTF8.get(), newNameUTF8.Length()))
return; return;
// Below we duplicate the functionality of atk_object_set_name(), // Below we duplicate the functionality of atk_object_set_name(),

View File

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