Closed
Bug 673969
Opened 13 years ago
Closed 13 years ago
System preference for "visible passwords" not followed
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: bzbarsky, Assigned: alexp)
Details
Attachments
(1 file, 2 obsolete files)
12.62 KB,
patch
|
alexp
:
review+
|
Details | Diff | Splinter Review |
BUILD: Current fennec nightly STEPS TO REPRODUCE: 1) Get yourself an Android 3.1 device (in my case an eepad transformer) 2) Go into the system Settings > Location and Security 3) Uncheck the "Visible Passwords (show password as you type)" checkbox 4) Start Nightly 5) Go to type a password on some site ACTUAL RESULTS: Last char of password is shown as I type EXPECTED RESULTS: Given step 3 above, should probably not do that
Reporter | ||
Updated•13 years ago
|
OS: Mac OS X → Android
Hardware: x86 → ARM
Comment 1•13 years ago
|
||
Brad - Assign to a mobile platform dev?
Updated•13 years ago
|
Assignee: nobody → alexp
Also occurs in sync ui/chrome.
Assignee | ||
Comment 3•13 years ago
|
||
Added a check for Android system setting TEXT_SHOW_PASSWORD. Note: that value is checked only once, on the first attempt to enter a password, so if the system setting is changed later while Firefox is running, the new value will not be read until the browser restarts. I believe this is fine, as I don't think the users are changing this setting back and forth. A simple alternative would be to get the setting from the system on every character when nsTextEditRules needs this flag, but this doesn't make sense. And a more complex implementation is not really needed.
Attachment #548671 -
Flags: review?(blassey.bugs)
Comment 4•13 years ago
|
||
drive-by:
>+ContentParent::RecvGetShowPasswordSetting(PRInt32* showPassword)
>+{
>+#ifdef ANDROID
>+ if (!AndroidBridge::Bridge())
>+ return false;
>+
>+ *showPassword = AndroidBridge::Bridge()->GetShowPasswordSetting();
>+#endif
>+ return true;
>+}
Will this default to the right mobile setting for non-Android platforms? For example, on Maemo/Meego, we still want the "show the last character" behavior.
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to comment #4) > Will this default to the right mobile setting for non-Android platforms? For > example, on Maemo/Meego, we still want the "show the last character" > behavior. The patch overrides nsILookAndFeel::GetEchoPassword() virtual method only for Android. The systems, where it's not overridden have this default implementation: http://mxr.mozilla.org/mozilla-central/source/widget/public/nsILookAndFeel.h#368 So, the short answer: on Maemo/Meego the behavior will not change.
Comment 6•13 years ago
|
||
Comment on attachment 548671 [details] [diff] [review] Fix Review of attachment 548671 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/ipc/ContentParent.cpp @@ +595,5 @@ > +ContentParent::RecvGetShowPasswordSetting(PRInt32* showPassword) > +{ > +#ifdef ANDROID > + if (!AndroidBridge::Bridge()) > + return false; return true here and set *showPassword to true, as I understand it returning false is near-fatal @@ +598,5 @@ > + if (!AndroidBridge::Bridge()) > + return false; > + > + *showPassword = AndroidBridge::Bridge()->GetShowPasswordSetting(); > +#endif and a #else and set *showPassword to true for other platforms ::: embedding/android/GeckoAppShell.java @@ +1315,5 @@ > > return activityInfo.loadIcon(pm); > } > + > + public static int getShowPasswordSetting() { this method should return a boolean, its either on or off ::: widget/src/android/AndroidBridge.cpp @@ +756,5 @@ > } > > +int > +AndroidBridge::GetShowPasswordSetting() > +{ make this a boolean as well ::: widget/src/android/AndroidBridge.h @@ +211,5 @@ > void GetSystemColors(AndroidSystemColors *aColors); > > void GetIconForExtension(const nsACString& aFileExt, PRUint32 aIconSize, PRUint8 * const aBuf); > > + int GetShowPasswordSetting(); bool
Attachment #548671 -
Flags: review?(blassey.bugs) → review+
Assignee | ||
Comment 7•13 years ago
|
||
(In reply to comment #6) > > + public static int getShowPasswordSetting() { > > this method should return a boolean, its either on or off Frankly speaking - yes. I decided to have int here for two reasons: the setting itself is int (though it's either 0 or 1); it makes it easier to detect if the setting was obtained or not (initialized to -1 by default). But I didn't feel too strong about choosing this type. Boolean makes more sense - I agree.
Assignee | ||
Comment 8•13 years ago
|
||
Addressed review comments. r=blassey
Attachment #548671 -
Attachment is obsolete: true
Attachment #548993 -
Flags: review+
Assignee | ||
Comment 9•13 years ago
|
||
Updated to the latest tree. r=blassey
Attachment #548993 -
Attachment is obsolete: true
Attachment #553335 -
Flags: review?
Assignee | ||
Updated•13 years ago
|
Attachment #553335 -
Flags: review? → review+
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 10•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c86cbbb7d0bf
Comment 11•13 years ago
|
||
Verified Fixed Mozilla/5.0 (Android; Linux armv7l; rv:8.0a1) Gecko/20110816 Firefox/8.0a1 Fennec/8.0a1 Litmus: https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=25826
Status: RESOLVED → VERIFIED
Flags: in-litmus+
You need to log in
before you can comment on or make changes to this bug.
Description
•