Title: [128479] trunk/Source/WebKit/blackberry
Revision
128479
Author
[email protected]
Date
2012-09-13 10:29:20 -0700 (Thu, 13 Sep 2012)

Log Message

Continue to send mouse move events to a non-scrollable page
even if they are not consumed.
PR #207024
https://bugs.webkit.org/show_bug.cgi?id=96655

Patch by Genevieve Mak <[email protected]> on 2012-09-13
Reviewed by Antonio Gomes.

* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::isMainFrameScrollable):
(WebKit):
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (128478 => 128479)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-09-13 17:22:21 UTC (rev 128478)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-09-13 17:29:20 UTC (rev 128479)
@@ -1,3 +1,17 @@
+2012-09-13  Genevieve Mak  <[email protected]>
+
+        Continue to send mouse move events to a non-scrollable page
+        even if they are not consumed.
+        PR #207024
+        https://bugs.webkit.org/show_bug.cgi?id=96655
+
+        Reviewed by Antonio Gomes.
+
+        * WebKitSupport/TouchEventHandler.cpp:
+        (BlackBerry::WebKit::isMainFrameScrollable):
+        (WebKit):
+        (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
+
 2012-09-13  Jacky Jiang  <[email protected]>
 
         [BlackBerry] Missing conditions in InRegionScrollerPrivate::canScrollRenderBox

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp (128478 => 128479)


--- trunk/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp	2012-09-13 17:22:21 UTC (rev 128478)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp	2012-09-13 17:29:20 UTC (rev 128479)
@@ -177,6 +177,11 @@
         m_webPage->clearFocusNode();
 }
 
+static bool isMainFrameScrollable(const WebPagePrivate* page)
+{
+    return page->viewportSize().width() < page->contentsSize().width() || page->viewportSize().height() < page->contentsSize().height();
+}
+
 bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point, bool useFatFingers)
 {
     // Enable input mode on any touch event.
@@ -269,7 +274,9 @@
             PlatformMouseEvent mouseEvent(point.m_pos, m_lastScreenPoint, PlatformEvent::MouseMoved, 1, LeftButton, TouchScreen);
             m_lastScreenPoint = point.m_screenPos;
             if (!m_webPage->handleMouseEvent(mouseEvent)) {
-                m_convertTouchToMouse = pureWithMouseConversion;
+                // If the page is scrollable and the first event is not handled, ignore subsequent mouse moves.
+                if (isMainFrameScrollable(m_webPage) || m_webPage->m_inRegionScroller->d->isActive() )
+                    m_convertTouchToMouse = pureWithMouseConversion;
                 return false;
             }
             return true;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to