Diff
Modified: trunk/Source/WebKit2/ChangeLog (103193 => 103194)
--- trunk/Source/WebKit2/ChangeLog 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/ChangeLog 2011-12-19 00:37:47 UTC (rev 103194)
@@ -1,3 +1,27 @@
+2011-12-18 Sam Weinig <s...@webkit.org>
+
+ Remove now unused WorkItem.h
+ https://bugs.webkit.org/show_bug.cgi?id=74818
+
+ Reviewed by Andreas Kling.
+
+ * GNUmakefile.am:
+ * Platform/CoreIPC/Connection.cpp:
+ * Platform/RunLoop.cpp:
+ * Platform/RunLoop.h:
+ * Platform/WorkItem.h: Removed.
+ * Platform/gtk/RunLoopGtk.cpp:
+ * Platform/mac/RunLoopMac.mm:
+ * Platform/mac/WorkQueueMac.cpp:
+ (WorkQueue::platformInvalidate):
+ * Platform/qt/RunLoopQt.cpp:
+ * Platform/win/RunLoopWin.cpp:
+ * Target.pri:
+ * UIProcess/ResponsivenessTimer.cpp:
+ * WebKit2.xcodeproj/project.pbxproj:
+ * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+ * win/WebKit2.vcproj:
+
2011-12-18 Anders Carlsson <ander...@apple.com>
Set the main frame view scroll position asynchronously
Modified: trunk/Source/WebKit2/GNUmakefile.am (103193 => 103194)
--- trunk/Source/WebKit2/GNUmakefile.am 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/GNUmakefile.am 2011-12-19 00:37:47 UTC (rev 103194)
@@ -221,7 +221,6 @@
Source/WebKit2/Platform/RunLoop.h \
Source/WebKit2/Platform/SharedMemory.h \
Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp \
- Source/WebKit2/Platform/WorkItem.h \
Source/WebKit2/Platform/WorkQueue.cpp \
Source/WebKit2/Platform/WorkQueue.h \
Source/WebKit2/PluginProcess/PluginControllerProxy.cpp \
@@ -1354,7 +1353,6 @@
Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp \
Source/WebKit2/Platform/Module.cpp \
Source/WebKit2/Platform/Module.h \
- Source/WebKit2/Platform/WorkItem.h \
Source/WebKit2/Platform/WorkQueue.cpp \
Source/WebKit2/Platform/WorkQueue.h \
Source/WebKit2/Platform/RunLoop.cpp \
Modified: trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp (103193 => 103194)
--- trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp 2011-12-19 00:37:47 UTC (rev 103194)
@@ -29,7 +29,6 @@
#include "BinarySemaphore.h"
#include "CoreIPCMessageKinds.h"
#include "RunLoop.h"
-#include "WorkItem.h"
#include <wtf/CurrentTime.h>
using namespace std;
Modified: trunk/Source/WebKit2/Platform/RunLoop.cpp (103193 => 103194)
--- trunk/Source/WebKit2/Platform/RunLoop.cpp 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/Platform/RunLoop.cpp 2011-12-19 00:37:47 UTC (rev 103194)
@@ -26,7 +26,6 @@
#include "config.h"
#include "RunLoop.h"
-#include "WorkItem.h"
#include <wtf/StdLibExtras.h>
static RunLoop* s_mainRunLoop;
Modified: trunk/Source/WebKit2/Platform/RunLoop.h (103193 => 103194)
--- trunk/Source/WebKit2/Platform/RunLoop.h 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/Platform/RunLoop.h 2011-12-19 00:37:47 UTC (rev 103194)
@@ -43,8 +43,6 @@
typedef int gboolean;
#endif
-class WorkItem;
-
namespace CoreIPC {
class BinarySemaphore;
}
Deleted: trunk/Source/WebKit2/Platform/WorkItem.h (103193 => 103194)
--- trunk/Source/WebKit2/Platform/WorkItem.h 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/Platform/WorkItem.h 2011-12-19 00:37:47 UTC (rev 103194)
@@ -1,213 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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 WorkItem_h
-#define WorkItem_h
-
-#include <wtf/Functional.h>
-#include <wtf/PassOwnPtr.h>
-
-class WorkItem {
-public:
- template<typename C>
- static PassOwnPtr<WorkItem> create(C*, void (C::*)());
-
- template<typename C, typename T0>
- static PassOwnPtr<WorkItem> create(C*, void (C::*)(T0), T0);
-
- template<typename C, typename T0, typename T1>
- static PassOwnPtr<WorkItem> create(C*, void (C::*)(T0, T1), T0, T1);
-
- static PassOwnPtr<WorkItem> create(void (*)());
-
- static PassOwnPtr<WorkItem> create(const Function<void()>&);
-
- virtual ~WorkItem() { }
- virtual void execute() = 0;
-
-protected:
- WorkItem() { }
-
-private:
- WorkItem(const WorkItem&);
- WorkItem& operator=(const WorkItem&);
-};
-
-template <typename C>
-class MemberFunctionWorkItem0 : private WorkItem {
- // We only allow WorkItem to create this.
- friend class WorkItem;
-
- typedef void (C::*FunctionType)();
-
- MemberFunctionWorkItem0(C* ptr, FunctionType function)
- : m_ptr(ptr)
- , m_function(function)
- {
- m_ptr->ref();
- }
-
- ~MemberFunctionWorkItem0()
- {
- m_ptr->deref();
- }
-
- virtual void execute()
- {
- (m_ptr->*m_function)();
- }
-
- C* m_ptr;
- FunctionType m_function;
-};
-
-template<typename C, typename T0>
-class MemberFunctionWorkItem1 : private WorkItem {
- // We only allow WorkItem to create this.
- friend class WorkItem;
-
- typedef void (C::*FunctionType)(T0);
-
- MemberFunctionWorkItem1(C* ptr, FunctionType function, T0 t0)
- : m_ptr(ptr)
- , m_function(function)
- , m_t0(t0)
- {
- m_ptr->ref();
- }
-
- ~MemberFunctionWorkItem1()
- {
- m_ptr->deref();
- }
-
- virtual void execute()
- {
- (m_ptr->*m_function)(m_t0);
- }
-
- C* m_ptr;
- FunctionType m_function;
- T0 m_t0;
-};
-
-template<typename C, typename T0, typename T1>
-class MemberFunctionWorkItem2 : private WorkItem {
- // We only allow WorkItem to create this.
- friend class WorkItem;
-
- typedef void (C::*FunctionType)(T0, T1);
-
- MemberFunctionWorkItem2(C* ptr, FunctionType function, T0 t0, T1 t1)
- : m_ptr(ptr)
- , m_function(function)
- , m_t0(t0)
- , m_t1(t1)
- {
- m_ptr->ref();
- }
-
- ~MemberFunctionWorkItem2()
- {
- m_ptr->deref();
- }
-
- virtual void execute()
- {
- (m_ptr->*m_function)(m_t0, m_t1);
- }
-
- C* m_ptr;
- FunctionType m_function;
- T0 m_t0;
- T1 m_t1;
-};
-
-template<typename C>
-PassOwnPtr<WorkItem> WorkItem::create(C* ptr, void (C::*function)())
-{
- return adoptPtr(static_cast<WorkItem*>(new MemberFunctionWorkItem0<C>(ptr, function)));
-}
-
-template<typename C, typename T0>
-PassOwnPtr<WorkItem> WorkItem::create(C* ptr, void (C::*function)(T0), T0 t0)
-{
- return adoptPtr(static_cast<WorkItem*>(new MemberFunctionWorkItem1<C, T0>(ptr, function, t0)));
-}
-
-template<typename C, typename T0, typename T1>
-PassOwnPtr<WorkItem> WorkItem::create(C* ptr, void (C::*function)(T0, T1), T0 t0, T1 t1)
-{
- return adoptPtr(static_cast<WorkItem*>(new MemberFunctionWorkItem2<C, T0, T1>(ptr, function, t0, t1)));
-}
-
-class FunctionWorkItem0 : private WorkItem {
- // We only allow WorkItem to create this.
- friend class WorkItem;
-
- typedef void (*FunctionType)();
-
- FunctionWorkItem0(FunctionType function)
- : m_function(function)
- {
- }
-
- virtual void execute()
- {
- (*m_function)();
- }
-
- FunctionType m_function;
-};
-
-inline PassOwnPtr<WorkItem> WorkItem::create(void (*function)())
-{
- return adoptPtr(static_cast<WorkItem*>(new FunctionWorkItem0(function)));
-}
-
-// FunctionWorkItem is a temporary class. WorkItem should just be replaced by WTF::Function everywhere.
-class FunctionWorkItem : private WorkItem {
- // We only allow WorkItem to create this.
- friend class WorkItem;
-
- explicit FunctionWorkItem(const Function<void()>& function)
- : m_function(function)
- {
- }
-
- virtual void execute()
- {
- m_function();
- }
-
- Function<void()> m_function;
-};
-
-inline PassOwnPtr<WorkItem> WorkItem::create(const Function<void()>& function)
-{
- return adoptPtr(static_cast<WorkItem*>(new FunctionWorkItem(function)));
-}
-
-#endif // WorkItem_h
Modified: trunk/Source/WebKit2/Platform/gtk/RunLoopGtk.cpp (103193 => 103194)
--- trunk/Source/WebKit2/Platform/gtk/RunLoopGtk.cpp 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/Platform/gtk/RunLoopGtk.cpp 2011-12-19 00:37:47 UTC (rev 103194)
@@ -28,7 +28,6 @@
#include "RunLoop.h"
#include "WKBase.h"
-#include "WorkItem.h"
#include <glib.h>
RunLoop::RunLoop()
Modified: trunk/Source/WebKit2/Platform/mac/RunLoopMac.mm (103193 => 103194)
--- trunk/Source/WebKit2/Platform/mac/RunLoopMac.mm 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/Platform/mac/RunLoopMac.mm 2011-12-19 00:37:47 UTC (rev 103194)
@@ -26,8 +26,6 @@
#import "config.h"
#import "RunLoop.h"
-#import "WorkItem.h"
-
void RunLoop::performWork(void* context)
{
// Wrap main thread in an Autorelease pool. Sending messages can call
Modified: trunk/Source/WebKit2/Platform/mac/WorkQueueMac.cpp (103193 => 103194)
--- trunk/Source/WebKit2/Platform/mac/WorkQueueMac.cpp 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/Platform/mac/WorkQueueMac.cpp 2011-12-19 00:37:47 UTC (rev 103194)
@@ -30,8 +30,6 @@
#include <mach/mach_port.h>
#include <wtf/PassOwnPtr.h>
-#if HAVE(DISPATCH_H)
-
void WorkQueue::executeFunction(void* context)
{
WorkQueue* queue = static_cast<WorkQueue*>(dispatch_get_context(dispatch_get_current_queue()));
@@ -178,27 +176,3 @@
dispatch_release(m_dispatchQueue);
}
-
-#else /* !HAVE(DISPATCH_H) */
-
-void WorkQueue::scheduleWork(PassOwnPtr<WorkItem> item)
-{
-}
-
-void WorkQueue::registerMachPortEventHandler(mach_port_t, MachPortEventType, PassOwnPtr<WorkItem>)
-{
-}
-
-void WorkQueue::unregisterMachPortEventHandler(mach_port_t)
-{
-}
-
-void WorkQueue::platformInitialize(const char*)
-{
-}
-
-void WorkQueue::platformInvalidate()
-{
-}
-
-#endif
Modified: trunk/Source/WebKit2/Platform/qt/RunLoopQt.cpp (103193 => 103194)
--- trunk/Source/WebKit2/Platform/qt/RunLoopQt.cpp 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/Platform/qt/RunLoopQt.cpp 2011-12-19 00:37:47 UTC (rev 103194)
@@ -27,8 +27,6 @@
#include "config.h"
#include "RunLoop.h"
-#include "WorkItem.h"
-
#include <QCoreApplication>
#include <QAbstractEventDispatcher>
#include <QObject>
Modified: trunk/Source/WebKit2/Platform/win/RunLoopWin.cpp (103193 => 103194)
--- trunk/Source/WebKit2/Platform/win/RunLoopWin.cpp 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/Platform/win/RunLoopWin.cpp 2011-12-19 00:37:47 UTC (rev 103194)
@@ -27,7 +27,6 @@
#include "RunLoop.h"
#include "BinarySemaphore.h"
-#include "WorkItem.h"
#include <wtf/CurrentTime.h>
using namespace CoreIPC;
Modified: trunk/Source/WebKit2/Target.pri (103193 => 103194)
--- trunk/Source/WebKit2/Target.pri 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/Target.pri 2011-12-19 00:37:47 UTC (rev 103194)
@@ -37,7 +37,6 @@
Platform/PlatformProcessIdentifier.h \
Platform/RunLoop.h \
Platform/SharedMemory.h \
- Platform/WorkItem.h \
Platform/WorkQueue.h \
PluginProcess/PluginControllerProxy.h \
PluginProcess/PluginProcess.h \
Modified: trunk/Source/WebKit2/UIProcess/ResponsivenessTimer.cpp (103193 => 103194)
--- trunk/Source/WebKit2/UIProcess/ResponsivenessTimer.cpp 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/UIProcess/ResponsivenessTimer.cpp 2011-12-19 00:37:47 UTC (rev 103194)
@@ -26,8 +26,6 @@
#include "config.h"
#include "ResponsivenessTimer.h"
-#include "WorkItem.h"
-
namespace WebKit {
static const double kResponsivenessTimeout = 3;
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (103193 => 103194)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2011-12-19 00:37:47 UTC (rev 103194)
@@ -562,7 +562,6 @@
BC2DFBA312A761A500E732A3 /* WebPreferencesCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2DFBA212A761A500E732A3 /* WebPreferencesCF.cpp */; };
BC2E6E871141971500A63B1E /* RunLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2E6E771141970C00A63B1E /* RunLoop.cpp */; };
BC2E6E881141971500A63B1E /* RunLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2E6E781141970C00A63B1E /* RunLoop.h */; };
- BC2E6E8C1141971500A63B1E /* WorkItem.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2E6E7C1141970C00A63B1E /* WorkItem.h */; };
BC2E6E8D1141971500A63B1E /* WorkQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2E6E7D1141970C00A63B1E /* WorkQueue.cpp */; };
BC2E6E8E1141971500A63B1E /* WorkQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2E6E7E1141970C00A63B1E /* WorkQueue.h */; };
BC3065C412592F8900E71278 /* WebProcessMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC3065C312592F8900E71278 /* WebProcessMac.mm */; };
@@ -1588,7 +1587,6 @@
BC2DFBA212A761A500E732A3 /* WebPreferencesCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebPreferencesCF.cpp; path = cf/WebPreferencesCF.cpp; sourceTree = "<group>"; };
BC2E6E771141970C00A63B1E /* RunLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunLoop.cpp; sourceTree = "<group>"; };
BC2E6E781141970C00A63B1E /* RunLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunLoop.h; sourceTree = "<group>"; };
- BC2E6E7C1141970C00A63B1E /* WorkItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkItem.h; sourceTree = "<group>"; };
BC2E6E7D1141970C00A63B1E /* WorkQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueue.cpp; sourceTree = "<group>"; };
BC2E6E7E1141970C00A63B1E /* WorkQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkQueue.h; sourceTree = "<group>"; };
BC3065C312592F8900E71278 /* WebProcessMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessMac.mm; sourceTree = "<group>"; };
@@ -2292,7 +2290,6 @@
1AADDF4B10D82AF000D3D63D /* Shared */ = {
isa = PBXGroup;
children = (
- B63403F814910D57001070B5 /* APIObject.cpp */,
BCDDB314124EBCEF0048D13C /* API */,
1AAF0C4712B16328008E49E2 /* cf */,
C01A25FF12662F2100C9ED55 /* cg */,
@@ -2302,6 +2299,7 @@
1A3DD205125E5A2F004515E6 /* APIClient.h */,
5D51845313BCF9CC00C7FF4A /* APIClientTraits.cpp */,
5D51845413BCF9CC00C7FF4A /* APIClientTraits.h */,
+ B63403F814910D57001070B5 /* APIObject.cpp */,
BCF04C8C11FF9B7D00F86A58 /* APIObject.h */,
BC3065F91259344E00E71278 /* CacheModel.h */,
1A2D956E12848564001EB962 /* ChildProcess.cpp */,
@@ -3290,7 +3288,6 @@
BC2E6E771141970C00A63B1E /* RunLoop.cpp */,
BC2E6E781141970C00A63B1E /* RunLoop.h */,
1A24BED3120894D100FBB059 /* SharedMemory.h */,
- BC2E6E7C1141970C00A63B1E /* WorkItem.h */,
BC2E6E7D1141970C00A63B1E /* WorkQueue.cpp */,
BC2E6E7E1141970C00A63B1E /* WorkQueue.h */,
);
@@ -3861,7 +3858,6 @@
BC8A501511765F5600757573 /* WKRetainPtr.h in Headers */,
F67DD7BA125E40D9007BDCB8 /* WKSerializedScriptValuePrivate.h in Headers */,
BC8699B7116AADAA002A925B /* WKViewInternal.h in Headers */,
- BC2E6E8C1141971500A63B1E /* WorkItem.h in Headers */,
BC2E6E8E1141971500A63B1E /* WorkQueue.h in Headers */,
1A2161B011F37664008AD0F5 /* NPRuntimeObjectMap.h in Headers */,
1A2162B111F38971008AD0F5 /* NPRuntimeUtilities.h in Headers */,
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (103193 => 103194)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2011-12-19 00:37:47 UTC (rev 103194)
@@ -31,7 +31,6 @@
#include "NetscapePluginStream.h"
#include "PluginController.h"
#include "ShareableBitmap.h"
-#include "WorkItem.h"
#include <WebCore/GraphicsContext.h>
#include <WebCore/HTTPHeaderMap.h>
#include <WebCore/IntRect.h>
Modified: trunk/Source/WebKit2/win/WebKit2.vcproj (103193 => 103194)
--- trunk/Source/WebKit2/win/WebKit2.vcproj 2011-12-19 00:29:02 UTC (rev 103193)
+++ trunk/Source/WebKit2/win/WebKit2.vcproj 2011-12-19 00:37:47 UTC (rev 103194)
@@ -3899,10 +3899,6 @@
>
</File>
<File
- RelativePath="..\Platform\WorkItem.h"
- >
- </File>
- <File
RelativePath="..\Platform\WorkQueue.cpp"
>
</File>