2010-10-26 MORITA Hajime <morrita@google.com>
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Nov 2010 06:35:59 +0000 (06:35 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Nov 2010 06:35:59 +0000 (06:35 +0000)
commitbee1b8831359643f055273a11a128c746922a576
treee5b9e921371257417ef7dc141a500584a12620e5
parentec02c450c71793213c73838429cb7e5ab3919f63
2010-10-26  MORITA Hajime  <morrita@google.com>

        Reviewed by Kent Tamura.

        Refactoring: Spellchecking related static functions could form a class
        https://bugs.webkit.org/show_bug.cgi?id=48287

        Extracted spellcheck related static functions to TextCheckingHelper class,
        which has EditorClient and Range as its member.

        No new tests. Just a refactoring.

        * CMakeLists.txt:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * editing/EditingAllInOne.cpp
        * editing/Editor.cpp:
        (WebCore::Editor::advanceToNextMisspelling):
        (WebCore::Editor::isSelectionUngrammatical):
        (WebCore::Editor::guessesForUngrammaticalSelection):
        (WebCore::Editor::guessesForMisspelledOrUngrammaticalSelection):
        (WebCore::Editor::markMisspellingsAfterTypingToPosition):
        (WebCore::Editor::markMisspellingsOrBadGrammar):
        (WebCore::Editor::markMisspellings):
        (WebCore::Editor::markBadGrammar):
        (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
        (WebCore::Editor::changeBackToReplacedString):
        * editing/Editor.h:
        * editing/TextCheckingHelper.cpp: Added.
        (WebCore::TextCheckingHelper::TextCheckingHelper):
        (WebCore::TextCheckingHelper::~TextCheckingHelper):
        (WebCore::TextCheckingHelper::paragraphAlignedRange):
        (WebCore::TextCheckingHelper::findFirstMisspelling):
        (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
        (WebCore::TextCheckingHelper::findFirstGrammarDetail):
        (WebCore::TextCheckingHelper::findFirstBadGrammar):
        (WebCore::TextCheckingHelper::isUngrammatical):
        (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
        (WebCore::TextCheckingHelper::markAllMisspellings):
        (WebCore::TextCheckingHelper::markAllBadGrammar):
        * editing/TextCheckingHelper.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/editing/EditingAllInOne.cpp
WebCore/editing/Editor.cpp
WebCore/editing/Editor.h
WebCore/editing/TextCheckingHelper.cpp [new file with mode: 0644]
WebCore/editing/TextCheckingHelper.h [new file with mode: 0644]