In SelectionHandler::selectionPositionChanged() method, startCaret and endCaret are used to notify clients about new caret positions. We should initialize startCaret and endCaret with location(-1. -1), and keep them empty before they are assigned to valid values. This would help for other classes to check validity of the caret correctly.
Created attachment 162573 [details] Patch
Comment on attachment 162573 [details] Patch LGTM.
Comment on attachment 162573 [details] Patch Clearing flags on attachment: 162573 Committed r127894: <http://trac.webkit.org/changeset/127894>
All reviewed patches have been landed. Closing bug.