You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, virtual buffers can only reliably map to the deepest object; i.e. they can't map to positions within the text. Doing otherwise is complicated because of the way embedded objects are exposed, things such as aria-label (which aren't really text as far as the underlying document is concerned), etc. Doing this efficiently would require some significant enhancements to the virtual buffer framework.
We're looking at moving away from virtual buffers in the future anyway (at least for some things), at which point this issue will no longer exist. However, that is probably quite some way off.
P4 because this would definitely be nice to have, but it doesn't affect most use cases currently.
1. Added two attributes to virtual buffer text nodes.
- ia2TextOffset: holds the start offset for a TextFieldNode within the IAccessibleText of its associated
object. This attribute is only added to text field nodes that originate from IAccessibleText.
- strippedCharsFromStart: When characters are stripped from the start of a text node (#2963) this
attribute holds the amount of stripped chars from the start, in order for us to correct the
2. the Gecko virtual buffer text info now has its own _getPointFromOffset implementation that uses the new virtual buffer attributes.
3. VirtualBufferTextInfo.getTextWithFields is now split up into a helper function _getFieldsInRange, similar to DisplayModelTextInfo. This allows for easy retrieval of control/format fields in a particular range, regardless where the text info is positioned.
4. pointFromOffset in the adobe acrobat virtual buffer now uses the _indexINParent attribute. It seems Adobe Acrobat has separate dom nodes for every word, so pointFromOffset now gets the center point of the word, which is far better than it was before.