diff options
author | Liang Qi <liang.qi@qt.io> | 2017-07-04 15:29:25 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-07-04 15:30:15 +0200 |
commit | db2ecc45564609f940ff564e777f76a1a4b734d4 (patch) | |
tree | d4756dffb486a2a1c64f13402bafd0327b7ddbb3 /Source/WebCore/editing/AlternativeTextController.cpp | |
parent | 8231f9776c2e4028937411bd2a0886aa72c97831 (diff) | |
parent | d10511e0a3f655ab2b1dfebfd9c17ade151a7cfe (diff) |
Merge remote-tracking branch 'origin/5.212' into dev
Change-Id: I006cd9023fadc5407bbaa2ddfda45cb8e88b548b
Diffstat (limited to 'Source/WebCore/editing/AlternativeTextController.cpp')
-rw-r--r-- | Source/WebCore/editing/AlternativeTextController.cpp | 4 |
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()); |