diff options
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage')
-rw-r--r-- | Source/WebKit2/WebProcess/WebPage/WebPage.cpp | 4 | ||||
-rw-r--r-- | Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp index c8d54d523..6a69492d9 100644 --- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp +++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp @@ -4493,6 +4493,8 @@ void WebPage::insertTextAsync(const String& text, const EditingRange& replacemen { Frame& frame = m_page->focusController().focusedOrMainFrame(); + Ref<Frame> protector(frame); + if (replacementEditingRange.location != notFound) { RefPtr<Range> replacementRange = rangeFromEditingRange(frame, replacementEditingRange, static_cast<EditingRangeIsRelativeTo>(editingRangeIsRelativeTo)); if (replacementRange) @@ -4655,6 +4657,8 @@ void WebPage::setComposition(const String& text, const Vector<CompositionUnderli return; } + Ref<Frame> protector(*targetFrame); + if (replacementLength > 0) { // The layout needs to be uptodate before setting a selection targetFrame->document()->updateLayout(); diff --git a/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp b/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp index 899d09a51..5dd083c7c 100644 --- a/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp +++ b/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp @@ -29,11 +29,9 @@ #include "NotImplemented.h" #include "PopupMenuClient.h" -#include "WebEditorClient.h" #include "WebEvent.h" #include "WebPageProxyMessages.h" #include "WebPopupMenu.h" -#include "WebProcess.h" #include <QClipboard> #include <QGuiApplication> #include <WebCore/EventHandler.h> |