From 4dd92d0aeca7863ebbda83a97c37267c3fa09fb9 Mon Sep 17 00:00:00 2001 From: George Mount Date: Thu, 14 Jun 2012 14:08:31 -0700 Subject: DO NOT MERGE Respect the "Make password visible" setting. Bug 6667146 Framework Change: I7fc107b02f73f4c54e8fe66484038ea9d7b69d61 Change-Id: I95ffcfa6fa47baad60b1af55f84bee35dfcc7972 --- Source/WebKit/android/jni/WebSettings.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Source/WebKit/android/jni/WebSettings.cpp') diff --git a/Source/WebKit/android/jni/WebSettings.cpp b/Source/WebKit/android/jni/WebSettings.cpp index 7ee9033..7d0c190 100644 --- a/Source/WebKit/android/jni/WebSettings.cpp +++ b/Source/WebKit/android/jni/WebSettings.cpp @@ -150,6 +150,7 @@ struct FieldIds { env->DeleteLocalRef(autoFillProfileClass); #endif mOverrideCacheMode = env->GetFieldID(clazz, "mOverrideCacheMode", "I"); + mPasswordEchoEnabled = env->GetFieldID(clazz, "mPasswordEchoEnabled", "Z"); ALOG_ASSERT(mLayoutAlgorithm, "Could not find field mLayoutAlgorithm"); ALOG_ASSERT(mTextSize, "Could not find field mTextSize"); @@ -193,6 +194,7 @@ struct FieldIds { ALOG_ASSERT(mMaximumDecodedImageSize, "Could not find field mMaximumDecodedImageSize"); ALOG_ASSERT(mUseDoubleTree, "Could not find field mUseDoubleTree"); ALOG_ASSERT(mPageCacheCapacity, "Could not find field mPageCacheCapacity"); + ALOG_ASSERT(mPasswordEchoEnabled, "Could not find field mPasswordEchoEnabled"); jclass enumClass = env->FindClass("java/lang/Enum"); ALOG_ASSERT(enumClass, "Could not find Enum class!"); @@ -278,6 +280,7 @@ struct FieldIds { jfieldID mAutoFillProfilePhoneNumber; #endif jfieldID mOverrideCacheMode; + jfieldID mPasswordEchoEnabled; }; static struct FieldIds* gFieldIds; @@ -610,8 +613,9 @@ public: // has no style attached to it. http://trac.webkit.org/changeset/79799 s->setDeveloperExtrasEnabled(true); s->setSpatialNavigationEnabled(true); - - s->setPasswordEchoEnabled(true); + bool echoPassword = env->GetBooleanField(obj, + gFieldIds->mPasswordEchoEnabled); + s->setPasswordEchoEnabled(echoPassword); } }; -- cgit v1.1