[Mac] Text replacement should use correction indicator
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 May 2013 00:02:29 +0000 (00:02 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 May 2013 00:02:29 +0000 (00:02 +0000)
commitfda8d61367e4cae2fbf89c35ae07ca88d238b30e
treec02b71e93d6ef10ab0859990a56be133bcd1c338
parent3cb8faee6c2ded2f5dab62a7c65c365bf0cf2438
[Mac] Text replacement should use correction indicator
https://bugs.webkit.org/show_bug.cgi?id=115471

Reviewed by Darin Adler.

Support autocorrection panel for text replacements by making AlternativeTextTypeCorrection
handle text replacements as well as automatic spelling correction.

No new tests. Unfortunately this feature is not testable as is. We need to provide some
internals or testRunner methods to make this feature testable in the long term.

* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::timerFired): Trigger both TextCheckingTypeReplacement
and TextCheckingTypeShowCorrectionPanel.

* editing/Editor.cpp:
(WebCore::Editor::markAndReplaceFor): Autocorrection panel maybe used for both
TextCheckingTypeReplacement and TextCheckingTypeShowCorrectionPanel.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/AlternativeTextController.cpp
Source/WebCore/editing/Editor.cpp