Bug 1660364 - Introduce IPDL getters for text range length, and absolute offsets. r=morgan,mccr8

We need a sync IPC call for this because otherwise the number of smaller sync messages we would need to call would be variable.

Differential Revision: https://phabricator.services.mozilla.com/D88076
This commit is contained in:
Eitan Isaacson 2020-08-27 20:06:42 +00:00
Родитель 1989d12e47
Коммит 1962242b94
4 изменённых файлов: 37 добавлений и 0 удалений

Просмотреть файл

@ -131,6 +131,19 @@ mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvBoundsForRange(
return IPC_OK();
}
mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvLengthForRange(
const uint64_t& aID, const int32_t& aStartOffset,
const uint64_t& aEndContainer, const int32_t& aEndOffset,
int32_t* aLength) {
return IPC_OK();
}
mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvOffsetAtIndex(
const uint64_t& aID, const int32_t& aIndex, uint64_t* aContainer,
int32_t* aOffset) {
return IPC_OK();
}
HyperTextAccessibleWrap*
DocAccessiblePlatformExtChild::IdToHyperTextAccessibleWrap(
const uint64_t& aID) const {

Просмотреть файл

@ -46,6 +46,17 @@ class DocAccessiblePlatformExtChild : public PDocAccessiblePlatformExtChild {
const int32_t& aEndOffset,
nsIntRect* aBounds);
mozilla::ipc::IPCResult RecvLengthForRange(const uint64_t& aID,
const int32_t& aStartOffset,
const uint64_t& aEndContainer,
const int32_t& aEndOffset,
int32_t* aLength);
mozilla::ipc::IPCResult RecvOffsetAtIndex(const uint64_t& aID,
const int32_t& aIndex,
uint64_t* aContainer,
int32_t* aOffset);
private:
HyperTextAccessibleWrap* IdToHyperTextAccessibleWrap(
const uint64_t& aID) const;

Просмотреть файл

@ -36,6 +36,13 @@ child:
nested(inside_sync) sync BoundsForRange(uint64_t aID, int32_t aStartOffset, uint64_t aEndContainer, int32_t aEndOffset)
returns(nsIntRect aRetVal);
nested(inside_sync) sync LengthForRange(uint64_t aID, int32_t aStartOffset, uint64_t aEndContainer, int32_t aEndOffset)
returns(int32_t aLength);
nested(inside_sync) sync OffsetAtIndex(uint64_t aID, int32_t aIndex)
returns(uint64_t aContainer, int32_t aOffset);
};
} // namespace a11y

Просмотреть файл

@ -632,6 +632,12 @@ platform = mac
[PDocAccessiblePlatformExt::BoundsForRange]
description = Retrieve geometric bounds for text range. Platform API is synchronous, so this needs to be too.
platform = mac
[PDocAccessiblePlatformExt::LengthForRange]
description = Retrieve length of text range. Platform API is synchronous, so this needs to be too.
platform = mac
[PDocAccessiblePlatformExt::OffsetAtIndex]
description = Retrieve text offset at absolute index. Platform API is synchronous, so this needs to be too.
platform = mac
# Plugins
[PPluginWidget::Create]