summaryrefslogtreecommitdiff
path: root/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-25 15:09:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-25 15:09:11 +0200
commita89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (patch)
treeb7abd9f49ae1d4d2e426a5883bfccd42b8e2ee12 /Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
parent8d473cf9743f1d30a16a27114e93bd5af5648d23 (diff)
downloadqtwebkit-a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd.tar.gz
Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516)
Diffstat (limited to 'Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp')
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp b/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
index ac63433d3..da43f2ca4 100644
--- a/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
@@ -177,7 +177,7 @@ static unsigned short directionOfPointRelativeToRect(const WebCore::IntPoint& po
// Do height movement check first but add padding. We may be off on both x & y axis and only
// want to move in one direction at a time.
- if (point.y() + (useTopPadding ? verticalPadding : 0) < rect.y())
+ if (point.y() - (useTopPadding ? verticalPadding : 0) < rect.y())
return KEYCODE_UP;
if (point.y() > rect.maxY() + (useBottomPadding ? verticalPadding : 0))
return KEYCODE_DOWN;
@@ -554,7 +554,7 @@ void SelectionHandler::selectAtPoint(const WebCore::IntPoint& location)
WebCore::IntPoint targetPosition;
// FIXME: Factory this get right fat finger code into a helper.
const FatFingersResult lastFatFingersResult = m_webPage->m_touchEventHandler->lastFatFingersResult();
- if (lastFatFingersResult.positionWasAdjusted() && lastFatFingersResult.nodeAsElementIfApplicable()) {
+ if (lastFatFingersResult.resultMatches(location, FatFingers::Text) && lastFatFingersResult.positionWasAdjusted() && lastFatFingersResult.nodeAsElementIfApplicable()) {
targetNode = lastFatFingersResult.node(FatFingersResult::ShadowContentNotAllowed);
targetPosition = lastFatFingersResult.adjustedPosition();
} else {