mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 762806 - implement UIA_AcceleratorKeyPropertyId and UIA_AccessKeyPropertyId r=tbsaunde
This commit is contained in:
parent
b731be6b1a
commit
ca19e1cfb4
@ -146,6 +146,43 @@ uiaRawElmProvider::GetPropertyValue(PROPERTYID aPropertyId,
|
||||
if (!aPropertyValue)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (mAcc->IsDefunct())
|
||||
return CO_E_OBJNOTCONNECTED;
|
||||
|
||||
aPropertyValue->vt = VT_EMPTY;
|
||||
|
||||
switch (aPropertyId) {
|
||||
// Accelerator Key / shortcut.
|
||||
case UIA_AcceleratorKeyPropertyId: {
|
||||
nsAutoString keyString;
|
||||
|
||||
mAcc->KeyboardShortcut().ToString(keyString);
|
||||
|
||||
if (!keyString.IsEmpty()) {
|
||||
aPropertyValue->vt = VT_BSTR;
|
||||
aPropertyValue->bstrVal = ::SysAllocString(keyString.get());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// Access Key / mneumonic.
|
||||
case UIA_AccessKeyPropertyId: {
|
||||
nsAutoString keyString;
|
||||
|
||||
mAcc->AccessKey().ToString(keyString);
|
||||
|
||||
if (!keyString.IsEmpty()) {
|
||||
aPropertyValue->vt = VT_BSTR;
|
||||
aPropertyValue->bstrVal = ::SysAllocString(keyString.get());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// UI Automation will attempt to get the property from the host
|
||||
//window provider.
|
||||
aPropertyValue->vt = VT_EMPTY;
|
||||
|
Loading…
Reference in New Issue
Block a user