All rights reserved. This is not required. We don't want to copy all the text and attribute data here. The caret provided by the input method may be null.
Handles changes to the text entered through an input method.
Handles changes to the caret within composed text. TextLayout maps locations far outside its bounds to locations within. To avoid false hits, we use it only if it actually contains the location. We also have to translate the TextHitInfo to be relative to composed text. Assumes that no annotation spans the two iterators.