[GTK] [WebKit2] Clicking on a word that is selected in an editable area deletes it
https://bugs.webkit.org/show_bug.cgi?id=106045

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-01-04
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Be more selective about when to confirm WebKit compositions. If there is no current
preedit, reseting the GTK+ context shouldn't also do an empty confirmation in WebKit,
as this will trash the current selection. The second part of this patch also makes the
m_composingTextCurrently member more accurately reflect whether or not we are composing
text.

* platform/gtk/GtkInputMethodFilter.cpp:
(WebCore::GtkInputMethodFilter::notifyMouseButtonPress): Only confirm the current WebKit composition
if we have a preedit.
(WebCore::GtkInputMethodFilter::notifyFocusedOut): Ditto.
(WebCore::GtkInputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents): Don't clear the m_composingTextCurrently
member if we are not sending a confirmed composition.

Tools:

Update test results to confirm that compositions without preedits do not trigger
a composition confirmation.

* TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp:
(TestWebKitAPI::verifyCanceledComposition):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Unreviewed gardening, unskip a now passing test.

* platform/qt-5.0-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138807 268f45cc-cd09-0410-ab3c-d52691b4dbfc