on touch up. There are some cases where the user may drag
their finger off the element and we want to use the actual
touch point instead of the FatFingers adjusted point.
https://bugs.webkit.org/show_bug.cgi?id=89677
Patch by Genevieve Mak <gmak@rim.com> on 2012-06-21
Reviewed by Antonio Gomes.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
* Api/WebPage.h:
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
* WebKitSupport/TouchEventHandler.h:
(TouchEventHandler):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120959
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
return handled;
}
-bool WebPage::touchPointAsMouseEvent(const Platform::TouchPoint& point)
+bool WebPage::touchPointAsMouseEvent(const Platform::TouchPoint& point, bool useFatFingers)
{
if (d->m_page->defersLoading())
return false;
tPoint.m_pos = d->mapFromTransformed(tPoint.m_pos);
tPoint.m_screenPos = d->mapFromTransformed(tPoint.m_screenPos);
- return d->m_touchEventHandler->handleTouchPoint(tPoint);
+ return d->m_touchEventHandler->handleTouchPoint(tPoint, useFatFingers);
}
bool WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin(PluginView* pluginView, const Platform::TouchPoint& point)
// For conversion to mouse events.
void touchEventCancel();
- bool touchPointAsMouseEvent(const Platform::TouchPoint&);
+ bool touchPointAsMouseEvent(const Platform::TouchPoint&, bool useFatFingers = true);
// Returns true if the key stroke was handled by WebKit.
bool keyEvent(const Platform::KeyboardEvent&);
+2012-06-21 Genevieve Mak <gmak@rim.com>
+
+ Add a parameter to handletTouchPoint to bypass FatFingers
+ on touch up. There are some cases where the user may drag
+ their finger off the element and we want to use the actual
+ touch point instead of the FatFingers adjusted point.
+ https://bugs.webkit.org/show_bug.cgi?id=89677
+
+ Reviewed by Antonio Gomes.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
+ * Api/WebPage.h:
+ * WebKitSupport/TouchEventHandler.cpp:
+ (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
+ * WebKitSupport/TouchEventHandler.h:
+ (TouchEventHandler):
+
2012-06-21 Mike Fenton <mifenton@rim.com>
[BlackBerry] Input mode should adapt automatically to settings changes
m_webPage->clearFocusNode();
}
-bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point)
+bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point, bool useFatFingers)
{
// Enable input mode on any touch event.
m_webPage->m_inputHandler->setInputModeEnabled();
switch (point.m_state) {
case Platform::TouchPoint::TouchPressed:
{
+ // FIXME: bypass FatFingers if useFatFingers is false
m_lastFatFingersResult.reset(); // Theoretically this shouldn't be required. Keep it just in case states get mangled.
m_didCancelTouch = false;
m_lastScreenPoint = point.m_screenPos;
m_webPage->m_inputHandler->notifyClientOfKeyboardVisibilityChange(true);
IntPoint adjustedPoint;
- if (m_convertTouchToMouse) {
+ if (m_convertTouchToMouse || !useFatFingers) {
adjustedPoint = point.m_pos;
m_convertTouchToMouse = pureWithMouseConversion;
} else // Fat finger point in viewport coordinates.
TouchEventHandler(WebPagePrivate* webpage);
~TouchEventHandler();
- bool handleTouchPoint(Platform::TouchPoint&);
+ bool handleTouchPoint(Platform::TouchPoint&, bool useFatFingers);
void touchEventCancel();
void touchHoldEvent();