tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 7d9b687c2debe2f3a1532e947fe24099c5f06c02
parent fea06a7a7b54addf064310ef129216f276125dd7
Author: James Teh <jteh@mozilla.com>
Date:   Thu,  6 Nov 2025 00:17:43 +0000

Bug 1998107: Support UIA IsPassword property. r=morgan

Differential Revision: https://phabricator.services.mozilla.com/D271347

Diffstat:
Maccessible/tests/browser/windows/uia/browser_generalProps.js | 26++++++++++++++++++++++++++
Maccessible/windows/uia/uiaRawElmProvider.cpp | 6++++++
2 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/accessible/tests/browser/windows/uia/browser_generalProps.js b/accessible/tests/browser/windows/uia/browser_generalProps.js @@ -518,3 +518,29 @@ addUiaTask( }, { uiaEnabled: true, uiaDisabled: true } ); + +/** + * Test the IsPassword property. + */ +addUiaTask( + ` +<input type="text" id="text"> +<input type="password" id="password"> + `, + async function testIsPassword() { + await definePyVar("doc", `getDocUia()`); + ok( + !(await runPython(`findUiaByDomId(doc, "text").CurrentIsPassword`)), + "text has correct IsPassword" + ); + ok( + await runPython(`findUiaByDomId(doc, "password").CurrentIsPassword`), + "password has correct IsPassword" + ); + ok( + !(await runPython(`doc.CurrentIsPassword`)), + "doc has correct IsPassword" + ); + }, + { uiaEnabled: true, uiaDisabled: true } +); diff --git a/accessible/windows/uia/uiaRawElmProvider.cpp b/accessible/windows/uia/uiaRawElmProvider.cpp @@ -711,6 +711,12 @@ uiaRawElmProvider::GetPropertyValue(PROPERTYID aPropertyId, (acc->State() & states::OFFSCREEN) ? VARIANT_TRUE : VARIANT_FALSE; return S_OK; + case UIA_IsPasswordPropertyId: + aPropertyValue->vt = VT_BOOL; + aPropertyValue->boolVal = + (acc->State() & states::PROTECTED) ? VARIANT_TRUE : VARIANT_FALSE; + return S_OK; + case UIA_LabeledByPropertyId: if (Accessible* target = GetLabeledBy()) { aPropertyValue->vt = VT_UNKNOWN;