<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[102975] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/102975">102975</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2011-12-15 12:44:57 -0800 (Thu, 15 Dec 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add ScrollingCoordinator class and ENABLE_THREADED_SCROLLING define
https://bugs.webkit.org/show_bug.cgi?id=74639

Reviewed by Andreas Kling.

Source/JavaScriptCore:

Add ENABLE_THREADED_SCROLLING #define.

* wtf/Platform.h:

Source/WebCore:

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.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorewtfPlatformh">trunk/Source/JavaScriptCore/wtf/Platform.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorepageScrollingCoordinatorcpp">trunk/Source/WebCore/page/ScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorepageScrollingCoordinatorh">trunk/Source/WebCore/page/ScrollingCoordinator.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (102974 => 102975)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog    2011-12-15 20:32:45 UTC (rev 102974)
+++ trunk/Source/JavaScriptCore/ChangeLog       2011-12-15 20:44:57 UTC (rev 102975)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2011-12-15  Anders Carlsson  <andersca@apple.com>
</span><span class="cx"> 
</span><ins>+        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  <andersca@apple.com>
+
</ins><span class="cx">         EventDispatcher should handle wheel events on the connection queue
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=74627
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewtfPlatformh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wtf/Platform.h (102974 => 102975)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wtf/Platform.h       2011-12-15 20:32:45 UTC (rev 102974)
+++ trunk/Source/JavaScriptCore/wtf/Platform.h  2011-12-15 20:44:57 UTC (rev 102975)
</span><span class="lines">@@ -1062,6 +1062,10 @@
</span><span class="cx"> #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION)
+#define ENABLE_THREADED_SCROLLING 1
+#endif
+
</ins><span class="cx"> /* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
</span><span class="cx"> #define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (102974 => 102975)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2011-12-15  Anders Carlsson  <andersca@apple.com>
+
+        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.
+
</ins><span class="cx"> 2011-12-15  Kenneth Russell  <kbr@google.com>
</span><span class="cx"> 
</span><span class="cx">         Rename WEBKIT_lose_context to WEBKIT_WEBGL_lose_context
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (102974 => 102975)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -372,6 +372,8 @@
</span><span class="cx">          1A2E6E590CC55213004A2062 /* SQLValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2E6E570CC55213004A2062 /* SQLValue.cpp */; };
</span><span class="cx">          1A2E6E5A0CC55213004A2062 /* SQLValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2E6E580CC55213004A2062 /* SQLValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          1A2E6E7A0CC556D5004A2062 /* SQLiteAuthorizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */; };
</span><ins>+               1A2F9D7914968C740065AC63 /* ScrollingCoordinator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2F9D7714968C740065AC63 /* ScrollingCoordinator.cpp */; };
+               1A2F9D7A14968C740065AC63 /* ScrollingCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2F9D7814968C740065AC63 /* ScrollingCoordinator.h */; };
</ins><span class="cx">           1A3417C90CECFF250049CBDE /* JSCustomVoidCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3417C70CECFF250049CBDE /* JSCustomVoidCallback.h */; };
</span><span class="cx">          1A3417CA0CECFF250049CBDE /* JSCustomVoidCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3417C80CECFF250049CBDE /* JSCustomVoidCallback.cpp */; };
</span><span class="cx">          1A494BFA0A122F4400FDAFC1 /* JSHTMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A494BF80A122F4400FDAFC1 /* JSHTMLElement.cpp */; };
</span><span class="lines">@@ -7482,6 +7484,8 @@
</span><span class="cx">          1A2E6E570CC55213004A2062 /* SQLValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLValue.cpp; path = sql/SQLValue.cpp; sourceTree = "<group>"; };
</span><span class="cx">          1A2E6E580CC55213004A2062 /* SQLValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLValue.h; path = sql/SQLValue.h; sourceTree = "<group>"; };
</span><span class="cx">          1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLiteAuthorizer.cpp; path = sql/SQLiteAuthorizer.cpp; sourceTree = "<group>"; };
</span><ins>+               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>"; };
</ins><span class="cx">           1A3417C70CECFF250049CBDE /* JSCustomVoidCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomVoidCallback.h; sourceTree = "<group>"; };
</span><span class="cx">          1A3417C80CECFF250049CBDE /* JSCustomVoidCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomVoidCallback.cpp; sourceTree = "<group>"; };
</span><span class="cx">          1A494BBB0A122DCD00FDAFC1 /* HTMLElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLElement.idl; sourceTree = "<group>"; };
</span><span class="lines">@@ -15724,6 +15728,8 @@
</span><span class="cx">                          BCEC01BA0C274DAC009F4EC9 /* Screen.cpp */,
</span><span class="cx">                          BCEC01BB0C274DAC009F4EC9 /* Screen.h */,
</span><span class="cx">                          BCEC01BC0C274DAC009F4EC9 /* Screen.idl */,
</span><ins>+                               1A2F9D7714968C740065AC63 /* ScrollingCoordinator.cpp */,
+                               1A2F9D7814968C740065AC63 /* ScrollingCoordinator.h */,
</ins><span class="cx">                           BCD0E0F70E972C3500265DEA /* SecurityOrigin.cpp */,
</span><span class="cx">                          BCD0E0F80E972C3500265DEA /* SecurityOrigin.h */,
</span><span class="cx">                          BCD0E0F90E972C3500265DEA /* SecurityOriginHash.h */,
</span><span class="lines">@@ -24864,6 +24870,7 @@
</span><span class="cx">                          49ECEB6C1499790D00CDD3A4 /* FELightingNEON.h in Headers */,
</span><span class="cx">                          49ECEB6E1499790D00CDD3A4 /* FilterOperation.h in Headers */,
</span><span class="cx">                          49ECEB701499790D00CDD3A4 /* FilterOperations.h in Headers */,
</span><ins>+                               1A2F9D7A14968C740065AC63 /* ScrollingCoordinator.h in Headers */,
</ins><span class="cx">                   );
</span><span class="cx">                  runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">          };
</span><span class="lines">@@ -27756,6 +27763,7 @@
</span><span class="cx">                          49ECEB6B1499790D00CDD3A4 /* FELightingNEON.cpp in Sources */,
</span><span class="cx">                          49ECEB6D1499790D00CDD3A4 /* FilterOperation.cpp in Sources */,
</span><span class="cx">                          49ECEB6F1499790D00CDD3A4 /* FilterOperations.cpp in Sources */,
</span><ins>+                               1A2F9D7914968C740065AC63 /* ScrollingCoordinator.cpp in Sources */,
</ins><span class="cx">                   );
</span><span class="cx">                  runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">          };
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (102974 => 102975)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -86,6 +86,10 @@
</span><span class="cx"> #include "UserMediaClient.h"
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(THREADED_SCROLLING)
+#include "ScrollingCoordinator.h"
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static HashSet<Page*>* allPages;
</span><span class="lines">@@ -148,6 +152,9 @@
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">     , m_userMediaClient(pageClients.userMediaClient)
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(THREADED_SCROLLING)
+    , m_scrollingCoordinator(ScrollingCoordinator::create(this))
+#endif
</ins><span class="cx">     , m_settings(adoptPtr(new Settings(this)))
</span><span class="cx">     , m_progress(adoptPtr(new ProgressTracker))
</span><span class="cx">     , m_backForwardController(adoptPtr(new BackForwardController(this, pageClients.backForwardClient)))
</span><span class="lines">@@ -219,6 +226,10 @@
</span><span class="cx">         m_userMediaClient->pageDestroyed();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(THREADED_SCROLLING)
+    m_scrollingCoordinator->pageDestroyed();
+#endif
+
</ins><span class="cx">     backForward()->close();
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (102974 => 102975)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -81,6 +81,7 @@
</span><span class="cx">     class RenderTheme;
</span><span class="cx">     class VisibleSelection;
</span><span class="cx">     class ScrollableArea;
</span><ins>+    class ScrollingCoordinator;
</ins><span class="cx">     class Settings;
</span><span class="cx">     class SpeechInput;
</span><span class="cx">     class SpeechInputClient;
</span><span class="lines">@@ -195,6 +196,9 @@
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">         UserMediaClient* userMediaClient() const { return m_userMediaClient; }
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(THREADED_SCROLLING)
+        ScrollingCoordinator* scrollingCoordinator() const { return m_scrollingCoordinator.get(); }
+#endif
</ins><span class="cx">         Settings* settings() const { return m_settings.get(); }
</span><span class="cx">         ProgressTracker* progress() const { return m_progress.get(); }
</span><span class="cx">         BackForwardController* backForward() const { return m_backForwardController.get(); }
</span><span class="lines">@@ -388,6 +392,9 @@
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">         UserMediaClient* m_userMediaClient;
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(THREADED_SCROLLING)
+        RefPtr<ScrollingCoordinator> m_scrollingCoordinator;
+#endif
</ins><span class="cx">         OwnPtr<Settings> m_settings;
</span><span class="cx">         OwnPtr<ProgressTracker> m_progress;
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkSourceWebCorepageScrollingCoordinatorcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/ScrollingCoordinator.cpp (0 => 102975)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ScrollingCoordinator.cpp                               (rev 0)
+++ trunk/Source/WebCore/page/ScrollingCoordinator.cpp  2011-12-15 20:44:57 UTC (rev 102975)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * 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)
</ins></span></pre></div>
<a id="trunkSourceWebCorepageScrollingCoordinatorh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/ScrollingCoordinator.h (0 => 102975)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ScrollingCoordinator.h                         (rev 0)
+++ trunk/Source/WebCore/page/ScrollingCoordinator.h    2011-12-15 20:44:57 UTC (rev 102975)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * 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
</ins></span></pre>
</div>
</div>

</body>
</html>