2011-04-11  Jia Pu  <jpu@apple.com>

        Reviewed by Adele Peterson.

        Shouldn't carry out autocorrection when start typing a new word
        https://bugs.webkit.org/show_bug.cgi?id=58241
        <rdar://problem/9264736>

        See WebCore/ChangeLog for detail.

        * platform/mac-leopard/Skipped:
        * platform/mac-snowleopard/Skipped:
        * platform/mac-tiger/Skipped:
        * platform/mac/editing/spelling/autocorrection-at-beginning-of-word-1-expected.checksum: Added.
        * platform/mac/editing/spelling/autocorrection-at-beginning-of-word-1-expected.png: Added.
        * platform/mac/editing/spelling/autocorrection-at-beginning-of-word-1-expected.txt: Added.
        * platform/mac/editing/spelling/autocorrection-at-beginning-of-word-1.html: Added.
        * platform/mac/editing/spelling/autocorrection-at-beginning-of-word-2-expected.checksum: Added.
        * platform/mac/editing/spelling/autocorrection-at-beginning-of-word-2-expected.png: Added.
        * platform/mac/editing/spelling/autocorrection-at-beginning-of-word-2-expected.txt: Added.
        * platform/mac/editing/spelling/autocorrection-at-beginning-of-word-2.html: Added.
2011-04-11  Jia Pu  <jpu@apple.com>

        Reviewed by Adele Peterson.

        Shouldn't carry out autocorrection when start typing a new word
        https://bugs.webkit.org/show_bug.cgi?id=58241
        <rdar://problem/9264736>

        Tests: platform/mac/editing/spelling/autocorrection-at-beginning-of-word-1.html
               platform/mac/editing/spelling/autocorrection-at-beginning-of-word-2.html

        In TypingCommand::markMisspellingsAfterTyping(), we want to call Editor::markMisspellingsAfterTypingToWord()
        only when the typing command is an insertion command, and preceding word contains at least one non-whitespace
        character.

        * editing/Editor.cpp:
        (WebCore::Editor::markMisspellingsAfterTypingToWord):
        * editing/Editor.h:
        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::markMisspellingsAfterTyping):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed