From 8ec8f6b45c30f5138fe60ee23b967b067fdded2f Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Thu, 27 Feb 2020 16:54:59 +0000 Subject: [PATCH] Bug 1618364 - Add OSX accessible lifecycle notifications. r=morgan Differential Revision: https://phabricator.services.mozilla.com/D64481 --HG-- extra : moz-landing-system : lando --- accessible/mac/mozAccessible.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/accessible/mac/mozAccessible.mm b/accessible/mac/mozAccessible.mm index 1c0ae622ec9c..a1c2be57a043 100644 --- a/accessible/mac/mozAccessible.mm +++ b/accessible/mac/mozAccessible.mm @@ -1142,9 +1142,16 @@ struct RoleDescrComparator { if (curNative) [mChildren addObject:curNative]; } +- (BOOL)accessibilityNotifiesWhenDestroyed { + return YES; +} + - (void)expire { NS_OBJC_BEGIN_TRY_ABORT_BLOCK; + NSAccessibilityPostNotification( + self, NSAccessibilityUIElementDestroyedNotification); + [self invalidateChildren]; mGeckoAccessible = 0;