Simon :- I need the API for finding the caret position that we have been talking about for M5. Basically, just to recap, what I need is an API which will provide me a mapping between the current carret and the global coordinate scheme of the Mac. You might want to look at bug #4826 and see if there is some way that we can put together a more general API that will take care of all the requirements.
Blocker for M5 IME deliverable.
tague: I need to know what result you expect for a couple of edge cases: 1. Selection is not collapsed (hence, no caret) 2. Selection is not in text nodes.
Talking to tague, can move this to M6.
This is done (but untested). Get the caret from the pres shell, and call nsCaret::GetWindowRelativeCoordinates.