-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=89526 <rdar://problem/10305315> Patch by Alice Cheng <alice_cheng@apple.com> on 2012-06-26 Reviewed by Darin Adler. Source/WebCore: The range used for marking becomes invalid after SpellingCorrectionCommand, due to changes in the DOM made by ReplaceSelectionCommand. This invalid range caused marking to be incorrect, and Mail.app to crash when iterating through the invalid range. To fix this, recalculate the range for marking after SpellingCorrectionCommand. Test: platform/mac/editing/spelling/autocorrection-blockquote-crash.html * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::applyAlternativeTextToRange): * editing/Editor.cpp: (WebCore::Editor::markAndReplaceFor): * testing/Internals.cpp: (WebCore): (WebCore::Internals::hasAutocorrectedMarker): * testing/Internals.h: (Internals): * testing/Internals.idl: LayoutTests: * platform/mac/editing/spelling/autocorrection-blockquote-crash-expected.txt: Added. * platform/mac/editing/spelling/autocorrection-blockquote-crash.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6310cb67