Bug 778389 - Password mask should be U+2022 on Android. r=cpeterson
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 07 Aug 2012 14:13:25 +0900
changeset 101638 e677fd2a66ddcbd5977ca36cea7b3e3271dc6107
parent 101637 a525ac9349eb4bf29d4c2c650517791dea282669
child 101639 f940a77ee24724134a9dbcb81e0bc921582379b9
push id989
push userttaubert@mozilla.com
push dateWed, 08 Aug 2012 09:53:52 +0000
treeherderfx-team@2dfbe4b9403b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpeterson
bugs778389
milestone17.0a1
Bug 778389 - Password mask should be U+2022 on Android. r=cpeterson
widget/android/nsLookAndFeel.cpp
widget/android/nsLookAndFeel.h
--- a/widget/android/nsLookAndFeel.cpp
+++ b/widget/android/nsLookAndFeel.cpp
@@ -13,16 +13,18 @@ using namespace mozilla;
 using mozilla::dom::ContentChild;
 
 bool nsLookAndFeel::mInitializedSystemColors = false;
 AndroidSystemColors nsLookAndFeel::mSystemColors;
 
 bool nsLookAndFeel::mInitializedShowPassword = false;
 bool nsLookAndFeel::mShowPassword = true;
 
+static const PRUnichar UNICODE_BULLET = 0x2022;
+
 nsLookAndFeel::nsLookAndFeel()
     : nsXPLookAndFeel()
 {
 }
 
 nsLookAndFeel::~nsLookAndFeel()
 {
 }
@@ -471,11 +473,19 @@ nsLookAndFeel::GetEchoPasswordImpl()
         mInitializedShowPassword = true;
     }
     return mShowPassword;
 }
 
 PRUint32
 nsLookAndFeel::GetPasswordMaskDelayImpl()
 {
-  // This value is hard-coded in PasswordTransformationMethod.java
+  // This value is hard-coded in Android OS's PasswordTransformationMethod.java
   return 1500;
 }
+
+/* virtual */
+PRUnichar
+nsLookAndFeel::GetPasswordCharacterImpl()
+{
+  // This value is hard-coded in Android OS's PasswordTransformationMethod.java
+  return UNICODE_BULLET;
+}
--- a/widget/android/nsLookAndFeel.h
+++ b/widget/android/nsLookAndFeel.h
@@ -15,16 +15,17 @@ public:
     virtual ~nsLookAndFeel();
 
     virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult);
     virtual nsresult GetIntImpl(IntID aID, PRInt32 &aResult);
     virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
     virtual bool GetFontImpl(FontID aID, nsString& aName, gfxFontStyle& aStyle);
     virtual bool GetEchoPasswordImpl();
     virtual PRUint32 GetPasswordMaskDelayImpl();
+    virtual PRUnichar GetPasswordCharacterImpl();
 
 protected:
     static bool mInitializedSystemColors;
     static mozilla::AndroidSystemColors mSystemColors;
     static bool mInitializedShowPassword;
     static bool mShowPassword;
 
     nsresult GetSystemColors();