Commit 42835557 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

Always send mouse events on pages that don't scroll even if there

is no mouse move listener attatched.
PR #208228
https://bugs.webkit.org/show_bug.cgi?id=96800

Patch by Genevieve Mak <gmak@rim.com> on 2012-09-14
Reviewed by Antonio Gomes.

Reviewed Internally By Antonio Gomes.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a0d0994d
2012-09-14 Genevieve Mak <gmak@rim.com>
Always send mouse events on pages that don't scroll even if there
is no mouse move listener attatched.
PR #208228
https://bugs.webkit.org/show_bug.cgi?id=96800
Reviewed by Antonio Gomes.
Reviewed Internally By Antonio Gomes.
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2012-09-14 Mike Fenton <mifenton@rim.com>
[BlackBerry] Update the minimum zoom scale when focusing an input field.
......
......@@ -187,6 +187,7 @@ bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point, bool useFa
// Enable input mode on any touch event.
m_webPage->m_inputHandler->setInputModeEnabled();
bool pureWithMouseConversion = m_webPage->m_touchEventMode == PureTouchEventsWithMouseConversion;
bool alwaysEnableMouseConversion = pureWithMouseConversion || (!isMainFrameScrollable(m_webPage) && !m_webPage->m_inRegionScroller->d->isActive());
switch (point.m_state) {
case Platform::TouchPoint::TouchPressed:
......@@ -208,7 +209,7 @@ bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point, bool useFa
// Set or reset the touch mode.
Element* possibleTargetNodeForMouseMoveEvents = static_cast<Element*>(m_lastFatFingersResult.positionWasAdjusted() ? elementUnderFatFinger : m_lastFatFingersResult.node());
m_convertTouchToMouse = pureWithMouseConversion ? true : shouldConvertTouchToMouse(possibleTargetNodeForMouseMoveEvents);
m_convertTouchToMouse = alwaysEnableMouseConversion ? true : shouldConvertTouchToMouse(possibleTargetNodeForMouseMoveEvents);
if (!possibleTargetNodeForMouseMoveEvents || (!possibleTargetNodeForMouseMoveEvents->hasEventListeners(eventNames().touchmoveEvent) && !m_convertTouchToMouse))
m_webPage->client()->notifyNoMouseMoveOrTouchMoveHandlers();
......@@ -274,9 +275,7 @@ bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point, bool useFa
PlatformMouseEvent mouseEvent(point.m_pos, m_lastScreenPoint, PlatformEvent::MouseMoved, 1, LeftButton, TouchScreen);
m_lastScreenPoint = point.m_screenPos;
if (!m_webPage->handleMouseEvent(mouseEvent)) {
// 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;
m_convertTouchToMouse = alwaysEnableMouseConversion;
return false;
}
return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment