From 90fa57cd8b940ab1b46a85da92d950392a77e9da Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Thu, 26 Aug 2010 17:47:21 -0400 Subject: DO NOT MERGE make the text selection easier to hit Change-Id: I47b7aa04ebc2a8f0bf2c6b4399ef65e5f4c58d4e http://b/2626451 --- WebKit/android/nav/SelectText.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'WebKit') diff --git a/WebKit/android/nav/SelectText.cpp b/WebKit/android/nav/SelectText.cpp index fc93972..e303d2b 100644 --- a/WebKit/android/nav/SelectText.cpp +++ b/WebKit/android/nav/SelectText.cpp @@ -1426,7 +1426,10 @@ bool SelectText::hitSelection(int x, int y) const int bottom = m_selEnd.fBottom + CONTROL_HEIGHT / 2; if (hitCorner(right, bottom, x, y)) return true; - return m_selRegion.contains(x, y); + SkIRect test; + test.set(x - CONTROL_WIDTH, y - CONTROL_HEIGHT, x + CONTROL_WIDTH, + y + CONTROL_HEIGHT); + return m_selRegion.intersects(test); } void SelectText::moveSelection(const SkPicture* picture, int x, int y) -- cgit v1.1