[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreas.kling at nokia.com
andreas.kling at nokia.com
Wed Dec 22 15:19:24 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 19bf5915a2bf45495eb3f8c2d8d8f9e90a3c43ce
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Oct 31 20:42:25 2010 +0000
2010-10-31 Andreas Kling <kling at webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Short-circuit QWebPage::selectedText() if frame has no selection
https://bugs.webkit.org/show_bug.cgi?id=48736
Do an early return if the selection is empty.
No new tests, this is covered by tst_QWebPage::findText().
* Api/qwebpage.cpp:
(QWebPage::selectedText):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 6a288d5..0754fcb 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -2418,7 +2418,10 @@ bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &
QString QWebPage::selectedText() const
{
d->createMainFrame();
- return d->page->focusController()->focusedOrMainFrame()->editor()->selectedText();
+ WebCore::Frame* frame = d->page->focusController()->focusedOrMainFrame();
+ if (frame->selection()->selection().selectionType() == VisibleSelection::NoSelection)
+ return QString();
+ return frame->editor()->selectedText();
}
#ifndef QT_NO_ACTION
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index c3ce3de..ab85cd4 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-31 Andreas Kling <kling at webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Short-circuit QWebPage::selectedText() if frame has no selection
+ https://bugs.webkit.org/show_bug.cgi?id=48736
+
+ Do an early return if the selection is empty.
+
+ No new tests, this is covered by tst_QWebPage::findText().
+
+ * Api/qwebpage.cpp:
+ (QWebPage::selectedText):
+
2010-10-30 Andreas Kling <kling at webkit.org>
Reviewed by Antonio Gomes.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list