No subject


Wed Aug 1 07:28:53 PDT 2012


+        before.
+
+        WCIHI changes covered by unit tests, overall scrolling behavior =
manually tested.
+
+        * WebKit.gypi:
+        * src/WebCompositorInputHandlerImpl.cpp:
+        (WebKit::WebCompositorInputHandlerImpl::fromIdentifier):
+        (WebKit::WebCompositorInputHandlerImpl::WebCompositorInputHandle=
rImpl):
+        (WebKit::WebCompositorInputHandlerImpl::~WebCompositorInputHandl=
erImpl):
+        (WebKit::WebCompositorInputHandlerImpl::setClient):
+        (WebKit::WebCompositorInputHandlerImpl::handleInputEvent):
+        (WebKit::WebCompositorInputHandlerImpl::handleInputEventInternal=
):
+        (WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
+        (WebKit::WebCompositorInputHandlerImpl::bindToClient):
+        * src/WebCompositorInputHandlerImpl.h:
+        (WebCompositorInputHandlerImpl):
+        (WebKit::WebCompositorInputHandlerImpl::identifier):
+        * src/WebLayerTreeViewImpl.cpp:
+        (WebKit::WebLayerTreeViewImpl::createInputHandler):
+        (WebKit):
+        * src/WebLayerTreeViewImpl.h:
+        (WebLayerTreeViewImpl):
+        * src/WebToCCInputHandlerAdapter.cpp: Added.
+        (WebKit):
+        (WebKit::WebToCCInputHandlerAdapter::create):
+        (WebKit::WebToCCInputHandlerAdapter::WebToCCInputHandlerAdapter)=
:
+        (WebKit::WebToCCInputHandlerAdapter::~WebToCCInputHandlerAdapter=
):
+        (WebToCCInputHandlerAdapter::ClientAdapter):
+        (WebKit::WebToCCInputHandlerAdapter::ClientAdapter::ClientAdapte=
r):
+        (WebKit::WebToCCInputHandlerAdapter::ClientAdapter::~ClientAdapt=
er):
+        (WebKit::WebToCCInputHandlerAdapter::bindToClient):
+        (WebKit::WebToCCInputHandlerAdapter::animate):
+        * src/WebToCCInputHandlerAdapter.h: Copied from Source/WebCore/p=
latform/graphics/chromium/cc/CCLayerTreeHostClient.h.
+        (WebKit):
+        (WebToCCInputHandlerAdapter):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::WebViewImpl):
+        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+        (WebKit):
+        (WebKit::WebViewImpl::createInputHandler):
+        * src/WebViewImpl.h:
+        (WebViewImpl):
+        * tests/CCThreadedTest.cpp:
+        * tests/FakeCCLayerTreeHostClient.h:
+        * tests/WebCompositorInputHandlerImplTest.cpp:
+        (MockWebInputHandlerClient):
+        (WebKit::MockWebInputHandlerClient::MockWebInputHandlerClient):
+        (WebKit::MockWebInputHandlerClient::~MockWebInputHandlerClient):
+        (WebKit::WebCompositorInputHandlerImplTest::WebCompositorInputHa=
ndlerImplTest):
+        (WebCompositorInputHandlerImplTest):
+        (WebKit::TEST_F):
+
</ins><span class=3D"cx"> 2012-09-07  David Reveman  &lt;reveman at chromium=
.org&gt;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         [Chromium] Multiple commits without in=
validation allowed per redraw.
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumWebKitgyp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/WebKit.=
gyp (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/WebKit.gyp	2012-09-=
08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/WebKit.gyp	2012-09-08 01:22:54 UTC (rev =
127948)
</span><span class=3D"lines">@@ -485,6 +485,8 @@
</span><span class=3D"cx">                 'src/WebCache.cpp',
</span><span class=3D"cx">                 'src/WebColorName.cpp',
</span><span class=3D"cx">                 'src/WebCommon.cpp',
</span><ins>+                'src/WebCompositorInputHandlerImpl.cpp',
+                'src/WebCompositorInputHandlerImpl.h',
</ins><span class=3D"cx">                 'src/WebCrossOriginPreflightRes=
ultCache.cpp',
</span><span class=3D"cx">                 'src/WebCursorInfo.cpp',
</span><span class=3D"cx">                 'src/WebDOMEvent.cpp',
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumWebKitgypi"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/WebKit.=
gypi (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/WebKit.gypi	2012-09=
-08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/WebKit.gypi	2012-09-08 01:22:54 UTC (rev=
 127948)
</span><span class=3D"lines">@@ -191,8 +191,6 @@
</span><span class=3D"cx">             'src/WebAnimationCurveCommon.h',
</span><span class=3D"cx">             'src/WebAnimationImpl.cpp',
</span><span class=3D"cx">             'src/WebAnimationImpl.h',
</span><del>-            'src/WebCompositorInputHandlerImpl.cpp',
-            'src/WebCompositorInputHandlerImpl.h',
</del><span class=3D"cx">             'src/WebContentLayerImpl.cpp',
</span><span class=3D"cx">             'src/WebContentLayerImpl.h',
</span><span class=3D"cx">             'src/WebExternalTextureLayerImpl.c=
pp',
</span><span class=3D"lines">@@ -205,6 +203,8 @@
</span><span class=3D"cx">             'src/WebImageLayerImpl.h',
</span><span class=3D"cx">             'src/WebLayerImpl.cpp',
</span><span class=3D"cx">             'src/WebLayerImpl.h',
</span><ins>+            'src/WebToCCInputHandlerAdapter.cpp',
+            'src/WebToCCInputHandlerAdapter.h',
</ins><span class=3D"cx">             'src/WebLayerTreeViewImpl.cpp',
</span><span class=3D"cx">             'src/WebLayerTreeViewImpl.h',
</span><span class=3D"cx">             'src/WebScrollbarLayerImpl.cpp',
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumsrcWebCompositorInputHandlerImplcpp"></=
a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/src/Web=
CompositorInputHandlerImpl.cpp (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/src/WebCompositorIn=
putHandlerImpl.cpp	2012-09-08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp	20=
12-09-08 01:22:54 UTC (rev 127948)
</span><span class=3D"lines">@@ -27,26 +27,16 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> #include &quot;WebCompositorInputHandlerImpl.h=
&quot;
</span><span class=3D"cx">=20
</span><del>-#include &quot;CCProxy.h&quot;
</del><span class=3D"cx"> #include &quot;PlatformGestureCurveFactory.h&qu=
ot;
</span><span class=3D"cx"> #include &quot;PlatformGestureCurveTarget.h&qu=
ot;
</span><span class=3D"cx"> #include &quot;TraceEvent.h&quot;
</span><del>-#include &quot;WebCompositorImpl.h&quot;
</del><span class=3D"cx"> #include &quot;WebCompositorInputHandlerClient.=
h&quot;
</span><span class=3D"cx"> #include &quot;WebInputEvent.h&quot;
</span><ins>+#include &lt;public/WebInputHandlerClient.h&gt;
</ins><span class=3D"cx"> #include &lt;wtf/ThreadingPrimitives.h&gt;
</span><span class=3D"cx">=20
</span><span class=3D"cx"> using namespace WebCore;
</span><span class=3D"cx">=20
</span><del>-namespace WebCore {
-
-PassOwnPtr&lt;CCInputHandler&gt; CCInputHandler::create(CCInputHandlerCl=
ient* inputHandlerClient)
-{
-    return WebKit::WebCompositorInputHandlerImpl::create(inputHandlerCli=
ent);
-}
-
-}
-
</del><span class=3D"cx"> namespace WebKit {
</span><span class=3D"cx">=20
</span><span class=3D"cx"> // These statics may only be accessed from the=
 compositor thread.
</span><span class=3D"lines">@@ -58,15 +48,8 @@
</span><span class=3D"cx">     return WebCompositorInputHandlerImpl::from=
Identifier(identifier);
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><del>-PassOwnPtr&lt;WebCompositorInputHandlerImpl&gt; WebComposito=
rInputHandlerImpl::create(WebCore::CCInputHandlerClient* inputHandlerClie=
nt)
-{
-    return adoptPtr(new WebCompositorInputHandlerImpl(inputHandlerClient=
));
-}
-
</del><span class=3D"cx"> WebCompositorInputHandler* WebCompositorInputHa=
ndlerImpl::fromIdentifier(int identifier)
</span><span class=3D"cx"> {
</span><del>-    ASSERT(WebCompositorImpl::initialized());
-    ASSERT(CCProxy::isImplThread());
</del><span class=3D"cx">=20
</span><span class=3D"cx">     if (!s_compositors)
</span><span class=3D"cx">         return 0;
</span><span class=3D"lines">@@ -78,26 +61,20 @@
</span><span class=3D"cx">     return 0;
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><del>-WebCompositorInputHandlerImpl::WebCompositorInputHandlerImpl=
(CCInputHandlerClient* inputHandlerClient)
</del><ins>+WebCompositorInputHandlerImpl::WebCompositorInputHandlerImpl(=
)
</ins><span class=3D"cx">     : m_client(0)
</span><span class=3D"cx">     , m_identifier(s_nextAvailableIdentifier++=
)
</span><del>-    , m_inputHandlerClient(inputHandlerClient)
</del><ins>+    , m_inputHandlerClient(0)
</ins><span class=3D"cx"> #ifndef NDEBUG
</span><span class=3D"cx">     , m_expectScrollUpdateEnd(false)
</span><span class=3D"cx">     , m_expectPinchUpdateEnd(false)
</span><span class=3D"cx"> #endif
</span><span class=3D"cx">     , m_gestureScrollStarted(false)
</span><span class=3D"cx"> {
</span><del>-    ASSERT(CCProxy::isImplThread());
-
-    if (!s_compositors)
-        s_compositors =3D new HashSet&lt;WebCompositorInputHandlerImpl*&=
gt;;
-    s_compositors-&gt;add(this);
</del><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><span class=3D"cx"> WebCompositorInputHandlerImpl::~WebCompositorI=
nputHandlerImpl()
</span><span class=3D"cx"> {
</span><del>-    ASSERT(CCProxy::isImplThread());
</del><span class=3D"cx">     if (m_client)
</span><span class=3D"cx">         m_client-&gt;willShutdown();
</span><span class=3D"cx">=20
</span><span class=3D"lines">@@ -111,7 +88,6 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> void WebCompositorInputHandlerImpl::setClient(=
WebCompositorInputHandlerClient* client)
</span><span class=3D"cx"> {
</span><del>-    ASSERT(CCProxy::isImplThread());
</del><span class=3D"cx">     // It's valid to set a new client if we've =
never had one or to clear the client, but it's not valid to change from h=
aving one client to a different one.
</span><span class=3D"cx">     ASSERT(!m_client || !client);
</span><span class=3D"cx">     m_client =3D client;
</span><span class=3D"lines">@@ -119,7 +95,6 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> void WebCompositorInputHandlerImpl::handleInpu=
tEvent(const WebInputEvent&amp; event)
</span><span class=3D"cx"> {
</span><del>-    ASSERT(CCProxy::isImplThread());
</del><span class=3D"cx">     ASSERT(m_client);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     WebCompositorInputHandlerImpl::EventDispos=
ition disposition =3D handleInputEventInternal(event);
</span><span class=3D"lines">@@ -140,19 +115,19 @@
</span><span class=3D"cx"> {
</span><span class=3D"cx">     if (event.type =3D=3D WebInputEvent::Mouse=
Wheel) {
</span><span class=3D"cx">         const WebMouseWheelEvent&amp; wheelEve=
nt =3D *static_cast&lt;const WebMouseWheelEvent*&gt;(&amp;event);
</span><del>-        CCInputHandlerClient::ScrollStatus scrollStatus =3D =
m_inputHandlerClient-&gt;scrollBegin(IntPoint(wheelEvent.x, wheelEvent.y)=
, CCInputHandlerClient::Wheel);
</del><ins>+        WebInputHandlerClient::ScrollStatus scrollStatus =3D =
m_inputHandlerClient-&gt;scrollBegin(WebPoint(wheelEvent.x, wheelEvent.y)=
, WebInputHandlerClient::ScrollInputTypeWheel);
</ins><span class=3D"cx">         switch (scrollStatus) {
</span><del>-        case CCInputHandlerClient::ScrollStarted: {
</del><ins>+        case WebInputHandlerClient::ScrollStatusStarted: {
</ins><span class=3D"cx">             TRACE_EVENT_INSTANT2(&quot;cc&quot;=
, &quot;WebCompositorInputHandlerImpl::handleInput wheel scroll&quot;, &q=
uot;deltaX&quot;, -wheelEvent.deltaX, &quot;deltaY&quot;, -wheelEvent.del=
taY);
</span><del>-            m_inputHandlerClient-&gt;scrollBy(IntPoint(wheel=
Event.x, wheelEvent.y), IntSize(-wheelEvent.deltaX, -wheelEvent.deltaY));
</del><ins>+            m_inputHandlerClient-&gt;scrollBy(WebPoint(wheelE=
vent.x, wheelEvent.y), IntSize(-wheelEvent.deltaX, -wheelEvent.deltaY));
</ins><span class=3D"cx">             m_inputHandlerClient-&gt;scrollEnd(=
);
</span><span class=3D"cx">             return DidHandle;
</span><span class=3D"cx">         }
</span><del>-        case CCInputHandlerClient::ScrollIgnored:
</del><ins>+        case WebInputHandlerClient::ScrollStatusIgnored:
</ins><span class=3D"cx">             // FIXME: This should be DropEvent,=
 but in cases where we fail to properly sync scrollability it's safer to =
send the
</span><span class=3D"cx">             // event to the main thread. Chang=
e back to DropEvent once we have synchronization bugs sorted out.
</span><span class=3D"cx">             return DidNotHandle;=20
</span><del>-        case CCInputHandlerClient::ScrollOnMainThread:
</del><ins>+        case WebInputHandlerClient::ScrollStatusOnMainThread:
</ins><span class=3D"cx">             return DidNotHandle;
</span><span class=3D"cx">         }
</span><span class=3D"cx">     } else if (event.type =3D=3D WebInputEvent=
::GestureScrollBegin) {
</span><span class=3D"lines">@@ -162,14 +137,14 @@
</span><span class=3D"cx">         m_expectScrollUpdateEnd =3D true;
</span><span class=3D"cx"> #endif
</span><span class=3D"cx">         const WebGestureEvent&amp; gestureEven=
t =3D *static_cast&lt;const WebGestureEvent*&gt;(&amp;event);
</span><del>-        CCInputHandlerClient::ScrollStatus scrollStatus =3D =
m_inputHandlerClient-&gt;scrollBegin(IntPoint(gestureEvent.x, gestureEven=
t.y), CCInputHandlerClient::Gesture);
</del><ins>+        WebInputHandlerClient::ScrollStatus scrollStatus =3D =
m_inputHandlerClient-&gt;scrollBegin(WebPoint(gestureEvent.x, gestureEven=
t.y), WebInputHandlerClient::ScrollInputTypeGesture);
</ins><span class=3D"cx">         switch (scrollStatus) {
</span><del>-        case CCInputHandlerClient::ScrollStarted:
</del><ins>+        case WebInputHandlerClient::ScrollStatusStarted:
</ins><span class=3D"cx">             m_gestureScrollStarted =3D true;
</span><span class=3D"cx">             return DidHandle;
</span><del>-        case CCInputHandlerClient::ScrollOnMainThread:
</del><ins>+        case WebInputHandlerClient::ScrollStatusOnMainThread:
</ins><span class=3D"cx">             return DidNotHandle;
</span><del>-        case CCInputHandlerClient::ScrollIgnored:
</del><ins>+        case WebInputHandlerClient::ScrollStatusIgnored:
</ins><span class=3D"cx">             return DropEvent;
</span><span class=3D"cx">         }
</span><span class=3D"cx">     } else if (event.type =3D=3D WebInputEvent=
::GestureScrollUpdate) {
</span><span class=3D"lines">@@ -179,7 +154,7 @@
</span><span class=3D"cx">             return DidNotHandle;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         const WebGestureEvent&amp; gestureEven=
t =3D *static_cast&lt;const WebGestureEvent*&gt;(&amp;event);
</span><del>-        m_inputHandlerClient-&gt;scrollBy(IntPoint(gestureEv=
ent.x, gestureEvent.y),
</del><ins>+        m_inputHandlerClient-&gt;scrollBy(WebPoint(gestureEve=
nt.x, gestureEvent.y),
</ins><span class=3D"cx">             IntSize(-gestureEvent.data.scrollUp=
date.deltaX, -gestureEvent.data.scrollUpdate.deltaY));
</span><span class=3D"cx">         return DidHandle;
</span><span class=3D"cx">     } else if (event.type =3D=3D WebInputEvent=
::GestureScrollEnd) {
</span><span class=3D"lines">@@ -210,7 +185,7 @@
</span><span class=3D"cx">     } else if (event.type =3D=3D WebInputEvent=
::GesturePinchUpdate) {
</span><span class=3D"cx">         ASSERT(m_expectPinchUpdateEnd);
</span><span class=3D"cx">         const WebGestureEvent&amp; gestureEven=
t =3D *static_cast&lt;const WebGestureEvent*&gt;(&amp;event);
</span><del>-        m_inputHandlerClient-&gt;pinchGestureUpdate(gestureE=
vent.data.pinchUpdate.scale, IntPoint(gestureEvent.x, gestureEvent.y));
</del><ins>+        m_inputHandlerClient-&gt;pinchGestureUpdate(gestureEv=
ent.data.pinchUpdate.scale, WebPoint(gestureEvent.x, gestureEvent.y));
</ins><span class=3D"cx">         return DidHandle;
</span><span class=3D"cx">     } else if (event.type =3D=3D WebInputEvent=
::GestureFlingStart) {
</span><span class=3D"cx">         const WebGestureEvent&amp; gestureEven=
t =3D *static_cast&lt;const WebGestureEvent*&gt;(&amp;event);
</span><span class=3D"lines">@@ -227,9 +202,9 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> WebCompositorInputHandlerImpl::EventDispositio=
n WebCompositorInputHandlerImpl::handleGestureFling(const WebGestureEvent=
&amp; gestureEvent)
</span><span class=3D"cx"> {
</span><del>-    CCInputHandlerClient::ScrollStatus scrollStatus =3D m_in=
putHandlerClient-&gt;scrollBegin(IntPoint(gestureEvent.x, gestureEvent.y)=
, CCInputHandlerClient::Gesture);
</del><ins>+    WebInputHandlerClient::ScrollStatus scrollStatus =3D m_in=
putHandlerClient-&gt;scrollBegin(WebPoint(gestureEvent.x, gestureEvent.y)=
, WebInputHandlerClient::ScrollInputTypeGesture);
</ins><span class=3D"cx">     switch (scrollStatus) {
</span><del>-    case CCInputHandlerClient::ScrollStarted: {
</del><ins>+    case WebInputHandlerClient::ScrollStatusStarted: {
</ins><span class=3D"cx">         m_wheelFlingCurve =3D PlatformGestureCu=
rveFactory::get()-&gt;createCurve(gestureEvent.data.flingStart.sourceDevi=
ce, FloatPoint(gestureEvent.data.flingStart.velocityX, gestureEvent.data.=
flingStart.velocityY));
</span><span class=3D"cx">         TRACE_EVENT_ASYNC_BEGIN1(&quot;cc&quot=
;, &quot;WebCompositorInputHandlerImpl::handleGestureFling::started&quot;=
, this, &quot;curve&quot;, m_wheelFlingCurve-&gt;debugName());
</span><span class=3D"cx">         m_wheelFlingParameters.delta =3D WebFl=
oatPoint(gestureEvent.data.flingStart.velocityX, gestureEvent.data.flingS=
tart.velocityY);
</span><span class=3D"lines">@@ -240,11 +215,11 @@
</span><span class=3D"cx">         m_inputHandlerClient-&gt;scheduleAnima=
tion();
</span><span class=3D"cx">         return DidHandle;
</span><span class=3D"cx">     }
</span><del>-    case CCInputHandlerClient::ScrollOnMainThread: {
</del><ins>+    case WebInputHandlerClient::ScrollStatusOnMainThread: {
</ins><span class=3D"cx">         TRACE_EVENT_INSTANT0(&quot;cc&quot;, &q=
uot;WebCompositorInputHandlerImpl::handleGestureFling::scrollOnMainThread=
&quot;);
</span><span class=3D"cx">         return DidNotHandle;
</span><span class=3D"cx">     }
</span><del>-    case CCInputHandlerClient::ScrollIgnored: {
</del><ins>+    case WebInputHandlerClient::ScrollStatusIgnored: {
</ins><span class=3D"cx">         TRACE_EVENT_INSTANT0(&quot;cc&quot;, &q=
uot;WebCompositorInputHandlerImpl::handleGestureFling::ignored&quot;);
</span><span class=3D"cx">         // We still pass the curve to the main=
 thread if there's nothing scrollable, in case something
</span><span class=3D"cx">         // registers a handler before the curv=
e is over.
</span><span class=3D"lines">@@ -254,10 +229,16 @@
</span><span class=3D"cx">     return DidNotHandle;
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><del>-int WebCompositorInputHandlerImpl::identifier() const
</del><ins>+void WebCompositorInputHandlerImpl::bindToClient(WebInputHand=
lerClient* client)
</ins><span class=3D"cx"> {
</span><del>-    ASSERT(CCProxy::isImplThread());
-    return m_identifier;
</del><ins>+    ASSERT(!m_inputHandlerClient);
+
+    TRACE_EVENT_INSTANT0(&quot;cc&quot;, &quot;WebCompositorInputHandler=
Impl::bindToClient&quot;);
+    if (!s_compositors)
+        s_compositors =3D new HashSet&lt;WebCompositorInputHandlerImpl*&=
gt;;
+    s_compositors-&gt;add(this);
+
+    m_inputHandlerClient =3D client;
</ins><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><span class=3D"cx"> void WebCompositorInputHandlerImpl::animate(do=
uble monotonicTime)
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumsrcWebCompositorInputHandlerImplh"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/src/Web=
CompositorInputHandlerImpl.h (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/src/WebCompositorIn=
putHandlerImpl.h	2012-09-08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h	2012=
-09-08 01:22:54 UTC (rev 127948)
</span><span class=3D"lines">@@ -26,11 +26,11 @@
</span><span class=3D"cx"> #ifndef WebCompositorInputHandlerImpl_h
</span><span class=3D"cx"> #define WebCompositorInputHandlerImpl_h
</span><span class=3D"cx">=20
</span><del>-#include &quot;CCInputHandler.h&quot;
</del><span class=3D"cx"> #include &quot;PlatformGestureCurveTarget.h&quo=
t;
</span><span class=3D"cx"> #include &quot;WebActiveWheelFlingParameters.h=
&quot;
</span><span class=3D"cx"> #include &quot;WebCompositorInputHandler.h&quo=
t;
</span><span class=3D"cx"> #include &quot;WebInputEvent.h&quot;
</span><ins>+#include &lt;public/WebInputHandler.h&gt;
</ins><span class=3D"cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class=3D"cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class=3D"cx"> #include &lt;wtf/OwnPtr.h&gt;
</span><span class=3D"lines">@@ -40,7 +40,6 @@
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><span class=3D"cx"> namespace WebCore {
</span><del>-class CCInputHandlerClient;
</del><span class=3D"cx"> class IntPoint;
</span><span class=3D"cx"> class PlatformGestureCurve;
</span><span class=3D"cx"> }
</span><span class=3D"lines">@@ -49,27 +48,28 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> class WebCompositorInputHandlerClient;
</span><span class=3D"cx">=20
</span><del>-class WebCompositorInputHandlerImpl : public WebCompositorIn=
putHandler, public WebCore::CCInputHandler, public WebCore::PlatformGestu=
reCurveTarget {
</del><ins>+class WebCompositorInputHandlerImpl : public WebCompositorInp=
utHandler, public WebInputHandler, public WebCore::PlatformGestureCurveTa=
rget {
</ins><span class=3D"cx">     WTF_MAKE_NONCOPYABLE(WebCompositorInputHand=
lerImpl);
</span><span class=3D"cx"> public:
</span><del>-    static PassOwnPtr&lt;WebCompositorInputHandlerImpl&gt; c=
reate(WebCore::CCInputHandlerClient*);
</del><span class=3D"cx">     static WebCompositorInputHandler* fromIdent=
ifier(int identifier);
</span><span class=3D"cx">=20
</span><ins>+    WebCompositorInputHandlerImpl();
</ins><span class=3D"cx">     virtual ~WebCompositorInputHandlerImpl();
</span><span class=3D"cx">=20
</span><span class=3D"cx">     // WebCompositorInputHandler implementatio=
n.
</span><span class=3D"cx">     virtual void setClient(WebCompositorInputH=
andlerClient*);
</span><span class=3D"cx">     virtual void handleInputEvent(const WebInp=
utEvent&amp;);
</span><span class=3D"cx">=20
</span><del>-    // WebCore::CCInputHandler implementation.
-    virtual int identifier() const;
</del><ins>+    // WebInputHandler implementation.
+    virtual void bindToClient(WebInputHandlerClient*);
</ins><span class=3D"cx">     virtual void animate(double monotonicTime);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     // WebCore::PlatformGestureCurveTarget imp=
lementation.
</span><span class=3D"cx">     virtual void scrollBy(const WebCore::IntPo=
int&amp;);
</span><span class=3D"cx">=20
</span><ins>+    int identifier() const { return m_identifier; }
+
</ins><span class=3D"cx"> private:
</span><del>-    explicit WebCompositorInputHandlerImpl(WebCore::CCInputH=
andlerClient*);
</del><span class=3D"cx">=20
</span><span class=3D"cx">     enum EventDisposition { DidHandle, DidNotH=
andle, DropEvent };
</span><span class=3D"cx">     // This function processes the input event=
 and determines the disposition, but does not make
</span><span class=3D"lines">@@ -87,7 +87,7 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx">     WebCompositorInputHandlerClient* m_client;
</span><span class=3D"cx">     int m_identifier;
</span><del>-    WebCore::CCInputHandlerClient* m_inputHandlerClient;
</del><ins>+    WebInputHandlerClient* m_inputHandlerClient;
</ins><span class=3D"cx">=20
</span><span class=3D"cx"> #ifndef NDEBUG
</span><span class=3D"cx">     bool m_expectScrollUpdateEnd;
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumsrcWebLayerTreeViewImplcpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/src/Web=
LayerTreeViewImpl.cpp (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/src/WebLayerTreeVie=
wImpl.cpp	2012-09-08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp	2012-09-08 =
01:22:54 UTC (rev 127948)
</span><span class=3D"lines">@@ -27,10 +27,13 @@
</span><span class=3D"cx"> #include &quot;WebLayerTreeViewImpl.h&quot;
</span><span class=3D"cx">=20
</span><span class=3D"cx"> #include &quot;CCFontAtlas.h&quot;
</span><ins>+#include &quot;CCInputHandler.h&quot;
</ins><span class=3D"cx"> #include &quot;CCLayerTreeHost.h&quot;
</span><span class=3D"cx"> #include &quot;LayerChromium.h&quot;
</span><span class=3D"cx"> #include &quot;WebLayerImpl.h&quot;
</span><ins>+#include &quot;WebToCCInputHandlerAdapter.h&quot;
</ins><span class=3D"cx"> #include &lt;public/WebGraphicsContext3D.h&gt;
</span><ins>+#include &lt;public/WebInputHandler.h&gt;
</ins><span class=3D"cx"> #include &lt;public/WebLayer.h&gt;
</span><span class=3D"cx"> #include &lt;public/WebLayerTreeView.h&gt;
</span><span class=3D"cx"> #include &lt;public/WebLayerTreeViewClient.h&g=
t;
</span><span class=3D"lines">@@ -91,11 +94,6 @@
</span><span class=3D"cx">     m_layerTreeHost-&gt;setRootLayer(PassRefPt=
r&lt;LayerChromium&gt;());
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><del>-int WebLayerTreeViewImpl::compositorIdentifier()
-{
-    return m_layerTreeHost-&gt;compositorIdentifier();
-}
-
</del><span class=3D"cx"> void WebLayerTreeViewImpl::setViewportSize(cons=
t WebSize&amp; layoutViewportSize, const WebSize&amp; deviceViewportSize)
</span><span class=3D"cx"> {
</span><span class=3D"cx">     if (!deviceViewportSize.isEmpty())
</span><span class=3D"lines">@@ -248,6 +246,14 @@
</span><span class=3D"cx">     m_client-&gt;didRecreateOutputSurface(succ=
ess);
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><ins>+PassOwnPtr&lt;CCInputHandler&gt; WebLayerTreeViewImpl::creat=
eInputHandler()
+{
+    OwnPtr&lt;WebInputHandler&gt; handler =3D adoptPtr(m_client-&gt;crea=
teInputHandler());
+    if (handler)
+        return WebToCCInputHandlerAdapter::create(handler.release());
+    return nullptr;
+}
+
</ins><span class=3D"cx"> void WebLayerTreeViewImpl::willCommit()
</span><span class=3D"cx"> {
</span><span class=3D"cx">     m_client-&gt;willCommit();
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumsrcWebLayerTreeViewImplh"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/src/Web=
LayerTreeViewImpl.h (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/src/WebLayerTreeVie=
wImpl.h	2012-09-08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h	2012-09-08 01=
:22:54 UTC (rev 127948)
</span><span class=3D"lines">@@ -51,7 +51,6 @@
</span><span class=3D"cx">     virtual void setSurfaceReady() OVERRIDE;
</span><span class=3D"cx">     virtual void setRootLayer(const WebLayer&a=
mp;) OVERRIDE;
</span><span class=3D"cx">     virtual void clearRootLayer() OVERRIDE;
</span><del>-    virtual int compositorIdentifier() OVERRIDE;
</del><span class=3D"cx">     virtual void setViewportSize(const WebSize&=
amp; layoutViewportSize, const WebSize&amp; deviceViewportSize =3D WebSiz=
e()) OVERRIDE;
</span><span class=3D"cx">     virtual WebSize layoutViewportSize() const=
 OVERRIDE;
</span><span class=3D"cx">     virtual WebSize deviceViewportSize() const=
 OVERRIDE;
</span><span class=3D"lines">@@ -81,6 +80,7 @@
</span><span class=3D"cx">     virtual void applyScrollAndScale(const Web=
Core::IntSize&amp; scrollDelta, float pageScale) OVERRIDE;
</span><span class=3D"cx">     virtual PassOwnPtr&lt;WebCompositorOutputS=
urface&gt; createOutputSurface() OVERRIDE;
</span><span class=3D"cx">     virtual void didRecreateOutputSurface(bool=
 success) OVERRIDE;
</span><ins>+    virtual PassOwnPtr&lt;WebCore::CCInputHandler&gt; create=
InputHandler() OVERRIDE;
</ins><span class=3D"cx">     virtual void willCommit() OVERRIDE;
</span><span class=3D"cx">     virtual void didCommit() OVERRIDE;
</span><span class=3D"cx">     virtual void didCommitAndDrawFrame() OVERR=
IDE;
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumsrcWebToCCInputHandlerAdaptercpp"></a>
<div class=3D"addfile"><h4>Added: trunk/Source/WebKit/chromium/src/WebToC=
CInputHandlerAdapter.cpp (0 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/src/WebToCCInputHan=
dlerAdapter.cpp	                        (rev 0)
+++ trunk/Source/WebKit/chromium/src/WebToCCInputHandlerAdapter.cpp	2012-=
09-08 01:22:54 UTC (rev 127948)
</span><span class=3D"lines">@@ -0,0 +1,128 @@
</span><ins>+/*
+ * Copyright (C) 2012 Google 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 t=
he
+ *     documentation and/or other materials provided with the distributi=
on.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'=
' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMP=
LIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AR=
E
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABL=
E FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DA=
MAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SE=
RVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUS=
ED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TO=
RT
+ * (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 &quot;config.h&quot;
+
+#include &quot;WebToCCInputHandlerAdapter.h&quot;
+
+#include &lt;public/WebInputHandlerClient.h&gt;
+
+#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \
+    COMPILE_ASSERT(int(WebKit::webkit_name) =3D=3D int(WebCore::webcore_=
name), mismatching_enums)
+
+COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusOnMainTh=
read, CCInputHandlerClient::ScrollOnMainThread);
+COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusStarted,=
 CCInputHandlerClient::ScrollStarted);
+COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusIgnored,=
 CCInputHandlerClient::ScrollIgnored);
+COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollInputTypeGestu=
re, CCInputHandlerClient::Gesture);
+COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollInputTypeWheel=
, CCInputHandlerClient::Wheel);
+
+namespace WebKit {
+
+PassOwnPtr&lt;WebToCCInputHandlerAdapter&gt; WebToCCInputHandlerAdapter:=
:create(PassOwnPtr&lt;WebInputHandler&gt; handler)
+{
+    return adoptPtr(new WebToCCInputHandlerAdapter(handler));
+}
+
+WebToCCInputHandlerAdapter::WebToCCInputHandlerAdapter(PassOwnPtr&lt;Web=
InputHandler&gt; handler)
+    : m_handler(handler)
+{
+}
+
+WebToCCInputHandlerAdapter::~WebToCCInputHandlerAdapter()
+{
+}
+
+class WebToCCInputHandlerAdapter::ClientAdapter : public WebInputHandler=
Client {
+public:
+    ClientAdapter(WebCore::CCInputHandlerClient* client)
+        : m_client(client)
+    {
+    }
+
+    virtual ~ClientAdapter()
+    {
+    }
+
+    virtual ScrollStatus scrollBegin(WebPoint point, ScrollInputType typ=
e) OVERRIDE
+    {
+        return static_cast&lt;WebInputHandlerClient::ScrollStatus&gt;(m_=
client-&gt;scrollBegin(point, static_cast&lt;WebCore::CCInputHandlerClien=
t::ScrollInputType&gt;(type)));
+    }
+
+    virtual void scrollBy(WebPoint point, WebSize offset) OVERRIDE
+    {
+        m_client-&gt;scrollBy(point, offset);
+    }
+
+    virtual void scrollEnd() OVERRIDE
+    {
+        m_client-&gt;scrollEnd();
+    }
+
+    virtual void pinchGestureBegin() OVERRIDE
+    {
+        m_client-&gt;pinchGestureBegin();
+    }
+
+    virtual void pinchGestureUpdate(float magnifyDelta, WebPoint anchor)=
 OVERRIDE
+    {
+        m_client-&gt;pinchGestureUpdate(magnifyDelta, anchor);
+    }
+
+    virtual void pinchGestureEnd() OVERRIDE
+    {
+        m_client-&gt;pinchGestureEnd();
+    }
+
+    virtual void startPageScaleAnimation(WebSize targetPosition,
+                                         bool anchorPoint,
+                                         float pageScale,
+                                         double startTime,
+                                         double duration) OVERRIDE
+    {
+        m_client-&gt;startPageScaleAnimation(targetPosition, anchorPoint=
, pageScale, startTime, duration);
+    }
+
+    virtual void scheduleAnimation() OVERRIDE
+    {
+        m_client-&gt;scheduleAnimation();
+    }
+
+private:
+    WebCore::CCInputHandlerClient* m_client;
+};
+
+
+void WebToCCInputHandlerAdapter::bindToClient(WebCore::CCInputHandlerCli=
ent* client)
+{
+    m_clientAdapter =3D adoptPtr(new ClientAdapter(client));
+    m_handler-&gt;bindToClient(m_clientAdapter.get());
+}
+
+void WebToCCInputHandlerAdapter::animate(double monotonicTime)
+{
+    m_handler-&gt;animate(monotonicTime);
+}
+
+}
+
</ins><span class=3D"cx">Property changes on: trunk/Source/WebKit/chromiu=
m/src/WebToCCInputHandlerAdapter.cpp
</span><span class=3D"cx">_______________________________________________=
____________________
</span></span></pre></div>
<a id=3D"svneolstyle"></a>
<div class=3D"addfile"><h4>Added: svn:eol-style</h4></div>
<a id=3D"trunkSourceWebKitchromiumsrcWebToCCInputHandlerAdapterhfromrev12=
7946trunkSourceWebCoreplatformgraphicschromiumccCCLayerTreeHostClienth"><=
/a>
<div class=3D"copfile"><h4>Copied: trunk/Source/WebKit/chromium/src/WebTo=
CCInputHandlerAdapter.h (from rev 127946, trunk/Source/WebCore/platform/g=
raphics/chromium/cc/CCLayerTreeHostClient.h) (0 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/src/WebToCCInputHan=
dlerAdapter.h	                        (rev 0)
+++ trunk/Source/WebKit/chromium/src/WebToCCInputHandlerAdapter.h	2012-09=
-08 01:22:54 UTC (rev 127948)
</span><span class=3D"lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2012 Google 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 t=
he
+ *     documentation and/or other materials provided with the distributi=
on.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'=
' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMP=
LIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AR=
E
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABL=
E FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DA=
MAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SE=
RVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUS=
ED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TO=
RT
+ * (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 WebToCCInputHandlerAdapter_h
+#define WebToCCInputHandlerAdapter_h
+
+#include &quot;CCInputHandler.h&quot;
+#include &lt;public/WebInputHandler.h&gt;
+#include &lt;wtf/OwnPtr.h&gt;
+#include &lt;wtf/PassOwnPtr.h&gt;
+
+namespace WebKit {
+
+class WebToCCInputHandlerAdapter : public WebCore::CCInputHandler {
+public:
+    static PassOwnPtr&lt;WebToCCInputHandlerAdapter&gt; create(PassOwnPt=
r&lt;WebInputHandler&gt;);
+    virtual ~WebToCCInputHandlerAdapter();=20
+
+    // WebCore::CCInputHandler implementation.
+    virtual void bindToClient(WebCore::CCInputHandlerClient*) OVERRIDE;
+    virtual void animate(double monotonicTime) OVERRIDE;
+
+private:
+    explicit WebToCCInputHandlerAdapter(PassOwnPtr&lt;WebInputHandler&gt=
;);
+
+    class ClientAdapter;
+    OwnPtr&lt;ClientAdapter&gt; m_clientAdapter;
+    OwnPtr&lt;WebInputHandler&gt; m_handler;
+};
+
+}
+
+#endif // WebToCCInputHandlerAdapter_h
</ins></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumsrcWebViewImplcpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/src/Web=
ViewImpl.cpp (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp=
	2012-09-08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-09-08 01:22:54 =
UTC (rev 127948)
</span><span class=3D"lines">@@ -124,6 +124,7 @@
</span><span class=3D"cx"> #include &quot;WebAccessibilityObject.h&quot;
</span><span class=3D"cx"> #include &quot;WebActiveWheelFlingParameters.h=
&quot;
</span><span class=3D"cx"> #include &quot;WebAutofillClient.h&quot;
</span><ins>+#include &quot;WebCompositorInputHandlerImpl.h&quot;
</ins><span class=3D"cx"> #include &quot;WebDevToolsAgentImpl.h&quot;
</span><span class=3D"cx"> #include &quot;WebDevToolsAgentPrivate.h&quot;
</span><span class=3D"cx"> #include &quot;WebFrameImpl.h&quot;
</span><span class=3D"lines">@@ -415,6 +416,7 @@
</span><span class=3D"cx">     , m_recreatingGraphicsContext(false)
</span><span class=3D"cx">     , m_compositorSurfaceReady(false)
</span><span class=3D"cx">     , m_deviceScaleInCompositor(1)
</span><ins>+    , m_inputHandlerIdentifier(-1)
</ins><span class=3D"cx"> #endif
</span><span class=3D"cx"> #if ENABLE(INPUT_SPEECH)
</span><span class=3D"cx">     , m_speechInputClient(SpeechInputClientImp=
l::create(client))
</span><span class=3D"lines">@@ -3772,7 +3774,7 @@
</span><span class=3D"cx">         m_isAcceleratedCompositingActive =3D t=
rue;
</span><span class=3D"cx">         updateLayerTreeViewport();
</span><span class=3D"cx">=20
</span><del>-        m_client-&gt;didActivateCompositor(m_layerTreeView-&=
gt;compositorIdentifier());
</del><ins>+        m_client-&gt;didActivateCompositor(m_inputHandlerIden=
tifier);
</ins><span class=3D"cx">     } else {
</span><span class=3D"cx">         TRACE_EVENT0(&quot;webkit&quot;, &quot=
;WebViewImpl::setIsAcceleratedCompositingActive(true)&quot;);
</span><span class=3D"cx">=20
</span><span class=3D"lines">@@ -3806,7 +3808,7 @@
</span><span class=3D"cx">                 m_layerTreeView-&gt;setSurface=
Ready();
</span><span class=3D"cx">             m_layerTreeView-&gt;setHasTranspar=
entBackground(isTransparent());
</span><span class=3D"cx">             updateLayerTreeViewport();
</span><del>-            m_client-&gt;didActivateCompositor(m_layerTreeVi=
ew-&gt;compositorIdentifier());
</del><ins>+            m_client-&gt;didActivateCompositor(m_inputHandler=
Identifier);
</ins><span class=3D"cx">             m_isAcceleratedCompositingActive =3D=
 true;
</span><span class=3D"cx">             m_compositorCreationFailed =3D fal=
se;
</span><span class=3D"cx">             if (m_pageOverlays)
</span><span class=3D"lines">@@ -3892,6 +3894,13 @@
</span><span class=3D"cx">     return m_client-&gt;createOutputSurface();
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><ins>+WebInputHandler* WebViewImpl::createInputHandler()
+{
+    WebCompositorInputHandlerImpl* handler =3D new WebCompositorInputHan=
dlerImpl();
+    m_inputHandlerIdentifier =3D handler-&gt;identifier();
+    return handler;
+}
+
</ins><span class=3D"cx"> void WebViewImpl::applyScrollAndScale(const Web=
Size&amp; scrollDelta, float pageScaleDelta)
</span><span class=3D"cx"> {
</span><span class=3D"cx">     if (!mainFrameImpl() || !mainFrameImpl()-&=
gt;frameView())
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumsrcWebViewImplh"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/src/Web=
ViewImpl.h (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/src/WebViewImpl.h	2=
012-09-08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-09-08 01:22:54 UT=
C (rev 127948)
</span><span class=3D"lines">@@ -314,6 +314,7 @@
</span><span class=3D"cx">     virtual void didRebindGraphicsContext(bool=
 success) OVERRIDE;
</span><span class=3D"cx">     virtual WebCompositorOutputSurface* create=
OutputSurface() OVERRIDE;
</span><span class=3D"cx">     virtual void didRecreateOutputSurface(bool=
 success) OVERRIDE;
</span><ins>+    virtual WebInputHandler* createInputHandler() OVERRIDE;
</ins><span class=3D"cx">     virtual void willCommit();
</span><span class=3D"cx">     virtual void didCommit();
</span><span class=3D"cx">     virtual void didCommitAndDrawFrame();
</span><span class=3D"lines">@@ -828,6 +829,7 @@
</span><span class=3D"cx">     bool m_recreatingGraphicsContext;
</span><span class=3D"cx">     bool m_compositorSurfaceReady;
</span><span class=3D"cx">     float m_deviceScaleInCompositor;
</span><ins>+    int m_inputHandlerIdentifier;
</ins><span class=3D"cx"> #endif
</span><span class=3D"cx">     static const WebInputEvent* m_currentInput=
Event;
</span><span class=3D"cx">=20
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumtestsCCThreadedTestcpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/tests/C=
CThreadedTest.cpp (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/tests/CCThreadedTes=
t.cpp	2012-09-08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/tests/CCThreadedTest.cpp	2012-09-08 01:2=
2:54 UTC (rev 127948)
</span><span class=3D"lines">@@ -28,6 +28,7 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> #include &quot;CCActiveAnimation.h&quot;
</span><span class=3D"cx"> #include &quot;CCAnimationTestCommon.h&quot;
</span><ins>+#include &quot;CCInputHandler.h&quot;
</ins><span class=3D"cx"> #include &quot;CCLayerAnimationController.h&quo=
t;
</span><span class=3D"cx"> #include &quot;CCLayerImpl.h&quot;
</span><span class=3D"cx"> #include &quot;CCLayerTreeHostImpl.h&quot;
</span><span class=3D"lines">@@ -227,6 +228,16 @@
</span><span class=3D"cx">         return m_testHooks-&gt;createOutputSur=
face();
</span><span class=3D"cx">     }
</span><span class=3D"cx">=20
</span><ins>+    virtual void didRecreateOutputSurface(bool succeeded) OV=
ERRIDE
+    {
+        m_testHooks-&gt;didRecreateOutputSurface(succeeded);
+    }
+
+    virtual PassOwnPtr&lt;CCInputHandler&gt; createInputHandler() OVERRI=
DE
+    {
+        return nullptr;
+    }
+
</ins><span class=3D"cx">     virtual void willCommit() OVERRIDE
</span><span class=3D"cx">     {
</span><span class=3D"cx">     }
</span><span class=3D"lines">@@ -245,11 +256,6 @@
</span><span class=3D"cx">     {
</span><span class=3D"cx">     }
</span><span class=3D"cx">=20
</span><del>-    virtual void didRecreateOutputSurface(bool succeeded) OV=
ERRIDE
-    {
-        m_testHooks-&gt;didRecreateOutputSurface(succeeded);
-    }
-
</del><span class=3D"cx">     virtual void scheduleComposite() OVERRIDE
</span><span class=3D"cx">     {
</span><span class=3D"cx">         m_testHooks-&gt;scheduleComposite();
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumtestsFakeCCLayerTreeHostClienth"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/tests/F=
akeCCLayerTreeHostClient.h (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/tests/FakeCCLayerTr=
eeHostClient.h	2012-09-08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h	2012-0=
9-08 01:22:54 UTC (rev 127948)
</span><span class=3D"lines">@@ -27,6 +27,7 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> #include &quot;config.h&quot;
</span><span class=3D"cx">=20
</span><ins>+#include &quot;CCInputHandler.h&quot;
</ins><span class=3D"cx"> #include &quot;CCLayerTreeHost.h&quot;
</span><span class=3D"cx"> #include &quot;CompositorFakeWebGraphicsContex=
t3D.h&quot;
</span><span class=3D"cx"> #include &quot;FakeWebCompositorOutputSurface.=
h&quot;
</span><span class=3D"lines">@@ -47,6 +48,7 @@
</span><span class=3D"cx">         return WebKit::FakeWebCompositorOutput=
Surface::create(WebKit::CompositorFakeWebGraphicsContext3D::create(attrs)=
);
</span><span class=3D"cx">     }
</span><span class=3D"cx">     virtual void didRecreateOutputSurface(bool=
 success) OVERRIDE { }
</span><ins>+    virtual PassOwnPtr&lt;CCInputHandler&gt; createInputHand=
ler() OVERRIDE { return nullptr; }
</ins><span class=3D"cx">     virtual void willCommit() OVERRIDE { }
</span><span class=3D"cx">     virtual void didCommit() OVERRIDE { }
</span><span class=3D"cx">     virtual void didCommitAndDrawFrame() OVERR=
IDE { }
</span></span></pre></div>
<a id=3D"trunkSourceWebKitchromiumtestsWebCompositorInputHandlerImplTestc=
pp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit/chromium/tests/W=
ebCompositorInputHandlerImplTest.cpp (127947 =3D> 127948)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit/chromium/tests/WebCompositor=
InputHandlerImplTest.cpp	2012-09-08 01:20:02 UTC (rev 127947)
+++ trunk/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.=
cpp	2012-09-08 01:22:54 UTC (rev 127948)
</span><span class=3D"lines">@@ -27,8 +27,6 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> #include &quot;WebCompositorInputHandlerImpl.h=
&quot;
</span><span class=3D"cx">=20
</span><del>-#include &quot;CCInputHandler.h&quot;
-#include &quot;CCSingleThreadProxy.h&quot;
</del><span class=3D"cx"> #include &quot;WebCompositorInitializer.h&quot;
</span><span class=3D"cx"> #include &quot;WebCompositorInputHandlerClient=
.h&quot;
</span><span class=3D"cx"> #include &quot;WebInputEvent.h&quot;
</span><span class=3D"lines">@@ -36,6 +34,8 @@
</span><span class=3D"cx"> #include &lt;gtest/gtest.h&gt;
</span><span class=3D"cx"> #include &lt;public/WebCompositor.h&gt;
</span><span class=3D"cx"> #include &lt;public/WebFloatPoint.h&gt;
</span><ins>+#include &lt;public/WebInputHandler.h&gt;
+#include &lt;public/WebInputHandlerClient.h&gt;
</ins><span class=3D"cx"> #include &lt;public/WebPoint.h&gt;
</span><span class=3D"cx"> #include &lt;wtf/OwnPtr.h&gt;
</span><span class=3D"cx">=20
</span><span class=3D"lines">@@ -43,27 +43,27 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> namespace {
</span><span class=3D"cx">=20
</span><del>-class MockCCInputHandlerClient : public WebCore::CCInputHand=
lerClient {
-    WTF_MAKE_NONCOPYABLE(MockCCInputHandlerClient);
</del><ins>+class MockWebInputHandlerClient : public WebInputHandlerClien=
t {
+    WTF_MAKE_NONCOPYABLE(MockWebInputHandlerClient);
</ins><span class=3D"cx"> public:
</span><del>-    MockCCInputHandlerClient()
</del><ins>+    MockWebInputHandlerClient()
</ins><span class=3D"cx">     {
</span><span class=3D"cx">     }
</span><del>-    virtual ~MockCCInputHandlerClient() { }
</del><ins>+    virtual ~MockWebInputHandlerClient() { }
</ins><span class=3D"cx">=20
</span><span class=3D"cx">=20
</span><span class=3D"cx">     MOCK_METHOD0(pinchGestureBegin, void());
</span><del>-    MOCK_METHOD2(pinchGestureUpdate, void(float magnifyDelta=
, const WebCore::IntPoint&amp; anchor));
</del><ins>+    MOCK_METHOD2(pinchGestureUpdate, void(float magnifyDelta,=
 WebPoint anchor));
</ins><span class=3D"cx">     MOCK_METHOD0(pinchGestureEnd, void());
</span><span class=3D"cx">=20
</span><span class=3D"cx">     MOCK_METHOD0(scheduleAnimation, void());
</span><span class=3D"cx">=20
</span><del>-    MOCK_METHOD2(scrollBegin, ScrollStatus(const WebCore::In=
tPoint&amp;, WebCore::CCInputHandlerClient::ScrollInputType));
-    MOCK_METHOD2(scrollBy, void(const WebCore::IntPoint&amp;, const WebC=
ore::IntSize&amp;));
</del><ins>+    MOCK_METHOD2(scrollBegin, ScrollStatus(WebPoint, WebInput=
HandlerClient::ScrollInputType));
+    MOCK_METHOD2(scrollBy, void(WebPoint, WebSize));
</ins><span class=3D"cx">     MOCK_METHOD0(scrollEnd, void());
</span><span class=3D"cx">=20
</span><span class=3D"cx"> private:
</span><del>-    virtual void startPageScaleAnimation(const WebCore::IntS=
ize&amp; targetPosition,
</del><ins>+    virtual void startPageScaleAnimation(WebSize targetPositi=
on,
</ins><span class=3D"cx">                                          bool a=
nchorPoint,
</span><span class=3D"cx">                                          float=
 pageScale,
</span><span class=3D"cx">                                          doubl=
e startTimeMs,
</span><span class=3D"lines">@@ -87,38 +87,14 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> };
</span><span class=3D"cx">=20
</span><del>-TEST(WebCompositorInputHandlerImpl, fromIdentifier)
-{
-    WebKitTests::WebCompositorInitializer initializer(0);
-    WebCore::DebugScopedSetImplThread alwaysImplThread;
-
-    // Before creating any WebCompositorInputHandlers, lookups for any v=
alue should fail and not crash.
-    EXPECT_EQ(0, WebCompositorInputHandler::fromIdentifier(2));
-    EXPECT_EQ(0, WebCompositorInputHandler::fromIdentifier(0));
-    EXPECT_EQ(0, WebCompositorInputHandler::fromIdentifier(-1));
-
-    int compositorIdentifier =3D -1;
-    {
-        OwnPtr&lt;WebCompositorInputHandlerImpl&gt; inputHandler =3D Web=
CompositorInputHandlerImpl::create(0);
-        compositorIdentifier =3D inputHandler-&gt;identifier();
-        // The compositor we just created should be locatable.
-        EXPECT_EQ(inputHandler.get(), WebCompositorInputHandler::fromIde=
ntifier(compositorIdentifier));
-
-        // But nothing else.
-        EXPECT_EQ(0, WebCompositorInputHandler::fromIdentifier(inputHand=
ler-&gt;identifier() + 10));
-    }
-
-    // After the compositor is destroyed, its entry should be removed fr=
om the map.
-    EXPECT_EQ(0, WebCompositorInputHandler::fromIdentifier(compositorIde=
ntifier));
-}
-
</del><span class=3D"cx"> class WebCompositorInputHandlerImplTest : publi=
c testing::Test {
</span><span class=3D"cx"> public:
</span><span class=3D"cx">     WebCompositorInputHandlerImplTest()
</span><span class=3D"cx">         : m_initializer(0)
</span><span class=3D"cx">         , m_expectedDisposition(DidHandle)
</span><span class=3D"cx">     {
</span><del>-        m_inputHandler =3D WebCompositorInputHandlerImpl::cr=
eate(&amp;m_mockCCInputHandlerClient);
</del><ins>+        m_inputHandler =3D adoptPtr(new WebCompositorInputHan=
dlerImpl);
+        m_inputHandler-&gt;bindToClient(&amp;m_mockInputHandlerClient);
</ins><span class=3D"cx">         m_inputHandler-&gt;setClient(&amp;m_moc=
kClient);
</span><span class=3D"cx">     }
</span><span class=3D"cx">=20
</span><span class=3D"lines">@@ -132,7 +108,7 @@
</span><span class=3D"cx">     // out of gmock is the line number that se=
t the expectation.
</span><span class=3D"cx"> #define VERIFY_AND_RESET_MOCKS() do           =
                                                                         =
  \
</span><span class=3D"cx">     {                                         =
                                                                         =
  \
</span><del>-        testing::Mock::VerifyAndClearExpectations(&amp;m_moc=
kCCInputHandlerClient);                                          \
</del><ins>+        testing::Mock::VerifyAndClearExpectations(&amp;m_mock=
InputHandlerClient);                                          \
</ins><span class=3D"cx">         testing::Mock::VerifyAndClearExpectatio=
ns(&amp;m_mockClient);                                                   =
     \
</span><span class=3D"cx">         switch (m_expectedDisposition) {      =
                                                                         =
  \
</span><span class=3D"cx">         case DidHandle:                       =
                                                                         =
  \
</span><span class=3D"lines">@@ -156,11 +132,10 @@
</span><span class=3D"cx">     } while (0)
</span><span class=3D"cx">=20
</span><span class=3D"cx"> protected:
</span><del>-    MockCCInputHandlerClient m_mockCCInputHandlerClient;
</del><ins>+    MockWebInputHandlerClient m_mockInputHandlerClient;
</ins><span class=3D"cx">     OwnPtr&lt;WebCompositorInputHandlerImpl&gt;=
 m_inputHandler;
</span><span class=3D"cx">     MockWebCompositorInputHandlerClient m_mock=
Client;
</span><span class=3D"cx">     WebGestureEvent gesture;
</span><del>-    WebCore::DebugScopedSetImplThread alwaysImplThread;
</del><span class=3D"cx">     WebKitTests::WebCompositorInitializer m_ini=
tializer;
</span><span class=3D"cx">=20
</span><span class=3D"cx">     enum ExpectedDisposition { DidHandle, DidN=
otHandle, DropEvent };
</span><span class=3D"lines">@@ -174,8 +149,8 @@
</span><span class=3D"cx">     m_expectedDisposition =3D DidHandle;
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"cx">=20
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(test=
ing::_, testing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollS=
tarted));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing=
::_, testing::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusSta=
rted));
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     gesture.type =3D WebInputEvent::GestureScr=
ollBegin;
</span><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gestur=
e);
</span><span class=3D"lines">@@ -184,14 +159,14 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx">     gesture.type =3D WebInputEvent::GestureScr=
ollUpdate;
</span><span class=3D"cx">     gesture.data.scrollUpdate.deltaY =3D -40; =
// -Y means scroll down - i.e. in the +Y direction.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing=
::_, testing::Property(&amp;WebCore::IntSize::height, testing::Gt(0))));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scrollBy(testing::_=
, testing::Field(&amp;WebSize::height, testing::Gt(0))));
</ins><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gesture=
);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"cx">=20
</span><span class=3D"cx">     gesture.type =3D WebInputEvent::GestureScr=
ollEnd;
</span><span class=3D"cx">     gesture.data.scrollUpdate.deltaY =3D 0;
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd());
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scrollEnd());
</ins><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gesture=
);
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><span class=3D"lines">@@ -201,8 +176,8 @@
</span><span class=3D"cx">     m_expectedDisposition =3D DidNotHandle;
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"cx">=20
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(::te=
sting::_, ::testing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollO=
nMainThread));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(::testi=
ng::_, ::testing::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusOnM=
ainThread));
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     gesture.type =3D WebInputEvent::GestureScr=
ollBegin;
</span><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gestur=
e);
</span><span class=3D"lines">@@ -229,8 +204,8 @@
</span><span class=3D"cx">     m_expectedDisposition =3D DropEvent;
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"cx">=20
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(test=
ing::_, testing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollI=
gnored));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing=
::_, testing::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusIgn=
ored));
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     gesture.type =3D WebInputEvent::GestureScr=
ollBegin;
</span><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gestur=
e);
</span><span class=3D"lines">@@ -243,7 +218,7 @@
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"cx">=20
</span><span class=3D"cx">     gesture.type =3D WebInputEvent::GesturePin=
chBegin;
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, pinchGestureBegi=
n());
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, pinchGestureBegin()=
);
</ins><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gesture=
);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"lines">@@ -252,7 +227,7 @@
</span><span class=3D"cx">     gesture.data.pinchUpdate.scale =3D 1.5;
</span><span class=3D"cx">     gesture.x =3D 7;
</span><span class=3D"cx">     gesture.y =3D 13;
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, pinchGestureUpda=
te(1.5, WebCore::IntPoint(7, 13)));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, pinchGestureUpdate(=
1.5, WebPoint(7, 13)));
</ins><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gesture=
);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"lines">@@ -261,13 +236,13 @@
</span><span class=3D"cx">     gesture.data.pinchUpdate.scale =3D 0.5;
</span><span class=3D"cx">     gesture.x =3D 9;
</span><span class=3D"cx">     gesture.y =3D 6;
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, pinchGestureUpda=
te(.5, WebCore::IntPoint(9, 6)));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, pinchGestureUpdate(=
.5, WebPoint(9, 6)));
</ins><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gesture=
);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"cx">=20
</span><span class=3D"cx">     gesture.type =3D WebInputEvent::GesturePin=
chEnd;
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, pinchGestureEnd(=
));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, pinchGestureEnd());
</ins><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gesture=
);
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><span class=3D"lines">@@ -277,12 +252,12 @@
</span><span class=3D"cx">     m_expectedDisposition =3D DidHandle;
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"cx">=20
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(test=
ing::_, testing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollS=
tarted));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing=
::_, testing::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusSta=
rted));
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     gesture.type =3D WebInputEvent::GestureFli=
ngStart;
</span><span class=3D"cx">     gesture.data.flingStart.velocityX =3D 10;
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
</ins><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gesture=
);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"lines">@@ -298,8 +273,8 @@
</span><span class=3D"cx">     m_expectedDisposition =3D DidNotHandle;
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"cx">=20
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(test=
ing::_, testing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollO=
nMainThread));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing=
::_, testing::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusOnM=
ainThread));
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     gesture.type =3D WebInputEvent::GestureFli=
ngStart;
</span><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gestur=
e);
</span><span class=3D"lines">@@ -316,8 +291,8 @@
</span><span class=3D"cx">     m_expectedDisposition =3D DidNotHandle;
</span><span class=3D"cx">     VERIFY_AND_RESET_MOCKS();
</span><span class=3D"cx">=20
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(test=
ing::_, testing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollI=
gnored));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing=
::_, testing::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusIgn=
ored));
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     gesture.type =3D WebInputEvent::GestureFli=
ngStart;
</span><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gestur=
e);
</span><span class=3D"lines">@@ -349,40 +324,40 @@
</span><span class=3D"cx">     gesture.globalX =3D flingGlobalPoint.x;
</span><span class=3D"cx">     gesture.globalY =3D flingGlobalPoint.y;
</span><span class=3D"cx">     gesture.modifiers =3D modifiers;
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollS=
tarted));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusSta=
rted));
</ins><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gesture=
);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">     // The first animate call should let us pic=
k up an animation start time, but we
</span><span class=3D"cx">     // shouldn't actually move anywhere just y=
et. The first frame after the fling start
</span><span class=3D"cx">     // will typically include the last scroll =
from the gesture that lead to the scroll
</span><span class=3D"cx">     // (either wheel or gesture scroll), so th=
ere should be no visible hitch.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_)).Times(0);
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_)).Times(0);
</ins><span class=3D"cx">     m_inputHandler-&gt;animate(10);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // The second call should start scrolling =
in the -X direction.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollS=
tarted));
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::_, testing=
::Property(&amp;WebCore::IntSize::width, testing::Lt(0))));
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd());
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusSta=
rted));
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBy(testing::_, testing::=
Field(&amp;WebSize::width, testing::Lt(0))));
+    EXPECT_CALL(m_mockInputHandlerClient, scrollEnd());
</ins><span class=3D"cx">     m_inputHandler-&gt;animate(10.1);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // Let's say on the third call we hit a no=
n-scrollable region. We should abort the fling and not scroll.
</span><span class=3D"cx">     // We also should pass the current fling p=
arameters out to the client so the rest of the fling can be
</span><span class=3D"cx">     // transferred to the main thread.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollO=
nMainThread));
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::_, testing=
::_)).Times(0);
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd()).Times(0);
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusOnM=
ainThread));
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBy(testing::_, testing::=
_)).Times(0);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollEnd()).Times(0);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // Expected wheel fling animation paramete=
rs:
</span><span class=3D"cx">     // *) flingDelta and flingPoint should mat=
ch the original GestureFlingStart event
</span><span class=3D"lines">@@ -398,13 +373,13 @@
</span><span class=3D"cx">             testing::Field(&amp;WebSize::width=
, testing::Gt(0))))));
</span><span class=3D"cx">     m_inputHandler-&gt;animate(10.2);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">     testing::Mock::VerifyAndClearExpectations(&=
amp;m_mockClient);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     // Since we've aborted the fling, the next=
 animation should be a no-op and should not result in another
</span><span class=3D"cx">     // frame being requested.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n()).Times(0);
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_)).Times(0);
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
).Times(0);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_)).Times(0);
</ins><span class=3D"cx">     m_inputHandler-&gt;animate(10.3);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     // Since we've transferred the fling to th=
e main thread, we need to pass the next GestureFlingCancel to the main
</span><span class=3D"lines">@@ -433,38 +408,38 @@
</span><span class=3D"cx">     gesture.globalX =3D flingGlobalPoint.x;
</span><span class=3D"cx">     gesture.globalY =3D flingGlobalPoint.y;
</span><span class=3D"cx">     gesture.modifiers =3D modifiers;
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollS=
tarted));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusSta=
rted));
</ins><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gesture=
);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // Start the fling animation at time 10. T=
his shouldn't actually scroll, just establish a start time.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_)).Times(0);
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_)).Times(0);
</ins><span class=3D"cx">     m_inputHandler-&gt;animate(10);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // The second call should start scrolling =
in the -X direction.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollS=
tarted));
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::_, testing=
::Property(&amp;WebCore::IntSize::width, testing::Lt(0))));
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd());
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusSta=
rted));
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBy(testing::_, testing::=
Field(&amp;WebSize::width, testing::Lt(0))));
+    EXPECT_CALL(m_mockInputHandlerClient, scrollEnd());
</ins><span class=3D"cx">     m_inputHandler-&gt;animate(10.1);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // Let's say on the third call we hit a no=
n-scrollable region. We should abort the fling and not scroll.
</span><span class=3D"cx">     // We also should pass the current fling p=
arameters out to the client so the rest of the fling can be
</span><span class=3D"cx">     // transferred to the main thread.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollO=
nMainThread));
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::_, testing=
::_)).Times(0);
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd()).Times(0);
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusOnM=
ainThread));
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBy(testing::_, testing::=
_)).Times(0);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollEnd()).Times(0);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // Expected wheel fling animation paramete=
rs:
</span><span class=3D"cx">     // *) flingDelta and flingPoint should mat=
ch the original GestureFlingStart event
</span><span class=3D"lines">@@ -480,16 +455,16 @@
</span><span class=3D"cx">             testing::Field(&amp;WebSize::width=
, testing::Gt(0))))));
</span><span class=3D"cx">     m_inputHandler-&gt;animate(10.2);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">     testing::Mock::VerifyAndClearExpectations(&=
amp;m_mockClient);
</span><span class=3D"cx">=20
</span><span class=3D"cx">     // Since we've aborted the fling, the next=
 animation should be a no-op and should not result in another
</span><span class=3D"cx">     // frame being requested.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n()).Times(0);
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_)).Times(0);
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
).Times(0);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_)).Times(0);
</ins><span class=3D"cx">     m_inputHandler-&gt;animate(10.3);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // Since we've transferred the fling to th=
e main thread, we need to pass the next GestureFlingCancel to the main
</span><span class=3D"cx">     // thread as well.
</span><span class=3D"lines">@@ -512,36 +487,36 @@
</span><span class=3D"cx">     gesture.globalX =3D flingGlobalPoint.x;
</span><span class=3D"cx">     gesture.globalY =3D flingGlobalPoint.y;
</span><span class=3D"cx">     gesture.modifiers =3D modifiers;
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollS=
tarted));
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusSta=
rted));
</ins><span class=3D"cx">     m_inputHandler-&gt;handleInputEvent(gesture=
);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // Start the second fling animation at tim=
e 30.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_)).Times(0);
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_)).Times(0);
</ins><span class=3D"cx">     m_inputHandler-&gt;animate(30);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // Tick the second fling once normally.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollS=
tarted));
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::_, testing=
::Property(&amp;WebCore::IntSize::height, testing::Gt(0))));
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd());
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusSta=
rted));
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBy(testing::_, testing::=
Field(&amp;WebSize::height, testing::Gt(0))));
+    EXPECT_CALL(m_mockInputHandlerClient, scrollEnd());
</ins><span class=3D"cx">     m_inputHandler-&gt;animate(30.1);
</span><span class=3D"cx">=20
</span><del>-    testing::Mock::VerifyAndClearExpectations(&amp;m_mockCCI=
nputHandlerClient);
</del><ins>+    testing::Mock::VerifyAndClearExpectations(&amp;m_mockInpu=
tHandlerClient);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // Then abort the second fling.
</span><del>-    EXPECT_CALL(m_mockCCInputHandlerClient, scheduleAnimatio=
n());
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBegin(testing::_, test=
ing::_))
-        .WillOnce(testing::Return(WebCore::CCInputHandlerClient::ScrollO=
nMainThread));
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollBy(testing::_, testing=
::_)).Times(0);
-    EXPECT_CALL(m_mockCCInputHandlerClient, scrollEnd()).Times(0);
</del><ins>+    EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation()=
);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testin=
g::_))
+        .WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusOnM=
ainThread));
+    EXPECT_CALL(m_mockInputHandlerClient, scrollBy(testing::_, testing::=
_)).Times(0);
+    EXPECT_CALL(m_mockInputHandlerClient, scrollEnd()).Times(0);
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     // We should get parameters from the secon=
d fling, nothing from the first fling should &quot;leak&quot;.
</span><span class=3D"cx">     EXPECT_CALL(m_mockClient, transferActiveWh=
eelFlingAnimation(testing::AllOf(
</span><span class=3D"lines">@@ -556,3 +531,4 @@
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><span class=3D"cx"> }
</span><ins>+
</ins></span></pre>
</div>
</div>

</body>
</html>


More information about the webkit-changes mailing list