These are almost the same. SelectionState is only updated asynchronously, while TextInputState is updated synchronously, and is only valid while a key event is being processed. That's confusing. We can always keep the latest known state in the one place.
Created attachment 90239 [details] proposed patch
Comment on attachment 90239 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=90239&action=review The patch looks good to me. I like the way the code gets simplified. I don't understand why EditorState.h appears twice looking at the review, but it is probably a bug in the review tool. The only comment I have is the copyright year. Also, it appears there are problems in applying the patch for the qt build. > Source/WebKit2/Shared/EditorState.h:3 > + * Copyright 2011.
Committed <http://trac.webkit.org/changeset/84304>.