[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:16:22 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 6aae9c1892dc63a3a6169e5ba815d7f4f0db4d0c
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 30 14:02:18 2009 +0000

    [Qt] Remove qt/WorkQueue.cpp|h in favor of platform independent WorkQueue
    https://bugs.webkit.org/show_bug.cgi?id=30953
    
    Patch by Antonio Gomes <tonikitoo at webkit.org> on 2009-10-30
    Reviewed by Holger Freyther.
    
    DumpRenderTree/WorkQueue and DumpRenderTree/qt/WorkQueue share mostly the
    same implementation. Some Q_ASSERTs differ from ASSERTs basically. Patch
    makes qt DRT to share this implementation (as gtk and mac ports do).
    
    * DumpRenderTree/qt/DumpRenderTree.pro:
    * DumpRenderTree/qt/WorkQueue.cpp: Removed.
    * DumpRenderTree/qt/WorkQueue.h: Removed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50333 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 1ca0412..f17c6f2 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,18 @@
+2009-10-30  Antonio Gomes  <tonikitoo at webkit.org>
+
+        Reviewed by Holger Freyther.
+
+        [Qt] Remove qt/WorkQueue.cpp|h in favor of platform independent WorkQueue
+        https://bugs.webkit.org/show_bug.cgi?id=30953
+
+        DumpRenderTree/WorkQueue and DumpRenderTree/qt/WorkQueue share mostly the
+        same implementation. Some Q_ASSERTs differ from ASSERTs basically. Patch
+        makes qt DRT to share this implementation (as gtk and mac ports do).
+
+        * DumpRenderTree/qt/DumpRenderTree.pro:
+        * DumpRenderTree/qt/WorkQueue.cpp: Removed.
+        * DumpRenderTree/qt/WorkQueue.h: Removed.
+
 2009-10-30  Kenneth Rohde Christiansen  <kenneth at webkit.org>
 
         Unreviewed potential buildbot fix.
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
index 571313c..846d700 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -1,9 +1,12 @@
 TARGET = DumpRenderTree
 CONFIG  -= app_bundle
 
+BASEDIR = $$PWD/../
+
 include(../../../WebKit.pri)
 INCLUDEPATH += /usr/include/freetype2
 INCLUDEPATH += ../../../JavaScriptCore
+INCLUDEPATH += $$BASEDIR
 DESTDIR = ../../../bin
 
 CONFIG += link_pkgconfig
@@ -12,7 +15,7 @@ PKGCONFIG += fontconfig
 QT = core gui network
 macx: QT += xml
 
-HEADERS = WorkQueue.h \
+HEADERS = $$BASEDIR/WorkQueue.h \
     WorkQueueItem.h \
     DumpRenderTree.h \
     EventSenderQt.h \
@@ -20,7 +23,7 @@ HEADERS = WorkQueue.h \
     LayoutTestControllerQt.h \
     jsobjects.h \
     testplugin.h
-SOURCES = WorkQueue.cpp \
+SOURCES = $$BASEDIR/WorkQueue.cpp \
     DumpRenderTree.cpp \
     EventSenderQt.cpp \
     TextInputControllerQt.cpp \
diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueue.cpp b/WebKitTools/DumpRenderTree/qt/WorkQueue.cpp
deleted file mode 100644
index f8448e4..0000000
--- a/WebKitTools/DumpRenderTree/qt/WorkQueue.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
- * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WorkQueue.h"
-
-static const unsigned queueLength = 1024;
-
-static WorkQueueItem* theQueue[queueLength];
-static unsigned startOfQueue;
-static unsigned endOfQueue;
-
-WorkQueue* WorkQueue::shared()
-{
-    static WorkQueue* sharedInstance = new WorkQueue;
-    return sharedInstance;
-}
-
-WorkQueue::WorkQueue()
-    : m_frozen(false)
-{
-}
-
-void WorkQueue::queue(WorkQueueItem* item)
-{
-    Q_ASSERT(endOfQueue < queueLength);
-    Q_ASSERT(endOfQueue >= startOfQueue);
-
-    if (m_frozen) {
-        delete item;
-        return;
-    }
-
-    theQueue[endOfQueue++] = item;
-}
-
-WorkQueueItem* WorkQueue::dequeue()
-{
-    Q_ASSERT(endOfQueue >= startOfQueue);
-
-    if (startOfQueue == endOfQueue)
-        return 0;
-
-    return theQueue[startOfQueue++];
-}
-
-unsigned WorkQueue::count()
-{
-    return endOfQueue - startOfQueue;
-}
-
-void WorkQueue::clear()
-{
-    for (unsigned i = startOfQueue; i < endOfQueue; ++i) {
-        delete theQueue[i];
-        theQueue[i] = 0;
-    }
-
-    startOfQueue = 0;
-    endOfQueue = 0;
-}
-
-bool WorkQueue::processWork()
-{
-    bool startedLoad = false;
-
-    while (!startedLoad && count()) {
-        WorkQueueItem* item = dequeue();
-        Q_ASSERT(item);
-        startedLoad = item->invoke();
-        delete item;
-    }
-
-    // If we're done and we didn't start a load, then we're really done, so return true.
-    return !startedLoad;
-}
diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueue.h b/WebKitTools/DumpRenderTree/qt/WorkQueue.h
deleted file mode 100644
index 902ba0d..0000000
--- a/WebKitTools/DumpRenderTree/qt/WorkQueue.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
- * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WorkQueue_h
-#define WorkQueue_h
-
-#include "WorkQueueItem.h"
-
-class WorkQueue {
-public:
-    static WorkQueue* shared();
-
-    void queue(WorkQueueItem*);
-    WorkQueueItem* dequeue();
-    void clear();
-    unsigned count();
-
-    void setFrozen(bool b) { m_frozen = b; }
-
-    bool processWork(); // Returns true if all work is done, false if we started a load.
-
-private:
-    WorkQueue();
-
-    bool m_frozen;
-};
-
-#endif // !defined(WorkQueue_h)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list