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

kenneth at webkit.org kenneth at webkit.org
Wed Apr 7 23:15:27 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 2fd9b57693b946c18fc3037dd7057ba464d3c1fe
Author: kenneth at webkit.org <kenneth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 29 22:49:35 2009 +0000

    WebKitTools: Implement the Qt version of DRT dumpBackForwardList().
    
    Patch by Kenneth Rohde Christiansen <kenneth at webkit.org> on 2009-10-29
    Reviewed by Oliver Hunt.
    
    * DumpRenderTree/qt/DumpRenderTree.cpp:
    (WebCore::dumpHistoryItem):
    (WebCore::DumpRenderTree::dumpBackForwardList):
    
    LayoutTests: Removed test that passes after implementing the Qt DRT version
    of dumpBackForwardList().
    
    Patch by Kenneth Rohde Christiansen <kenneth at webkit.org> on 2009-10-29
    Reviewed by Oliver Hunt.
    
    * platform/qt/Skipped:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50307 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0629a2b..d88b955 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -32,6 +32,15 @@
 
 2009-10-29  Kenneth Rohde Christiansen  <kenneth at webkit.org>
 
+        Reviewed by Oliver Hunt.
+
+        Removed test that passes after implementing the Qt DRT version
+        of dumpBackForwardList().
+
+        * platform/qt/Skipped:
+
+2009-10-29  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
         Rubberstamped by Adam Roben.
 
         Remove two tests that pass on the buildbot.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 1c32fa2..930f56f 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -130,9 +130,6 @@ fast/events/pageshow-pagehide-on-back-cached-with-frames.html
 # layoutTestController.waitForPolicyDelegate() does not report the origin node
 fast/encoding/mailto-always-utf-8.html
 
-# Missing layoutTestController.dumpBackForwardList()
-fast/loader/fragment-after-redirect-gets-back-entry.html
-
 # Missing layoutTestController.setAlwaysAcceptCookies()
 http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-timeout.html
 
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ec6ee11..aa99cb4 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -12,6 +12,16 @@
 
 2009-10-29  Kenneth Rohde Christiansen  <kenneth at webkit.org>
 
+        Reviewed by Oliver Hunt.
+
+        Implement the Qt version of DRT dumpBackForwardList().
+
+        * DumpRenderTree/qt/DumpRenderTree.cpp:
+        (WebCore::dumpHistoryItem):
+        (WebCore::DumpRenderTree::dumpBackForwardList):
+
+2009-10-29  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
         Reviewed by Adam Roben.
 
         Implement DRT functionality for Qt introduced in
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
index e255052..97b33b4 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
@@ -419,11 +419,67 @@ QString DumpRenderTree::dumpFramesAsText(QWebFrame* frame)
     return result;
 }
 
+static QString dumpHistoryItem(const QWebHistoryItem& item, int indent, bool current)
+{
+    QString result;
+
+    int start = 0;
+    if (current) {
+        result.append(QLatin1String("curr->"));
+        start = 6;
+    }
+    for (int i = start; i < indent; i++)
+        result.append(' ');
+
+    QString url = item.url().toString();
+    if (url.contains("file://")) {
+        static QString layoutTestsString("/LayoutTests/");
+        static QString fileTestString("(file test):");
+
+        QString res = url.mid(url.indexOf(layoutTestsString) + layoutTestsString.length());
+        if (res.isEmpty())
+            return result;
+
+        result.append(fileTestString);
+        result.append(res);
+
+        // FIXME: Wrong, need (private?) API for determining this.
+        result.append(QLatin1String("  **nav target**"));
+    }
+    result.append(QLatin1String("\n"));
+
+    return result;
+}
+
 QString DumpRenderTree::dumpBackForwardList()
 {
+    QWebHistory* history = webPage()->history();
+
     QString result;
     result.append(QLatin1String("\n============== Back Forward List ==============\n"));
-    result.append(QLatin1String("FIXME: Unimplemented!\n"));
+
+    // FORMAT:
+    // "        (file test):fast/loader/resources/click-fragment-link.html  **nav target**"
+    // "curr->  (file test):fast/loader/resources/click-fragment-link.html#testfragment  **nav target**"
+
+    int maxItems = history->maximumItemCount();
+
+    foreach (const QWebHistoryItem item, history->backItems(maxItems)) {
+        if (!item.isValid())
+            continue;
+        result.append(dumpHistoryItem(item, 8, false));
+    }
+
+    QWebHistoryItem item = history->currentItem();
+    if (item.isValid())
+        result.append(dumpHistoryItem(item, 8, true));
+
+    foreach (const QWebHistoryItem item, history->forwardItems(maxItems)) {
+        if (!item.isValid())
+            continue;
+        result.append(dumpHistoryItem(item, 8, false));
+    }
+
     result.append(QLatin1String("===============================================\n"));
     return result;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list