mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1335220 - Add minimumIncrement to windows ProxyAccessible. r=yzen
MozReview-Commit-ID: DY89qIALmrq
This commit is contained in:
parent
c41740271d
commit
2725184bbf
@ -13,6 +13,7 @@ interface IGeckoCustom : IUnknown
|
||||
[propget] HRESULT ID([out, retval] unsigned __int64* aID);
|
||||
[propget] HRESULT anchorCount([out, retval] long* aCount);
|
||||
[propget] HRESULT DOMNodeID([out, retval] BSTR* aID);
|
||||
[propget] HRESULT minimumIncrement([out, retval] double* aIncrement);
|
||||
}
|
||||
|
||||
|
||||
|
@ -155,6 +155,23 @@ ProxyAccessible::Value(nsString& aValue) const
|
||||
aValue = (wchar_t*)resultWrap;
|
||||
}
|
||||
|
||||
double
|
||||
ProxyAccessible::Step()
|
||||
{
|
||||
RefPtr<IGeckoCustom> custom = QueryInterface<IGeckoCustom>(this);
|
||||
if (!custom) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
double increment;
|
||||
HRESULT hr = custom->get_minimumIncrement(&increment);
|
||||
if (FAILED(hr)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return increment;
|
||||
}
|
||||
|
||||
void
|
||||
ProxyAccessible::Description(nsString& aDesc) const
|
||||
{
|
||||
|
@ -43,3 +43,10 @@ GeckoCustom::get_ID(uint64_t* aID)
|
||||
*aID = mAcc->IsDoc() ? 0 : reinterpret_cast<uintptr_t>(mAcc.get());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
GeckoCustom::get_minimumIncrement(double* aIncrement)
|
||||
{
|
||||
*aIncrement = mAcc->Step();
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ public:
|
||||
virtual STDMETHODIMP get_anchorCount(long* aCount);
|
||||
virtual STDMETHODIMP get_DOMNodeID(BSTR* aID);
|
||||
virtual STDMETHODIMP get_ID(uint64_t* aID);
|
||||
virtual STDMETHODIMP get_minimumIncrement(double* aIncrement);
|
||||
|
||||
private:
|
||||
GeckoCustom() = delete;
|
||||
|
@ -119,11 +119,7 @@ xpcAccessibleValue::GetMinimumIncrement(double* aValue)
|
||||
if (Intl().IsAccessible()) {
|
||||
value = Intl().AsAccessible()->Step();
|
||||
} else {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
value = Intl().AsProxy()->Step();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!IsNaN(value))
|
||||
|
Loading…
Reference in New Issue
Block a user