2011-01-05  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Keep track of active text substitution preferences
        https://bugs.webkit.org/show_bug.cgi?id=51931

        * Shared/TextCheckerState.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView validateUserInterfaceItem:]):
        Handle new selectors, mostly copied from WebKit1 code.

        (-[WKView orderFrontSubstitutionsPanel:]):
        Open the substitution panel.

        (-[WKView isAutomaticQuoteSubstitutionEnabled]):
        (-[WKView setAutomaticQuoteSubstitutionEnabled:]):
        (-[WKView toggleAutomaticQuoteSubstitution:]):
        (-[WKView isAutomaticDashSubstitutionEnabled]):
        (-[WKView setAutomaticDashSubstitutionEnabled:]):
        (-[WKView toggleAutomaticDashSubstitution:]):
        (-[WKView isAutomaticLinkDetectionEnabled]):
        (-[WKView setAutomaticLinkDetectionEnabled:]):
        (-[WKView toggleAutomaticLinkDetection:]):
        (-[WKView isAutomaticTextReplacementEnabled]):
        (-[WKView setAutomaticTextReplacementEnabled:]):
        (-[WKView toggleAutomaticTextReplacement:]):
        Call the text checker, and update the state in the web process if needed.

        * UIProcess/TextChecker.h:
        Add new flags.

        * UIProcess/mac/TextCheckerMac.mm:
        (WebKit::initializeState):
        Initialize flags from user defaults.

        (WebKit::TextChecker::setAutomaticQuoteSubstitutionEnabled):
        (WebKit::TextChecker::setAutomaticDashSubstitutionEnabled):
        (WebKit::TextChecker::setAutomaticLinkDetectionEnabled):
        (WebKit::TextChecker::setAutomaticTextReplacementEnabled):
        Update and save the flags.

        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
        (WebKit::WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
        (WebKit::WebEditorClient::isAutomaticLinkDetectionEnabled):
        (WebKit::WebEditorClient::isAutomaticDashSubstitutionEnabled):
        (WebKit::WebEditorClient::isAutomaticTextReplacementEnabled):
        Get the text checker state.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/UIProcess/TextChecker.h b/WebKit2/UIProcess/TextChecker.h
index 94e119d..aa5b5ca 100644
--- a/WebKit2/UIProcess/TextChecker.h
+++ b/WebKit2/UIProcess/TextChecker.h
@@ -42,6 +42,10 @@
 
 #if PLATFORM(MAC)
     static void setAutomaticSpellingCorrectionEnabled(bool);
+    static void setAutomaticQuoteSubstitutionEnabled(bool);
+    static void setAutomaticDashSubstitutionEnabled(bool);
+    static void setAutomaticLinkDetectionEnabled(bool);
+    static void setAutomaticTextReplacementEnabled(bool);
 #endif
 
     static int64_t uniqueSpellDocumentTag();