mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-20 08:51:04 +00:00
![James Teh](/assets/img/avatar_default.png)
Previously, we assumed that CaretAssociationHint::Before always meant the caret was at the insertion point at the end of a line. However, it can also mean that the caret is before the start of a node in the middle of a line. To fix this, we need to check for line and paragraph boundaries. See the code comments for details. I moved this functionality completely out of HyperTextAccessible and into TextLeafPoint. First, it was easiest to do these checks with private functions already available to TextLeafPoint. Second, this ideally belongs in TextLeafPoint anyway; its existence in HyperTextAccessible was vestigial. Differential Revision: https://phabricator.services.mozilla.com/D215089