summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/editing/AlternativeTextController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/editing/AlternativeTextController.cpp')
-rw-r--r--Source/WebCore/editing/AlternativeTextController.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/WebCore/editing/AlternativeTextController.cpp b/Source/WebCore/editing/AlternativeTextController.cpp
index 73102571a..32c204d14 100644
--- a/Source/WebCore/editing/AlternativeTextController.cpp
+++ b/Source/WebCore/editing/AlternativeTextController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2008, 2016 Apple Inc. All rights reserved.
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
@@ -315,6 +315,8 @@ void AlternativeTextController::respondToUnappliedSpellCorrection(const VisibleS
{
if (AlternativeTextClient* client = alternativeTextClient())
client->recordAutocorrectionResponse(AutocorrectionReverted, corrected, correction);
+
+ Ref<Frame> protector(m_frame);
m_frame.document()->updateLayout();
m_frame.selection().setSelection(selectionOfCorrected, FrameSelection::defaultSetSelectionOptions() | FrameSelection::SpellCorrectionTriggered);
RefPtr<Range> range = Range::create(*m_frame.document(), m_frame.selection().selection().start(), m_frame.selection().selection().end());