-
commit-queue@webkit.org authored
Reviewed by Dan Bernstein. Regression: contraction is considered misspelling. https://bugs.webkit.org/show_bug.cgi?id=49423 <rdar://problem/8654206> * platform/mac-leopard/Skipped: * platform/mac-snowleopard/Skipped: * platform/mac-tiger/Skipped: * platform/mac-wk2/Skipped: * platform/mac/editing/spelling/autocorrection-contraction-expected.checksum: Added. * platform/mac/editing/spelling/autocorrection-contraction-expected.png: Added. * platform/mac/editing/spelling/autocorrection-contraction-expected.txt: Added. * platform/mac/editing/spelling/autocorrection-contraction.html: Added. 2010-11-19 Jia Pu <jpu@apple.com> Reviewed by Dan Bernstein. Regression: contraction is considered misspelling. https://bugs.webkit.org/show_bug.cgi?id=49423 <rdar://problem/8654206> Test: platform/mac/editing/spelling/autocorrection-contraction.html manual-tests/autocorrection/autocorrection-contraction.html * editing/Editor.cpp: (WebCore::isAmbiguousBoundaryCharacter): Moved function to the top of the file so that it can be used by all other functions in the file. (WebCore::Editor::markMisspellingsAfterTypingToWord): Renamed markMisspellingsAfterTypingToPosition() to improve readability, and to pass in additional argument. Before we apply pending autocorrection, we check to see if currently typed character makes current word a partial contraction, for instance "wouldn'". If that's the case, we would not apply the pending correction. (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Make sure currently typed word is not a partial contraction, such as "wouldn'", before mark it as misspelled. Also update the location of ambiguous boundary if other replacements have changed the length of the paragraph. * editing/Editor.h: * editing/TypingCommand.cpp: (WebCore::TypingCommand::markMisspellingsAfterTyping): Adopt renamed function. * manual-tests/autocorrection/autocorrection-contraction.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a563e17c