[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

vestbo at webkit.org vestbo at webkit.org
Wed Apr 7 23:26:30 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 30a0bb7a1985565c978f480f520f956abccc2b5b
Author: vestbo at webkit.org <vestbo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 9 13:07:46 2009 +0000

    Added QGraphicsWebView::findText() for convenience and consistency
    with QWebView.
    
    Patch by Simon Hausmann <hausmann at webkit.org> on 2009-11-04
    Reviewed by Tor Arne Vestbø.
    
    * Api/qgraphicswebview.cpp:
    (QGraphicsWebView::findText):
    * Api/qgraphicswebview.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50649 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index 2edf30f..ebd7c6c 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -619,6 +619,29 @@ void QGraphicsWebView::triggerPageAction(QWebPage::WebAction action, bool checke
     page()->triggerAction(action, checked);
 }
 
+/*!
+    Finds the specified string, \a subString, in the page, using the given \a options.
+
+    If the HighlightAllOccurrences flag is passed, the function will highlight all occurrences
+    that exist in the page. All subsequent calls will extend the highlight, rather than
+    replace it, with occurrences of the new string.
+
+    If the HighlightAllOccurrences flag is not passed, the function will select an occurrence
+    and all subsequent calls will replace the current occurrence with the next one.
+
+    To clear the selection, just pass an empty string.
+
+    Returns true if \a subString was found; otherwise returns false.
+
+    \sa selectedText(), selectionChanged()
+*/
+bool QGraphicsWebView::findText(const QString &subString, QWebPage::FindFlags options)
+{
+    if (d->page)
+        return d->page->findText(subString, options);
+    return false;
+}
+
 /*! \reimp
 */
 void QGraphicsWebView::hoverMoveEvent(QGraphicsSceneHoverEvent* ev)
diff --git a/WebKit/qt/Api/qgraphicswebview.h b/WebKit/qt/Api/qgraphicswebview.h
index dcf4041..0882d9b 100644
--- a/WebKit/qt/Api/qgraphicswebview.h
+++ b/WebKit/qt/Api/qgraphicswebview.h
@@ -77,6 +77,8 @@ public:
     QAction* pageAction(QWebPage::WebAction action) const;
     void triggerPageAction(QWebPage::WebAction action, bool checked = false);
 
+    bool findText(const QString& subString, QWebPage::FindFlags options = 0);
+
     virtual void setGeometry(const QRectF& rect);
     virtual void updateGeometry();
     virtual void paint(QPainter*, const QStyleOptionGraphicsItem* options, QWidget* widget = 0);
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 23de9bf..f236e94 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -2,6 +2,17 @@
 
         Reviewed by Tor Arne Vestbø.
 
+        Added QGraphicsWebView::findText() for convenience and consistency
+        with QWebView.
+
+        * Api/qgraphicswebview.cpp:
+        (QGraphicsWebView::findText):
+        * Api/qgraphicswebview.h:
+
+2009-11-04  Simon Hausmann  <hausmann at webkit.org>
+
+        Reviewed by Tor Arne Vestbø.
+
         Added QGraphicsWebView::pageAction() and triggerPageAction(), for
         consistency with QWebView.
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list