diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2017-06-15 12:13:20 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-06-17 10:46:54 +0000 |
commit | aab669a05f943c587f6acccd94d53a8544170c1c (patch) | |
tree | 2c22545100b500eb80d23f75b8e3180ed9b5f3b7 /Source/WebKit2/WebProcess/WebPage | |
parent | c119ecc79e19c630a8b1ef10fe01cc567901033f (diff) | |
download | qtwebkit-aab669a05f943c587f6acccd94d53a8544170c1c.tar.gz |
Import WebKit commit 6d0ad27b6bc4209fb8d8cee2692dc0c6a5462051v5.212.0-alpha2
Change-Id: Ifdedb7bc3162434686201813dc1d994cf5ae7e70
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage')
-rw-r--r-- | Source/WebKit2/WebProcess/WebPage/WebPage.cpp | 4 |
1 files changed, 4 insertions, 0 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(); |