Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (102974 => 102975)
--- trunk/Source/_javascript_Core/ChangeLog 2011-12-15 20:32:45 UTC (rev 102974)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-12-15 20:44:57 UTC (rev 102975)
@@ -1,5 +1,16 @@
2011-12-15 Anders Carlsson <[email protected]>
+ Add ScrollingCoordinator class and ENABLE_THREADED_SCROLLING define
+ https://bugs.webkit.org/show_bug.cgi?id=74639
+
+ Reviewed by Andreas Kling.
+
+ Add ENABLE_THREADED_SCROLLING #define.
+
+ * wtf/Platform.h:
+
+2011-12-15 Anders Carlsson <[email protected]>
+
EventDispatcher should handle wheel events on the connection queue
https://bugs.webkit.org/show_bug.cgi?id=74627
Modified: trunk/Source/_javascript_Core/wtf/Platform.h (102974 => 102975)
--- trunk/Source/_javascript_Core/wtf/Platform.h 2011-12-15 20:32:45 UTC (rev 102974)
+++ trunk/Source/_javascript_Core/wtf/Platform.h 2011-12-15 20:44:57 UTC (rev 102975)
@@ -1062,6 +1062,10 @@
#define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
#endif
+#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#define ENABLE_THREADED_SCROLLING 1
+#endif
+
/* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
#define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK
Modified: trunk/Source/WebCore/ChangeLog (102974 => 102975)
--- trunk/Source/WebCore/ChangeLog 2011-12-15 20:32:45 UTC (rev 102974)
+++ trunk/Source/WebCore/ChangeLog 2011-12-15 20:44:57 UTC (rev 102975)
@@ -1,3 +1,26 @@
+2011-12-15 Anders Carlsson <[email protected]>
+
+ Add ScrollingCoordinator class and ENABLE_THREADED_SCROLLING define
+ https://bugs.webkit.org/show_bug.cgi?id=74639
+
+ Reviewed by Andreas Kling.
+
+ Add a ScrollingCoordinator class and make it a member of Page. Tear it down
+ when the page goes away.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ (WebCore::Page::~Page):
+ * page/Page.h:
+ (WebCore::Page::scrollingCoordinator):
+ * page/ScrollingCoordinator.cpp: Added.
+ (WebCore::ScrollingCoordinator::create):
+ (WebCore::ScrollingCoordinator::ScrollingCoordinator):
+ (WebCore::ScrollingCoordinator::~ScrollingCoordinator):
+ (WebCore::ScrollingCoordinator::pageDestroyed):
+ * page/ScrollingCoordinator.h: Added.
+
2011-12-15 Kenneth Russell <[email protected]>
Rename WEBKIT_lose_context to WEBKIT_WEBGL_lose_context
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (102974 => 102975)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-12-15 20:32:45 UTC (rev 102974)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-12-15 20:44:57 UTC (rev 102975)
@@ -372,6 +372,8 @@
1A2E6E590CC55213004A2062 /* SQLValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2E6E570CC55213004A2062 /* SQLValue.cpp */; };
1A2E6E5A0CC55213004A2062 /* SQLValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2E6E580CC55213004A2062 /* SQLValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
1A2E6E7A0CC556D5004A2062 /* SQLiteAuthorizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */; };
+ 1A2F9D7914968C740065AC63 /* ScrollingCoordinator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2F9D7714968C740065AC63 /* ScrollingCoordinator.cpp */; };
+ 1A2F9D7A14968C740065AC63 /* ScrollingCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2F9D7814968C740065AC63 /* ScrollingCoordinator.h */; };
1A3417C90CECFF250049CBDE /* JSCustomVoidCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3417C70CECFF250049CBDE /* JSCustomVoidCallback.h */; };
1A3417CA0CECFF250049CBDE /* JSCustomVoidCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3417C80CECFF250049CBDE /* JSCustomVoidCallback.cpp */; };
1A494BFA0A122F4400FDAFC1 /* JSHTMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A494BF80A122F4400FDAFC1 /* JSHTMLElement.cpp */; };
@@ -7482,6 +7484,8 @@
1A2E6E570CC55213004A2062 /* SQLValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLValue.cpp; path = sql/SQLValue.cpp; sourceTree = "<group>"; };
1A2E6E580CC55213004A2062 /* SQLValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLValue.h; path = sql/SQLValue.h; sourceTree = "<group>"; };
1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLiteAuthorizer.cpp; path = sql/SQLiteAuthorizer.cpp; sourceTree = "<group>"; };
+ 1A2F9D7714968C740065AC63 /* ScrollingCoordinator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingCoordinator.cpp; sourceTree = "<group>"; };
+ 1A2F9D7814968C740065AC63 /* ScrollingCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingCoordinator.h; sourceTree = "<group>"; };
1A3417C70CECFF250049CBDE /* JSCustomVoidCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomVoidCallback.h; sourceTree = "<group>"; };
1A3417C80CECFF250049CBDE /* JSCustomVoidCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomVoidCallback.cpp; sourceTree = "<group>"; };
1A494BBB0A122DCD00FDAFC1 /* HTMLElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLElement.idl; sourceTree = "<group>"; };
@@ -15724,6 +15728,8 @@
BCEC01BA0C274DAC009F4EC9 /* Screen.cpp */,
BCEC01BB0C274DAC009F4EC9 /* Screen.h */,
BCEC01BC0C274DAC009F4EC9 /* Screen.idl */,
+ 1A2F9D7714968C740065AC63 /* ScrollingCoordinator.cpp */,
+ 1A2F9D7814968C740065AC63 /* ScrollingCoordinator.h */,
BCD0E0F70E972C3500265DEA /* SecurityOrigin.cpp */,
BCD0E0F80E972C3500265DEA /* SecurityOrigin.h */,
BCD0E0F90E972C3500265DEA /* SecurityOriginHash.h */,
@@ -24864,6 +24870,7 @@
49ECEB6C1499790D00CDD3A4 /* FELightingNEON.h in Headers */,
49ECEB6E1499790D00CDD3A4 /* FilterOperation.h in Headers */,
49ECEB701499790D00CDD3A4 /* FilterOperations.h in Headers */,
+ 1A2F9D7A14968C740065AC63 /* ScrollingCoordinator.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -27756,6 +27763,7 @@
49ECEB6B1499790D00CDD3A4 /* FELightingNEON.cpp in Sources */,
49ECEB6D1499790D00CDD3A4 /* FilterOperation.cpp in Sources */,
49ECEB6F1499790D00CDD3A4 /* FilterOperations.cpp in Sources */,
+ 1A2F9D7914968C740065AC63 /* ScrollingCoordinator.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: trunk/Source/WebCore/page/Page.cpp (102974 => 102975)
--- trunk/Source/WebCore/page/Page.cpp 2011-12-15 20:32:45 UTC (rev 102974)
+++ trunk/Source/WebCore/page/Page.cpp 2011-12-15 20:44:57 UTC (rev 102975)
@@ -86,6 +86,10 @@
#include "UserMediaClient.h"
#endif
+#if ENABLE(THREADED_SCROLLING)
+#include "ScrollingCoordinator.h"
+#endif
+
namespace WebCore {
static HashSet<Page*>* allPages;
@@ -148,6 +152,9 @@
#if ENABLE(MEDIA_STREAM)
, m_userMediaClient(pageClients.userMediaClient)
#endif
+#if ENABLE(THREADED_SCROLLING)
+ , m_scrollingCoordinator(ScrollingCoordinator::create(this))
+#endif
, m_settings(adoptPtr(new Settings(this)))
, m_progress(adoptPtr(new ProgressTracker))
, m_backForwardController(adoptPtr(new BackForwardController(this, pageClients.backForwardClient)))
@@ -219,6 +226,10 @@
m_userMediaClient->pageDestroyed();
#endif
+#if ENABLE(THREADED_SCROLLING)
+ m_scrollingCoordinator->pageDestroyed();
+#endif
+
backForward()->close();
#ifndef NDEBUG
Modified: trunk/Source/WebCore/page/Page.h (102974 => 102975)
--- trunk/Source/WebCore/page/Page.h 2011-12-15 20:32:45 UTC (rev 102974)
+++ trunk/Source/WebCore/page/Page.h 2011-12-15 20:44:57 UTC (rev 102975)
@@ -81,6 +81,7 @@
class RenderTheme;
class VisibleSelection;
class ScrollableArea;
+ class ScrollingCoordinator;
class Settings;
class SpeechInput;
class SpeechInputClient;
@@ -195,6 +196,9 @@
#if ENABLE(MEDIA_STREAM)
UserMediaClient* userMediaClient() const { return m_userMediaClient; }
#endif
+#if ENABLE(THREADED_SCROLLING)
+ ScrollingCoordinator* scrollingCoordinator() const { return m_scrollingCoordinator.get(); }
+#endif
Settings* settings() const { return m_settings.get(); }
ProgressTracker* progress() const { return m_progress.get(); }
BackForwardController* backForward() const { return m_backForwardController.get(); }
@@ -388,6 +392,9 @@
#if ENABLE(MEDIA_STREAM)
UserMediaClient* m_userMediaClient;
#endif
+#if ENABLE(THREADED_SCROLLING)
+ RefPtr<ScrollingCoordinator> m_scrollingCoordinator;
+#endif
OwnPtr<Settings> m_settings;
OwnPtr<ProgressTracker> m_progress;
Added: trunk/Source/WebCore/page/ScrollingCoordinator.cpp (0 => 102975)
--- trunk/Source/WebCore/page/ScrollingCoordinator.cpp (rev 0)
+++ trunk/Source/WebCore/page/ScrollingCoordinator.cpp 2011-12-15 20:44:57 UTC (rev 102975)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+#include "config.h"
+#include "ScrollingCoordinator.h"
+
+#include <wtf/PassRefPtr.h>
+
+#if ENABLE(THREADED_SCROLLING)
+
+namespace WebCore {
+
+PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
+{
+ return adoptRef(new ScrollingCoordinator(page));
+}
+
+ScrollingCoordinator::ScrollingCoordinator(Page* page)
+ : m_page(page)
+{
+}
+
+ScrollingCoordinator::~ScrollingCoordinator()
+{
+ ASSERT(!m_page);
+}
+
+void ScrollingCoordinator::pageDestroyed()
+{
+ ASSERT(m_page);
+ m_page = 0;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(THREADED_SCROLLING)
Added: trunk/Source/WebCore/page/ScrollingCoordinator.h (0 => 102975)
--- trunk/Source/WebCore/page/ScrollingCoordinator.h (rev 0)
+++ trunk/Source/WebCore/page/ScrollingCoordinator.h 2011-12-15 20:44:57 UTC (rev 102975)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 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 ScrollingCoordinator_h
+#define ScrollingCoordinator_h
+
+#if ENABLE(THREADED_SCROLLING)
+
+#include <wtf/Forward.h>
+#include <wtf/ThreadSafeRefCounted.h>
+#include <wtf/Threading.h>
+
+namespace WebCore {
+
+class Page;
+class PlatformWheelEvent;
+
+class ScrollingCoordinator : public ThreadSafeRefCounted<ScrollingCoordinator> {
+public:
+ static PassRefPtr<ScrollingCoordinator> create(Page*);
+ ~ScrollingCoordinator();
+
+ void pageDestroyed();
+
+private:
+ explicit ScrollingCoordinator(Page*);
+
+private:
+ Page* m_page;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(THREADED_SCROLLING)
+
+#endif // ScrollingCoordinator_h