summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-04 07:29:26 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-05 11:35:18 +0200
commit179463fd2b17343dae291ab6f7617311bcfbdb75 (patch)
treee32e298ca5d6e2b6e206dab7d42538a6ce68eba1 /src/core/web_contents_adapter.cpp
parentc8851dd1a77e730bc6a3c17b7c75b1a4c6b41f53 (diff)
parent336e706cbc839dd7b7c1d461b6b015600b5f009e (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Also blacklist tst_QWebEnginePage::comboBoxPopupPositionAfterChildMove() and comboBoxPopupPositionAfterMove(). Conflicts: .qmake.conf src/3rdparty src/core/render_widget_host_view_qt.cpp src/core/resources/resources.gyp src/webengine/doc/src/qtwebengine-platform-notes.qdoc src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h tests/auto/widgets/qwebenginepage/BLACKLIST tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp tools/qmake/mkspecs/features/functions.prf Task-number: QTBUG-55158 Change-Id: I1d73ac9b3ca5293ad3c7e3a56f4c395da930e6f4
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index c3789318a..b0aae6ca9 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -349,14 +349,14 @@ WebContentsAdapterPrivate::~WebContentsAdapterPrivate()
webContents.reset();
}
-QExplicitlySharedDataPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient)
+QSharedPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient)
{
int currentIndex;
std::vector<scoped_ptr<content::NavigationEntry>> entries;
deserializeNavigationHistory(input, &currentIndex, &entries, adapterClient->browserContextAdapter()->browserContext());
if (currentIndex == -1)
- return QExplicitlySharedDataPointer<WebContentsAdapter>();
+ return QSharedPointer<WebContentsAdapter>();
// Unlike WebCore, Chromium only supports Restoring to a new WebContents instance.
content::WebContents* newWebContents = createBlankWebContents(adapterClient, adapterClient->browserContextAdapter()->browserContext());
@@ -374,7 +374,7 @@ QExplicitlySharedDataPointer<WebContentsAdapter> WebContentsAdapter::createFromS
content::ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(id, *file);
}
- return QExplicitlySharedDataPointer<WebContentsAdapter>(new WebContentsAdapter(newWebContents));
+ return QSharedPointer<WebContentsAdapter>::create(newWebContents);
}
WebContentsAdapter::WebContentsAdapter(content::WebContents *webContents)
@@ -837,6 +837,9 @@ void WebContentsAdapter::stopFinding()
{
Q_D(WebContentsAdapter);
d->webContentsDelegate->setLastSearchedString(QString());
+ // Clear any previous selection,
+ // but keep the renderer blue rectangle selection just like Chromium does.
+ d->webContents->Unselect();
d->webContents->StopFinding(content::STOP_FIND_ACTION_KEEP_SELECTION);
}