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

tonikitoo at webkit.org tonikitoo at webkit.org
Wed Apr 7 23:25:38 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 9c6aef1d0a01195dc0dbad7728210175e68dd18c
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Nov 8 17:25:31 2009 +0000

    [Qt][DRT] Replace queueScript by queueNonLoadingScript and queueLoadingScript method
    https://bugs.webkit.org/show_bug.cgi?id=31158
    
    Patch by Antonio Gomes <tonikitoo at webkit.org> on 2009-11-07
    Reviewed by Holger Freyther.
    
    By invoking a script queue'd by queueScript(), 'true' was beeing returned
    always, which from WorkQueue prospective means that a load has been started
    and the queue processing should stop and wait for the load to finish.
    Spinning it off into a loading and a non-loading variants was the solution
    adopted by Mac's DRT to work around this problem. The former keeps returning
    'true' while the later executes the script synchronously and returns 'false'
    making it possible to the WorkQueue to proceed right away.
    
    * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
    (LayoutTestController::processWork):
    (LayoutTestController::queueLoadingScript):
    (LayoutTestController::queueNonLoadingScript):
    * DumpRenderTree/qt/LayoutTestControllerQt.h:
    * DumpRenderTree/qt/WorkQueueItem.h:
    (LoadingScriptItem::LoadingScriptItem):
    (LoadingScriptItem::invoke):
    (NonLoadingScriptItem::NonLoadingScriptItem):
    (NonLoadingScriptItem::invoke):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50621 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 5a65703..800dbaa 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,29 @@
+2009-11-07  Antonio Gomes  <tonikitoo at webkit.org>
+
+        Reviewed by Holger Freyther.
+
+        [Qt][DRT] Replace queueScript by queueNonLoadingScript and queueLoadingScript method
+        https://bugs.webkit.org/show_bug.cgi?id=31158
+
+        By invoking a script queue'd by queueScript(), 'true' was beeing returned
+        always, which from WorkQueue prospective means that a load has been started
+        and the queue processing should stop and wait for the load to finish.
+        Spinning it off into a loading and a non-loading variants was the solution
+        adopted by Mac's DRT to work around this problem. The former keeps returning
+        'true' while the later executes the script synchronously and returns 'false'
+        making it possible to the WorkQueue to proceed right away.
+
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        (LayoutTestController::processWork):
+        (LayoutTestController::queueLoadingScript):
+        (LayoutTestController::queueNonLoadingScript):
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+        * DumpRenderTree/qt/WorkQueueItem.h:
+        (LoadingScriptItem::LoadingScriptItem):
+        (LoadingScriptItem::invoke):
+        (NonLoadingScriptItem::NonLoadingScriptItem):
+        (NonLoadingScriptItem::invoke):
+
 2009-11-07  Mark Rowe  <mrowe at apple.com>
 
         Rubber-stamped by Cameron Zwarich.
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 575bc66..00a6081 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -186,10 +186,16 @@ void LayoutTestController::queueReload()
     WorkQueue::shared()->queue(new ReloadItem(m_drt->webPage()));
 }
 
-void LayoutTestController::queueScript(const QString &url)
+void LayoutTestController::queueLoadingScript(const QString& script)
 {
-    //qDebug() << ">>>queueScript" << url;
-    WorkQueue::shared()->queue(new ScriptItem(url, m_drt->webPage()));
+    //qDebug() << ">>>queueLoadingScript" << script;
+    WorkQueue::shared()->queue(new LoadingScriptItem(script, m_drt->webPage()));
+}
+
+void LayoutTestController::queueNonLoadingScript(const QString& script)
+{
+    //qDebug() << ">>>queueNonLoadingScript" << script;
+    WorkQueue::shared()->queue(new NonLoadingScriptItem(script, m_drt->webPage()));
 }
 
 void LayoutTestController::provisionalLoad()
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index c852089..dd504a6 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -93,7 +93,8 @@ public slots:
     void queueForwardNavigation(int howFarForward);
     void queueLoad(const QString& url, const QString& target = QString());
     void queueReload();
-    void queueScript(const QString& url);
+    void queueLoadingScript(const QString& script);
+    void queueNonLoadingScript(const QString& script);
     void provisionalLoad();
     void setCloseRemainingWindowsWhenComplete(bool = false) {}
     int windowCount();
diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueueItem.h b/WebKitTools/DumpRenderTree/qt/WorkQueueItem.h
index 9819ec0..d534493 100644
--- a/WebKitTools/DumpRenderTree/qt/WorkQueueItem.h
+++ b/WebKitTools/DumpRenderTree/qt/WorkQueueItem.h
@@ -89,6 +89,27 @@ private:
     QString m_script;
 };
 
+class LoadingScriptItem : public ScriptItem {
+public:
+    LoadingScriptItem(const QString& script, QWebPage* page)
+        : ScriptItem(script, page)
+    {
+    }
+
+    virtual bool invoke() const { return ScriptItem::invoke(); }
+};
+
+class NonLoadingScriptItem : public ScriptItem {
+public:
+    NonLoadingScriptItem(const QString& script, QWebPage* page)
+        : ScriptItem(script, page)
+    {
+    }
+
+    virtual bool invoke() const { ScriptItem::invoke(); return false; }
+};
+
+
 class BackForwardItem : public WorkQueueItem {
 public:
     virtual bool invoke() const;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list