зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1730088 part 3: Move CharacterCount to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127208
This commit is contained in:
Родитель
68d5471fbc
Коммит
adae2323e9
|
@ -64,4 +64,8 @@ int32_t HyperTextAccessibleBase::GetChildOffset(uint32_t aChildIndex,
|
||||||
return lastTextOffset;
|
return lastTextOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t HyperTextAccessibleBase::CharacterCount() const {
|
||||||
|
return GetChildOffset(Acc()->ChildCount());
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace mozilla::a11y
|
} // namespace mozilla::a11y
|
||||||
|
|
|
@ -48,6 +48,11 @@ class HyperTextAccessibleBase {
|
||||||
virtual int32_t GetChildOffset(uint32_t aChildIndex,
|
virtual int32_t GetChildOffset(uint32_t aChildIndex,
|
||||||
bool aInvalidateAfter = false) const;
|
bool aInvalidateAfter = false) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return character count within the hypertext accessible.
|
||||||
|
*/
|
||||||
|
uint32_t CharacterCount() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual const Accessible* Acc() const = 0;
|
virtual const Accessible* Acc() const = 0;
|
||||||
Accessible* Acc() {
|
Accessible* Acc() {
|
||||||
|
|
|
@ -144,11 +144,6 @@ class HyperTextAccessible : public AccessibleWrap,
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// TextAccessible
|
// TextAccessible
|
||||||
|
|
||||||
/**
|
|
||||||
* Return character count within the hypertext accessible.
|
|
||||||
*/
|
|
||||||
uint32_t CharacterCount() const { return GetChildOffset(ChildCount()); }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a character at the given offset (don't support magic offsets).
|
* Get a character at the given offset (don't support magic offsets).
|
||||||
*/
|
*/
|
||||||
|
|
Загрузка…
Ссылка в новой задаче