Index: third_party/WebKit/WebCore/page/ContextMenuController.cpp |
=================================================================== |
--- third_party/WebKit/WebCore/page/ContextMenuController.cpp (revision 9391) |
+++ third_party/WebKit/WebCore/page/ContextMenuController.cpp (working copy) |
@@ -193,7 +193,7 @@ |
#endif |
case ContextMenuItemTagSpellingGuess: |
ASSERT(frame->selectedText().length()); |
- if (frame->editor()->shouldInsertText(item->title(), frame->selection()->toRange().get(), |
+ if (frame->editor()->shouldInsertText(item->title(), frame->selection()->toNormalizedRange().get(), |
EditorInsertActionPasted)) { |
Document* document = frame->document(); |
RefPtr<ReplaceSelectionCommand> command = |
@@ -238,7 +238,7 @@ |
break; |
case ContextMenuItemTagStartSpeaking: { |
ExceptionCode ec; |
- RefPtr<Range> selectedRange = frame->selection()->toRange(); |
+ RefPtr<Range> selectedRange = frame->selection()->toNormalizedRange(); |
if (!selectedRange || selectedRange->collapsed(ec)) { |
Document* document = result.innerNonSharedNode()->document(); |
selectedRange = document->createRange(); |