mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 772327 - Password mask timer is too short on Android. r=blassy
This commit is contained in:
parent
58d773ea44
commit
578f93622b
@ -648,7 +648,8 @@ nsTextEditRules::WillInsertText(nsEditor::OperationID aAction,
|
||||
mTimer = do_CreateInstance("@mozilla.org/timer;1", &res);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
}
|
||||
mTimer->InitWithCallback(this, 600, nsITimer::TYPE_ONE_SHOT);
|
||||
mTimer->InitWithCallback(this, LookAndFeel::GetPasswordMaskDelay(),
|
||||
nsITimer::TYPE_ONE_SHOT);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -505,6 +505,12 @@ public:
|
||||
*/
|
||||
static bool GetEchoPassword();
|
||||
|
||||
/**
|
||||
* The millisecond to mask password value.
|
||||
* This value is only valid when GetEchoPassword() returns true.
|
||||
*/
|
||||
static PRUint32 GetPasswordMaskDelay();
|
||||
|
||||
/**
|
||||
* When system look and feel is changed, Refresh() must be called. Then,
|
||||
* cached data would be released.
|
||||
|
@ -472,3 +472,10 @@ nsLookAndFeel::GetEchoPasswordImpl()
|
||||
}
|
||||
return mShowPassword;
|
||||
}
|
||||
|
||||
PRUint32
|
||||
nsLookAndFeel::GetPasswordMaskDelayImpl()
|
||||
{
|
||||
// This value is hard-coded in PasswordTransformationMethod.java
|
||||
return 1500;
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
|
||||
virtual bool GetFontImpl(FontID aID, nsString& aName, gfxFontStyle& aStyle);
|
||||
virtual bool GetEchoPasswordImpl();
|
||||
virtual PRUint32 GetPasswordMaskDelayImpl();
|
||||
|
||||
protected:
|
||||
static bool mInitializedSystemColors;
|
||||
|
@ -728,6 +728,13 @@ LookAndFeel::GetEchoPassword()
|
||||
return nsLookAndFeel::GetInstance()->GetEchoPasswordImpl();
|
||||
}
|
||||
|
||||
// static
|
||||
PRUint32
|
||||
LookAndFeel::GetPasswordMaskDelay()
|
||||
{
|
||||
return nsLookAndFeel::GetInstance()->GetPasswordMaskDelayImpl();
|
||||
}
|
||||
|
||||
// static
|
||||
void
|
||||
LookAndFeel::Refresh()
|
||||
|
@ -73,6 +73,11 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual PRUint32 GetPasswordMaskDelayImpl()
|
||||
{
|
||||
return 600;
|
||||
}
|
||||
|
||||
protected:
|
||||
nsXPLookAndFeel();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user