зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1221256: Implement IAccessible::put_accValue for editable text. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D53378 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
78545b8343
Коммит
2ed860b51f
|
@ -914,8 +914,11 @@ AccessibleHandler::put_accName(VARIANT varChild, BSTR szName) {
|
|||
|
||||
HRESULT
|
||||
AccessibleHandler::put_accValue(VARIANT varChild, BSTR szValue) {
|
||||
// This matches AccessibleWrap
|
||||
return E_NOTIMPL;
|
||||
HRESULT hr = ResolveIA2();
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
return mIA2PassThru->put_accValue(varChild, szValue);
|
||||
}
|
||||
|
||||
/*** IAccessible2 ***/
|
||||
|
|
|
@ -1016,7 +1016,25 @@ STDMETHODIMP
|
|||
AccessibleWrap::put_accValue(
|
||||
/* [optional][in] */ VARIANT varChild,
|
||||
/* [in] */ BSTR szValue) {
|
||||
RefPtr<IAccessible> accessible;
|
||||
HRESULT hr = ResolveChild(varChild, getter_AddRefs(accessible));
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (accessible) {
|
||||
return accessible->put_accValue(kVarChildIdSelf, szValue);
|
||||
}
|
||||
|
||||
HyperTextAccessible* ht = AsHyperText();
|
||||
if (!ht) {
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
uint32_t length = ::SysStringLen(szValue);
|
||||
nsAutoString text(szValue, length);
|
||||
ht->ReplaceText(text);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Загрузка…
Ссылка в новой задаче