[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

benjamin.poulain at nokia.com benjamin.poulain at nokia.com
Wed Dec 22 17:50:30 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b99ab2e18dd6dbd78d2ba6c113ebc87ef2748183
Author: benjamin.poulain at nokia.com <benjamin.poulain at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 1 04:18:47 2010 +0000

    2010-11-30  Benjamin Poulain  <benjamin.poulain at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Implement layoutTestController.findString
            https://bugs.webkit.org/show_bug.cgi?id=50236
    
            Add support for the new advanced findString().
    
            * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
            (DumpRenderTreeSupportQt::findString):
            * WebCoreSupport/DumpRenderTreeSupportQt.h:
    2010-11-30  Benjamin Poulain  <benjamin.poulain at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Implement layoutTestController.findString
            https://bugs.webkit.org/show_bug.cgi?id=50236
    
            Add the missing function to the LayoutTestController.
    
            * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
            (LayoutTestController::findString):
            * DumpRenderTree/qt/LayoutTestControllerQt.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73007 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 9f70723..892dd16 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-30  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Implement layoutTestController.findString
+        https://bugs.webkit.org/show_bug.cgi?id=50236
+
+        Add support for the new advanced findString().
+
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        (DumpRenderTreeSupportQt::findString):
+        * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
 2010-11-30  Ojan Vafai  <ojan at chromium.org>
 
         Revert r72876. It caused a ~30% perf regression in chromium's bloat-http test
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index a5a7270..a2863b1 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -437,6 +437,32 @@ bool DumpRenderTreeSupportQt::isCommandEnabled(QWebPage* page, const QString& na
     return page->handle()->page->focusController()->focusedOrMainFrame()->editor()->command(name).isEnabled();
 }
 
+bool DumpRenderTreeSupportQt::findString(QWebPage* page, const QString& string, const QStringList& optionArray)
+{
+    // 1. Parse the options from the array
+    WebCore::FindOptions options = 0;
+    const int optionCount = optionArray.size();
+    for (int i = 0; i < optionCount; ++i) {
+        const QString& option = optionArray.at(i);
+        if (option == QLatin1String("CaseInsensitive"))
+            options |= WebCore::CaseInsensitive;
+        else if (option == QLatin1String("AtWordStarts"))
+            options |= WebCore::AtWordStarts;
+        else if (option == QLatin1String("TreatMedialCapitalAsWordStart"))
+            options |= WebCore::TreatMedialCapitalAsWordStart;
+        else if (option == QLatin1String("Backwards"))
+            options |= WebCore::Backwards;
+        else if (option == QLatin1String("WrapAround"))
+            options |= WebCore::WrapAround;
+        else if (option == QLatin1String("StartInSelection"))
+            options |= WebCore::StartInSelection;
+    }
+
+    // 2. find the string
+    WebCore::Frame* frame = page->handle()->page->focusController()->focusedOrMainFrame();
+    return frame && frame->editor()->findString(string, options);
+}
+
 QString DumpRenderTreeSupportQt::markerTextForListItem(const QWebElement& listItem)
 {
     return WebCore::markerTextForListItem(listItem.m_element);
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 82d9319..98f2b94 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -44,6 +44,7 @@ public:
 
     static void executeCoreCommandByName(QWebPage* page, const QString& name, const QString& value);
     static bool isCommandEnabled(QWebPage* page, const QString& name);
+    static bool findString(QWebPage* page, const QString& string, const QStringList& optionArray);
     static void setSmartInsertDeleteEnabled(QWebPage* page, bool enabled);
     static void setSelectTrailingWhitespaceEnabled(QWebPage* page, bool enabled);
     static QVariantList selectedRange(QWebPage* page);
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 1a8aad0..e6c0053 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-30  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Implement layoutTestController.findString
+        https://bugs.webkit.org/show_bug.cgi?id=50236
+
+        Add the missing function to the LayoutTestController.
+
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        (LayoutTestController::findString):
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
 2010-11-30  Tony Chang  <tony at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 0f5f6e1..8b495be 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -707,6 +707,11 @@ bool LayoutTestController::isCommandEnabled(const QString& name) const
     return DumpRenderTreeSupportQt::isCommandEnabled(m_drt->webPage(), name);
 }
 
+bool LayoutTestController::findString(const QString& string, const QStringList& optionArray)
+{
+    return DumpRenderTreeSupportQt::findString(m_drt->webPage(), string, optionArray);
+}
+
 QString LayoutTestController::markerTextForListItem(const QWebElement& listItem)
 {
     return DumpRenderTreeSupportQt::markerTextForListItem(listItem);
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 590225b..9ba2364 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -168,6 +168,7 @@ public slots:
     void setSelectTrailingWhitespaceEnabled(bool enable);
     void execCommand(const QString& name, const QString& value = QString());
     bool isCommandEnabled(const QString& name) const;
+    bool findString(const QString& string, const QStringList& optionArray);
 
     bool pauseAnimationAtTimeOnElementWithId(const QString& animationName, double time, const QString& elementId);
     bool pauseTransitionAtTimeOnElementWithId(const QString& propertyName, double time, const QString& elementId);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list