summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-20 07:38:31 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-20 07:38:31 -0800
commitcb992f06658b5dfc2075eb12f25b2b69a7482eb4 (patch)
tree135da760b7abbccefa0fa48187dacc58c569056f /WebKit/android
parent11ecc8563736f4aaf10c0ae07d7cb814e4c3fcd5 (diff)
downloadexternal_webkit-cb992f06658b5dfc2075eb12f25b2b69a7482eb4.zip
external_webkit-cb992f06658b5dfc2075eb12f25b2b69a7482eb4.tar.gz
external_webkit-cb992f06658b5dfc2075eb12f25b2b69a7482eb4.tar.bz2
auto import from //branches/cupcake/...@132569
Diffstat (limited to 'WebKit/android')
-rw-r--r--WebKit/android/nav/WebView.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index 341a54d..52bb6a5 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -1363,8 +1363,9 @@ void markNodeInvalid(WebCore::Node* node)
viewInvalidate();
}
-void motionUp(int x, int y, int slop, bool isClick, bool inval, bool retry)
+bool motionUp(int x, int y, int slop, bool isClick, bool inval, bool retry)
{
+ bool pageScrolled = false;
m_followedLink = false;
const CachedFrame* frame;
WebCore::IntRect rect = WebCore::IntRect(x - slop, y - slop, slop * 2, slop * 2);
@@ -1382,6 +1383,7 @@ void motionUp(int x, int y, int slop, bool isClick, bool inval, bool retry)
if (dx) {
scrollBy(dx, 0);
retry = true; // don't recompute later since we scrolled
+ pageScrolled = true;
}
}
}
@@ -1401,7 +1403,7 @@ void motionUp(int x, int y, int slop, bool isClick, bool inval, bool retry)
m_replay.add(params.d, sizeof(params));
}
clearTextEntry();
- return;
+ return pageScrolled;
}
DBG_NAV_LOGD("CachedNode:%p (%d) x=%d y=%d rx=%d ry=%d", result,
result->index(), x, y, rx, ry);
@@ -1446,6 +1448,7 @@ void motionUp(int x, int y, int slop, bool isClick, bool inval, bool retry)
if (oldNodeIsTextArea)
clearTextEntry();
}
+ return pageScrolled;
}
void overrideUrlLoading(const WebCore::String& url)
@@ -1980,12 +1983,12 @@ static void nativeMarkNodeInvalid(JNIEnv *env, jobject obj, int node)
view->markNodeInvalid((WebCore::Node*) node);
}
-static void nativeMotionUp(JNIEnv *env, jobject obj,
+static bool nativeMotionUp(JNIEnv *env, jobject obj,
int x, int y, int slop, bool isClick)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
- view->motionUp(x, y, slop, isClick, true, false);
+ return view->motionUp(x, y, slop, isClick, true, false);
}
static bool nativeUpdateFocusNode(JNIEnv *env, jobject obj)
@@ -2270,7 +2273,7 @@ static JNINativeMethod gJavaWebViewMethods[] = {
(void*) nativeInstrumentReport },
{ "nativeMarkNodeInvalid", "(I)V",
(void*) nativeMarkNodeInvalid },
- { "nativeMotionUp", "(IIIZ)V",
+ { "nativeMotionUp", "(IIIZ)Z",
(void*) nativeMotionUp },
{ "nativeMoveFocus", "(IIZ)Z",
(void*) nativeMoveFocus },