diff options
| author | Steve Block <steveblock@google.com> | 2010-08-27 04:26:09 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-08-27 04:26:09 -0700 |
| commit | b306622f567766515afd0cd45947d5d2d74f7072 (patch) | |
| tree | 7c46e3ad20a41f8aa7755ad79d08e1e9a2528680 /WebKit/android | |
| parent | 98d569d62ef2876ff38649122e620315906db5cd (diff) | |
| parent | 08c1068d9fd18289b9812c3d1fbcfccb8dfa3e60 (diff) | |
| download | external_webkit-b306622f567766515afd0cd45947d5d2d74f7072.zip external_webkit-b306622f567766515afd0cd45947d5d2d74f7072.tar.gz external_webkit-b306622f567766515afd0cd45947d5d2d74f7072.tar.bz2 | |
Merge "Use upstream version of ANDROID_HITTEST_WITHSIZE"
Diffstat (limited to 'WebKit/android')
| -rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index e81e335..42aa718 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -1403,7 +1403,6 @@ Vector<IntRect> WebViewCore::getTouchHighlightRects(int x, int y, int slop) { Vector<IntRect> rects; m_mousePos = IntPoint(x - m_scrollOffsetX, y - m_scrollOffsetY); -#ifdef ANDROID_HITTEST_WITHSIZE HitTestResult hitTestResult = m_mainFrame->eventHandler()->hitTestResultAtPoint(IntPoint(x, y), false, false, DontHitTestScrollbars, HitTestRequest::Active | HitTestRequest::ReadOnly, IntSize(slop, slop)); if (!hitTestResult.innerNode() || !hitTestResult.innerNode()->inDocument()) { @@ -1437,7 +1436,7 @@ Vector<IntRect> WebViewCore::getTouchHighlightRects(int x, int y, int slop) found = true; break; } - // the nodes in the rawNodeList() are ordered based on z-index during hit testing. + // the nodes in the rectBasedTestResult() are ordered based on z-index during hit testing. // so do not search for the eventNode across explicit z-index border. // TODO: this is a hard one to call. z-index is quite complicated as its value only // matters when you compare two RenderLayer in the same hierarchy level. e.g. in @@ -1618,7 +1617,6 @@ Vector<IntRect> WebViewCore::getTouchHighlightRects(int x, int y, int slop) m_scrollOffsetX, m_scrollOffsetY); } } -#endif return rects; } @@ -2340,15 +2338,15 @@ void WebViewCore::touchUp(int touchGeneration, frame = 0; DBG_NAV_LOGD("touch up on (%d, %d), scrollOffset is (%d, %d), node:%p, frame:%p", m_mousePos.x() + m_scrollOffsetX, m_mousePos.y() + m_scrollOffsetY, m_scrollOffsetX, m_scrollOffsetY, node, frame); } else { - if (m_touchGeneration > touchGeneration) { - DBG_NAV_LOGD("m_touchGeneration=%d > touchGeneration=%d" - " x=%d y=%d", m_touchGeneration, touchGeneration, x, y); - return; // short circuit if a newer touch has been generated - } - // This moves m_mousePos to the correct place, and handleMouseClick uses - // m_mousePos to determine where the click happens. - moveMouse(frame, x, y); - m_lastGeneration = touchGeneration; + if (m_touchGeneration > touchGeneration) { + DBG_NAV_LOGD("m_touchGeneration=%d > touchGeneration=%d" + " x=%d y=%d", m_touchGeneration, touchGeneration, x, y); + return; // short circuit if a newer touch has been generated + } + // This moves m_mousePos to the correct place, and handleMouseClick uses + // m_mousePos to determine where the click happens. + moveMouse(frame, x, y); + m_lastGeneration = touchGeneration; } if (frame && CacheBuilder::validNode(m_mainFrame, frame, 0)) { frame->loader()->resetMultipleFormSubmissionProtection(); |
