Title: [111971] trunk/Source
Revision
111971
Author
[email protected]
Date
2012-03-23 19:23:46 -0700 (Fri, 23 Mar 2012)

Log Message

[chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found.
https://bugs.webkit.org/show_bug.cgi?id=82106

Reviewed by Adrienne Walker.

Source/WebCore:

Existing unit tests updated.

With gesture scroll events now being handled as mouse wheel events, we should not start a gesture scroll when
wheel handlers are present.

* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::scrollBegin):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:
(WebKit::TEST_F):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (111970 => 111971)


--- trunk/Source/WebCore/ChangeLog	2012-03-24 02:22:05 UTC (rev 111970)
+++ trunk/Source/WebCore/ChangeLog	2012-03-24 02:23:46 UTC (rev 111971)
@@ -1,3 +1,18 @@
+2012-03-23  W. James MacLean  <[email protected]>
+
+        [chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found.
+        https://bugs.webkit.org/show_bug.cgi?id=82106
+
+        Reviewed by Adrienne Walker.
+
+        Existing unit tests updated.
+
+        With gesture scroll events now being handled as mouse wheel events, we should not start a gesture scroll when
+        wheel handlers are present.
+
+        * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
+        (WebCore::CCLayerTreeHostImpl::scrollBegin):
+
 2012-03-23  Adam Barth  <[email protected]>
 
         Move Notifications APIs from WorkerContext.idl to WorkerContextNotifications.idl

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp (111970 => 111971)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp	2012-03-24 02:22:05 UTC (rev 111970)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp	2012-03-24 02:23:46 UTC (rev 111971)
@@ -619,7 +619,7 @@
         return ScrollFailed;
     }
 
-    if (type == CCInputHandlerClient::Wheel && m_scrollLayerImpl->haveWheelEventHandlers()) {
+    if ((type == CCInputHandlerClient::Wheel || type == CCInputHandlerClient::Gesture) && m_scrollLayerImpl->haveWheelEventHandlers()) {
         TRACE_EVENT("scrollBegin Failed wheelEventHandlers", this, 0);
         return ScrollFailed;
     }

Modified: trunk/Source/WebKit/chromium/ChangeLog (111970 => 111971)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-03-24 02:22:05 UTC (rev 111970)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-03-24 02:23:46 UTC (rev 111971)
@@ -1,3 +1,13 @@
+2012-03-23  W. James MacLean  <[email protected]>
+
+        [chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found.
+        https://bugs.webkit.org/show_bug.cgi?id=82106
+
+        Reviewed by Adrienne Walker.
+
+        * tests/CCLayerTreeHostImplTest.cpp:
+        (WebKit::TEST_F):
+
 2012-03-23  Shawn Singh  <[email protected]>
 
         [chromium] Fix race bug that clobbers CCLayerImpl updateRect

Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp (111970 => 111971)


--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp	2012-03-24 02:22:05 UTC (rev 111970)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp	2012-03-24 02:23:46 UTC (rev 111971)
@@ -203,11 +203,9 @@
     CCLayerImpl* root = m_hostImpl->rootLayer();
 
     root->setHaveWheelEventHandlers(true);
-    // With registered event handlers, wheel scrolls have to go to the main thread.
+    // With registered event handlers, wheel and gesture scrolls have to go to the main thread.
     EXPECT_EQ(m_hostImpl->scrollBegin(IntPoint(0, 0), CCInputHandlerClient::Wheel), CCInputHandlerClient::ScrollFailed);
-
-    // But gesture scrolls can still be handled.
-    EXPECT_EQ(m_hostImpl->scrollBegin(IntPoint(0, 0), CCInputHandlerClient::Gesture), CCInputHandlerClient::ScrollStarted);
+    EXPECT_EQ(m_hostImpl->scrollBegin(IntPoint(0, 0), CCInputHandlerClient::Gesture), CCInputHandlerClient::ScrollFailed);
 }
 
 TEST_F(CCLayerTreeHostImplTest, shouldScrollOnMainThread)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to