kogmbh/WebODF — pull request #6 by peitschie (2013-09-24 00:14:43+00:00)
Title: Improve visual height and vertical alignment of caret

(Migrated from https://gitorious.org/webodf/webodf/merge_requests/170)

REVIEWER NOTE: This hasn't been tested in a collaborative setting, though I've attempted to handle the remote cursor scenario as well.

Before and after screenshots showing the differences: https://docs.google.com/file/d/0B1EH5OPb-RrjY1prck93WENtM3c/edit?usp=sharing

Implementation makes judicious use of the cursor's selection and
getClientRects to compute small adjustments necessary to make the
caret more closely match the browser caret positioning.

At the moment, each cursor must be re-fixed after any operation that
may affect the line height of the caret (e.g., removing a text char may
place cursor next to a larger text character)

This implementation has been tested with
- Forward & backward selections
- Wrapped text & white space
- Image deletion