summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2009-05-22 12:12:06 -0400
committerCary Clark <cary@android.com>2009-05-22 12:29:49 -0400
commit68e3a57b241bfb1f5725f774cbc237d0da369802 (patch)
tree93ff26d817cc51dd6130d7eb5afce58c31ad856b
parentd8a47b507e3cf0291362a758983c233217cf5443 (diff)
downloadexternal_webkit-68e3a57b241bfb1f5725f774cbc237d0da369802.zip
external_webkit-68e3a57b241bfb1f5725f774cbc237d0da369802.tar.gz
external_webkit-68e3a57b241bfb1f5725f774cbc237d0da369802.tar.bz2
use trackball 'mouse' position instead of current focus on click
Furthering investigation to separate browser focus movement from trackball mouse position movement, use the simulated mouse position when computing the node underneath used for mouse clicks. The computed node is only used for area maps and lists -- usually the (x,y) position is passed through to webkit. Since this is re-finding the node by location and not using the node found by navigation, it may introduce some regression. An additional regression/investigation would be to pass the (x,y) through regardless of whether a node is hit so that the click is always generated. http://b/issue?id=1866439
-rw-r--r--WebKit/android/jni/WebViewCore.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 18eb6b9..823a30f 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -1780,7 +1780,11 @@ bool WebViewCore::key(int keyCode, UChar32 unichar, int repeatCount, bool isShif
bool WebViewCore::click() {
bool keyHandled = false;
- WebCore::Node* focusNode = FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder().currentFocus();
+ WebCore::IntPoint pt = m_mousePos;
+ pt.move(m_scrollOffsetX, m_scrollOffsetY);
+ WebCore::HitTestResult hitTestResult = m_mainFrame->eventHandler()->
+ hitTestResultAtPoint(pt, false);
+ WebCore::Node* focusNode = hitTestResult.innerNode();
if (focusNode) {
WebFrame::getWebFrame(m_mainFrame)->setUserInitiatedClick(true);
keyHandled = handleMouseClick(focusNode->document()->frame(), focusNode);