summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-05-09 14:52:57 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-22 21:33:53 +0000
commit9d962bc9424c71a451d04741619c9597f3da8010 (patch)
treeca85e0a9139edb956c4d60f32c17d2ad10c2f8dd /src
parentc23b274ee5b4db605ff1f51f9d91b290e60ab359 (diff)
Fix selectedText() to return the value of what findText("") finds
Previously when a find operation was finished by calling findText(""), the selection buffer was cleared and calling selectedText() would return an empty string, even though on the UI side a blue rectangle selection was still visible. This was due to an incorrect Unselect() call in WebContentsAdapter::stopFinding(). With the new selection change support in the parent patch, and with the removed Unselect() call, selectedText() now properly returns the value of the highlighted blue selection after searching is finished. Task-number: QTBUG-60673 Task-number: QTBUG-54071 Task-number: QTBUG-53134 Change-Id: I89e0eddb0c14af6d6c06ee878e706be65d3b0831 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src')
-rw-r--r--src/core/web_contents_adapter.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 2b7ab03dd..7e93ffab9 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -916,9 +916,6 @@ 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->CollapseSelection();
d->webContents->StopFinding(content::STOP_FIND_ACTION_KEEP_SELECTION);
}