Commit 3d7a0f43 authored by philn@webkit.org's avatar philn@webkit.org

2011-05-12 Philippe Normand <pnormand@igalia.com>

        Reviewed by Adam Roben.

        Autocorrection persists after deleting and retyping the same word at same location.
        https://bugs.webkit.org/show_bug.cgi?id=60555

        Follow-up fix for the 3 editing/deleting tests crashing on GTK,
        Leopard and Windows XP. Don't create the Range if the start of the
        selection has no next position.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c4365eec
2011-05-12 Philippe Normand <pnormand@igalia.com>
Reviewed by Adam Roben.
Autocorrection persists after deleting and retyping the same word at same location.
https://bugs.webkit.org/show_bug.cgi?id=60555
Follow-up fix for the 3 editing/deleting tests crashing on GTK,
Leopard and Windows XP. Don't create the Range if the start of the
selection has no next position.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
2011-05-12 Adam Roben <aroben@apple.com>
Attempted WinCairo build fix after r86169
......@@ -754,7 +754,11 @@ String DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelec
if (!isStartOfWord(startOfSelection))
return String();
RefPtr<Range> rangeOfFirstCharacter = Range::create(document(), startOfSelection.deepEquivalent(), startOfSelection.next().deepEquivalent());
VisiblePosition nextPosition = startOfSelection.next();
if (nextPosition.isNull())
return String();
RefPtr<Range> rangeOfFirstCharacter = Range::create(document(), startOfSelection.deepEquivalent(), nextPosition.deepEquivalent());
Vector<DocumentMarker> markers = document()->markers()->markersInRange(rangeOfFirstCharacter.get(), DocumentMarker::Autocorrected);
for (size_t i = 0; i < markers.size(); ++i) {
const DocumentMarker& marker = markers[i];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment