We never want to make sync messages from UI Process to WebProcess. This one is particularly silly, as WebCore has more information to decide whether a selection change is such that should abandon the input session (e.g. using JS to remove the whole element that's being edited). For now, I'd like to move the decision to WebProcess, eliminating the sync call. There is only one other instance of cancelComposition which I'll tackle separately (it's in -resignFirstResponder), and then we can move the message under an #ifdef.
Created attachment 227992 [details] proposed patch
Created attachment 228056 [details] with a build fix
Comment on attachment 228056 [details] with a build fix View in context: https://bugs.webkit.org/attachment.cgi?id=228056&action=review > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:4114 > +printf("didChangeSelection. hasComposition = %uï¼ignoreCompositionSelectionChange ï¼%u, isNone = %u\n", frame.editor().hasComposition(), frame.editor().ignoreCompositionSelectionChange(), frame.selection().isNone()); You have a printf here.
Comment on attachment 228056 [details] with a build fix View in context: https://bugs.webkit.org/attachment.cgi?id=228056&action=review >> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:4114 >> +printf("didChangeSelection. hasComposition = %uï¼ignoreCompositionSelectionChange ï¼%u, isNone = %u\n", frame.editor().hasComposition(), frame.editor().ignoreCompositionSelectionChange(), frame.selection().isNone()); > > You have a printf here. You probably don't want to leave this in :-)
Committed <http://trac.webkit.org/r166421>.