REGRESSION(r164401): Placing a caret doesn't bring up autocorrection panel
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Jul 2014 04:51:13 +0000 (04:51 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Jul 2014 04:51:13 +0000 (04:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135278

Reviewed by Tim Horton.

The bug was caused by editorUIUpdateTimerFired calling respondToChangedSelection only if the selection was
triggered by dictation instead of only if it was NOT triggered by dictation.

Prior to r164401, AlternativeTextController::respondToMarkerAtEndOfWord exited early when SetSelectionOptions
had DictationTriggered set. r164401 intended to move this check to editorUIUpdateTimerFired to avoid passing
options around but the boolean condition was erroneously flipped.

Fixed the bug by negating the condition in editorUIUpdateTimerFired.

No new tests for now since autocorrection panel cannot be tested automatically. (We should really automate this!)

* editing/Editor.cpp:
(WebCore::Editor::editorUIUpdateTimerFired):

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

Source/WebCore/ChangeLog
Source/WebCore/editing/Editor.cpp

index 2c8e536b72109d0391af943908c339dcf69fc41b..a3682f39df7f43f93452d7e6ad7e77b3b897b179 100644 (file)
@@ -1,3 +1,24 @@
+2014-07-24  Ryosuke Niwa  <rniwa@webkit.org>
+
+        REGRESSION(r164401): Placing a caret doesn't bring up autocorrection panel
+        https://bugs.webkit.org/show_bug.cgi?id=135278
+
+        Reviewed by Tim Horton.
+
+        The bug was caused by editorUIUpdateTimerFired calling respondToChangedSelection only if the selection was
+        triggered by dictation instead of only if it was NOT triggered by dictation.
+
+        Prior to r164401, AlternativeTextController::respondToMarkerAtEndOfWord exited early when SetSelectionOptions
+        had DictationTriggered set. r164401 intended to move this check to editorUIUpdateTimerFired to avoid passing
+        options around but the boolean condition was erroneously flipped.
+
+        Fixed the bug by negating the condition in editorUIUpdateTimerFired.
+
+        No new tests for now since autocorrection panel cannot be tested automatically. (We should really automate this!)
+
+        * editing/Editor.cpp:
+        (WebCore::Editor::editorUIUpdateTimerFired):
+
 2014-07-24  Pratik Solanki  <psolanki@apple.com>
 
         REGRESSION(r171526): [GTK] Massive crashes.
index 0e996c1b7a43595cd8b54448cf8d1f6bdaad733b..a3da9a2800c220389243e84dbddb21c4f260f7ed 100644 (file)
@@ -3531,7 +3531,7 @@ void Editor::editorUIUpdateTimerFired(Timer<Editor>&)
 #if ENABLE(DELETION_UI)
     m_deleteButtonController->respondToChangedSelection(oldSelection);
 #endif
-    if (m_editorUIUpdateTimerWasTriggeredByDictation)
+    if (!m_editorUIUpdateTimerWasTriggeredByDictation)
         m_alternativeTextController->respondToChangedSelection(oldSelection);
 
     m_oldSelectionForEditorUIUpdate = m_frame.selection().selection();