Explicitly dismiss correction panel when user types a new character
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Jun 2015 21:25:55 +0000 (21:25 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Jun 2015 21:25:55 +0000 (21:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145732
<rdar://problem/19596892>

Reviewed by Darin Adler.

Explicitly dismiss the correction panel when the user types a new character.
This patch shouldn't change any behavior we're currently relying on AppKit to do the same.

Manually ran tests in ManualTests/autocorrection.

* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::respondToAppliedEditing):

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

Source/WebCore/ChangeLog
Source/WebCore/editing/AlternativeTextController.cpp

index 15a0747b5b258712ce191528f524a13caec1d3a9..2e34c47aaba87a7b4c2c8a233042c53e7bb75942 100644 (file)
@@ -1,3 +1,19 @@
+2015-06-08  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Explicitly dismiss correction panel when user types a new character
+        https://bugs.webkit.org/show_bug.cgi?id=145732
+        <rdar://problem/19596892>
+
+        Reviewed by Darin Adler.
+
+        Explicitly dismiss the correction panel when the user types a new character.
+        This patch shouldn't change any behavior we're currently relying on AppKit to do the same.
+
+        Manually ran tests in ManualTests/autocorrection.
+
+        * editing/AlternativeTextController.cpp:
+        (WebCore::AlternativeTextController::respondToAppliedEditing):
+
 2015-06-08  Javier Fernandez  <jfernandez@igalia.com>
 
         [CSS Grid Layout] Setting height on a grid item doesn't have any effect
index b69f35eca1b5c75b9b77d2c0be9a804f90621307..f5bc94891caf7e7097a03e2729e728f2636f08bd 100644 (file)
@@ -484,6 +484,8 @@ void AlternativeTextController::respondToAppliedEditing(CompositeEditCommand* co
 
     markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand(command);
     m_originalStringForLastDeletedAutocorrection = String();
+
+    dismiss(ReasonForDismissingAlternativeTextIgnored);
 }
 
 void AlternativeTextController::respondToUnappliedEditing(EditCommandComposition* command)