summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/WebCoreJni.cpp
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2012-03-01 08:38:30 -0800
committerGeorge Mount <mount@google.com>2012-03-09 15:06:39 -0800
commit730ac8198c5c9a59a2b11e54657155f3ea33d83f (patch)
treec529fe2e227312b5b51fb5f745e57d36e8d962f3 /Source/WebKit/android/jni/WebCoreJni.cpp
parentddacf299acbe17093f175cec8d86088ea3472793 (diff)
downloadexternal_webkit-730ac8198c5c9a59a2b11e54657155f3ea33d83f.zip
external_webkit-730ac8198c5c9a59a2b11e54657155f3ea33d83f.tar.gz
external_webkit-730ac8198c5c9a59a2b11e54657155f3ea33d83f.tar.bz2
Add back auto-completion and auto-fill.
Bug 5993316 Framework Change: If00d42c0cb4f2c207f0d502e297741e1d6a68bf4 Change-Id: I9d09a924a579d2d4551bff0489670de71d04757e
Diffstat (limited to 'Source/WebKit/android/jni/WebCoreJni.cpp')
-rw-r--r--Source/WebKit/android/jni/WebCoreJni.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebCoreJni.cpp b/Source/WebKit/android/jni/WebCoreJni.cpp
index 5a142c8..6dfc9f1 100644
--- a/Source/WebKit/android/jni/WebCoreJni.cpp
+++ b/Source/WebKit/android/jni/WebCoreJni.cpp
@@ -112,6 +112,16 @@ jstring stdStringToJstring(JNIEnv* env, const std::string& str, bool validOnZero
return !str.empty() || validOnZeroLength ? env->NewStringUTF(str.c_str()) : 0;
}
+jobject intRectToRect(JNIEnv* env, const WebCore::IntRect& rect)
+{
+ jclass rectClass = env->FindClass("android/graphics/Rect");
+ ALOG_ASSERT(rectClass, "Could not find android/graphics/Rect");
+ jmethodID rectInit = env->GetMethodID(rectClass, "<init>", "(IIII)V");
+ ALOG_ASSERT(rectInit, "Could not find init method on Rect");
+ return env->NewObject(rectClass, rectInit, rect.x(), rect.y(),
+ rect.maxX(), rect.maxY());
+}
+
jobjectArray intRectVectorToRectArray(JNIEnv* env, Vector<WebCore::IntRect>& rects)
{
jclass rectClass = env->FindClass("android/graphics/Rect");