diff options
| author | Ben Murdoch <benm@google.com> | 2010-10-20 11:35:44 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-10-20 11:35:44 -0700 |
| commit | 8dfd5f6473f3130a2cba0742b0d16ad3d10106be (patch) | |
| tree | 7b40fee94f5093d4f42e05c7a5abb3c2343ea3ef /WebKit/android/jni | |
| parent | 70b68350b01ef7101e3dcdab2a3544a56b6e3b62 (diff) | |
| parent | f1b7fe47bddde1b9a0a1646dc2f1f78705169e05 (diff) | |
| download | external_webkit-8dfd5f6473f3130a2cba0742b0d16ad3d10106be.zip external_webkit-8dfd5f6473f3130a2cba0742b0d16ad3d10106be.tar.gz external_webkit-8dfd5f6473f3130a2cba0742b0d16ad3d10106be.tar.bz2 | |
Merge "Fix AutoFill after merge to Chromium merge to 7.0.540.0"
Diffstat (limited to 'WebKit/android/jni')
| -rw-r--r-- | WebKit/android/jni/WebSettings.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/WebKit/android/jni/WebSettings.cpp b/WebKit/android/jni/WebSettings.cpp index 113a463..e3f59c3 100644 --- a/WebKit/android/jni/WebSettings.cpp +++ b/WebKit/android/jni/WebSettings.cpp @@ -129,6 +129,7 @@ struct FieldIds { mAutoFillEnabled = env->GetFieldID(clazz, "mAutoFillEnabled", "Z"); mAutoFillProfile = env->GetFieldID(clazz, "mAutoFillProfile", "Landroid/webkit/WebSettings$AutoFillProfile;"); jclass autoFillProfileClass = env->FindClass("android/webkit/WebSettings$AutoFillProfile"); + mAutoFillProfileUniqueId = env->GetFieldID(autoFillProfileClass, "mUniqueId", "I"); mAutoFillProfileFullName = env->GetFieldID(autoFillProfileClass, "mFullName", "Ljava/lang/String;"); mAutoFillProfileEmailAddress = env->GetFieldID(autoFillProfileClass, "mEmailAddress", "Ljava/lang/String;"); mAutoFillProfileCompanyName = env->GetFieldID(autoFillProfileClass, "mCompanyName", "Ljava/lang/String;"); @@ -249,6 +250,7 @@ struct FieldIds { #if ENABLE(WEB_AUTOFILL) jfieldID mAutoFillEnabled; jfieldID mAutoFillProfile; + jfieldID mAutoFillProfileUniqueId; jfieldID mAutoFillProfileFullName; jfieldID mAutoFillProfileEmailAddress; jfieldID mAutoFillProfileCompanyName; @@ -285,6 +287,7 @@ inline string16 getStringFieldAsString16(JNIEnv* env, jobject autoFillProfile, j void syncAutoFillProfile(JNIEnv* env, jobject autoFillProfile, WebAutoFill* webAutoFill) { + int id = env->GetIntField(autoFillProfile, gFieldIds->mAutoFillProfileUniqueId); string16 fullName = getStringFieldAsString16(env, autoFillProfile, gFieldIds->mAutoFillProfileFullName); string16 emailAddress = getStringFieldAsString16(env, autoFillProfile, gFieldIds->mAutoFillProfileEmailAddress); string16 companyName = getStringFieldAsString16(env, autoFillProfile, gFieldIds->mAutoFillProfileCompanyName); @@ -296,7 +299,7 @@ void syncAutoFillProfile(JNIEnv* env, jobject autoFillProfile, WebAutoFill* webA string16 country = getStringFieldAsString16(env, autoFillProfile, gFieldIds->mAutoFillProfileCountry); string16 phoneNumber = getStringFieldAsString16(env, autoFillProfile, gFieldIds->mAutoFillProfilePhoneNumber); - webAutoFill->setProfile(fullName, emailAddress, companyName, addressLine1, addressLine2, city, state, zipCode, country, phoneNumber); + webAutoFill->setProfile(id, fullName, emailAddress, companyName, addressLine1, addressLine2, city, state, zipCode, country, phoneNumber); } #endif |
