Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit ec3cc7b

Browse files
committed
Bug 1688490: Gather moxParent directly instead of querying the parent of our gecko accessible. r=eeejay, a=pascalc
Differential Revision: https://phabricator.services.mozilla.com/D102965
1 parent 2fd2c39 commit ec3cc7b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

accessible/mac/mozSelectableElements.mm

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,13 @@ - (BOOL)moxIgnoreWithParent:(mozAccessible*)parent {
261261
// Because moxChildren does ignore filtering, and because
262262
// our base ignore method filters out invisible accessibles,
263263
// we override this method.
264-
mozAccessible* directGrandparent =
265-
GetNativeFromGeckoAccessible([parent geckoAccessible].Parent());
266-
if ([directGrandparent isKindOfClass:[MOXWebAreaAccessible class]]) {
267-
return [parent moxIgnoreWithParent:directGrandparent];
264+
AccessibleOrProxy parentAcc = [parent geckoAccessible];
265+
if (!parentAcc.IsNull()) {
266+
mozAccessible* directGrandparent =
267+
GetNativeFromGeckoAccessible(parentAcc.Parent());
268+
if ([directGrandparent isKindOfClass:[MOXWebAreaAccessible class]]) {
269+
return [parent moxIgnoreWithParent:directGrandparent];
270+
}
268271
}
269272

270273
id grandparent = [parent moxParent];

0 commit comments

Comments
 (0)