2011-04-07 Jia Pu <jpu@apple.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2011 03:59:34 +0000 (03:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2011 03:59:34 +0000 (03:59 +0000)
commit9c6cadfde1d613bd5079652a0032351893cdb869
tree87f14aed35488667009513d60c649eabc01c54cc
parent682e3d014268093525b54d496044121a395b63ed
2011-04-07  Jia Pu  <jpu@apple.com>

        Reviewed by Darin Adler.

        [Mac] Editor::setComposition() should not trigger correction panel timer.
        https://bugs.webkit.org/show_bug.cgi?id=58049
         <rdar://problem/9226305>

        On Mac OS X that supports autocorrection panel, typing unconfirmed composition (i.e. unconfirmed Japanese or Chinese input)
        should not start autocorrection timer. We added a member variable, m_shouldPreventSpellChecking, to TypingCommand.
        When this value is true, markMisspellingsAfterTyping() will not be called in TypingCommand::typingAddedToOpenCommand().
        m_shouldPreventSpellChecking is set to true in the TypingCommand objects created by Editor::setComposition().

        No new tests. No deterministically reproducible test case. Patch is based on static code analysis. Testing this also requires firing
        autocorrection panel timer, which can not be easily done in automated fashion.

        * editing/Editor.cpp:
        (WebCore::Editor::deleteWithDirection):
        (WebCore::Editor::insertTextWithoutSendingTextEvent):
        (WebCore::Editor::confirmComposition):
        (WebCore::Editor::setComposition):
        * editing/EditorCommand.cpp:
        (WebCore::executeDelete):
        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::TypingCommand):
        (WebCore::TypingCommand::deleteSelection):
        (WebCore::TypingCommand::deleteKeyPressed):
        (WebCore::TypingCommand::forwardDeleteKeyPressed):
        (WebCore::TypingCommand::insertText):
        (WebCore::TypingCommand::insertLineBreak):
        (WebCore::TypingCommand::insertParagraphSeparator):
        (WebCore::TypingCommand::typingAddedToOpenCommand):
        * editing/TypingCommand.h:
        (WebCore::TypingCommand::create):
        (WebCore::TypingCommand::setShouldPreventSpellChecking):

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