When the caret is placed after a word, the offsets were calculated around the proceeding space. As such, words that end a sentence worked correctly, but midsentence words did not. The 'startOfWord' was calculated for the space ahead and not for the word before it. Now finding the start of the word correctly and calculating the end from there.
Created attachment 205113 [details] Patch
Created attachment 205114 [details] Patch
Comment on attachment 205114 [details] Patch LGTM.
Comment on attachment 205114 [details] Patch Clearing flags on attachment: 205114 Committed r151809: <http://trac.webkit.org/changeset/151809>
All reviewed patches have been landed. Closing bug.