From e70136af6d8c627932c5bd0c6e78a048d53c1538 Mon Sep 17 00:00:00 2001 From: Morgan Rae Reschenberg Date: Wed, 2 Nov 2022 19:32:58 +0000 Subject: [PATCH] Bug 1798550: Use cached name accessor method when computing MEMBER_OF r=eeejay Differential Revision: https://phabricator.services.mozilla.com/D160948 --- accessible/ipc/RemoteAccessibleBase.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/accessible/ipc/RemoteAccessibleBase.cpp b/accessible/ipc/RemoteAccessibleBase.cpp index 29cd9e2af0b1..07900211f8db 100644 --- a/accessible/ipc/RemoteAccessibleBase.cpp +++ b/accessible/ipc/RemoteAccessibleBase.cpp @@ -771,9 +771,8 @@ Relation RemoteAccessibleBase::RelationByType( Relation rel = Relation(); // HTML radio buttons with cached names should be grouped. if (IsHTMLRadioButton()) { - auto maybeName = - mCachedFields->GetAttribute(nsGkAtoms::radioLabel); - if (!maybeName) { + nsString name = GetCachedHTMLNameAttribute(); + if (name.IsEmpty()) { return rel; } @@ -782,7 +781,7 @@ Relation RemoteAccessibleBase::RelationByType( ancestor = ancestor->RemoteParent(); } Pivot p = Pivot(ancestor); - PivotRadioNameRule rule(*maybeName); + PivotRadioNameRule rule(name); Accessible* match = p.Next(ancestor, rule); while (match) { rel.AppendTarget(match->AsRemote());