зеркало из 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:
Родитель
7511a00c4f
Коммит
39aa66590c
|
@ -64,4 +64,8 @@ int32_t HyperTextAccessibleBase::GetChildOffset(uint32_t aChildIndex,
|
|||
return lastTextOffset;
|
||||
}
|
||||
|
||||
uint32_t HyperTextAccessibleBase::CharacterCount() const {
|
||||
return GetChildOffset(Acc()->ChildCount());
|
||||
}
|
||||
|
||||
} // namespace mozilla::a11y
|
||||
|
|
|
@ -48,6 +48,11 @@ class HyperTextAccessibleBase {
|
|||
virtual int32_t GetChildOffset(uint32_t aChildIndex,
|
||||
bool aInvalidateAfter = false) const;
|
||||
|
||||
/**
|
||||
* Return character count within the hypertext accessible.
|
||||
*/
|
||||
uint32_t CharacterCount() const;
|
||||
|
||||
protected:
|
||||
virtual const Accessible* Acc() const = 0;
|
||||
Accessible* Acc() {
|
||||
|
|
|
@ -144,11 +144,6 @@ class HyperTextAccessible : public HyperTextAccessibleBase,
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
// 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).
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче