Remove trailing whitespace from login manager and satchel. b=none

This commit is contained in:
Justin Dolske 2011-08-03 17:52:47 -07:00
parent 0e47a5cdb8
commit b59dbf1261
9 changed files with 47 additions and 47 deletions

View File

@ -114,7 +114,7 @@ interface nsILoginManager : nsISupports {
* The number of elements in the array. JS callers can simply use
* the array's .length property and omit this param.
* @param logins
* An array of nsILoginInfo objects.
* An array of nsILoginInfo objects.
*
* NOTE: This can be called from JS as:
* var logins = pwmgr.getAllLogins();
@ -123,7 +123,7 @@ interface nsILoginManager : nsISupports {
void getAllLogins([optional] out unsigned long count,
[retval, array, size_is(count)] out nsILoginInfo logins);
/**
* Obtain a list of all hosts for which password saving is disabled.
*
@ -190,7 +190,7 @@ interface nsILoginManager : nsISupports {
* specify null.
* An empty string ("") will match any value (except null).
* @param logins
* An array of nsILoginInfo objects.
* An array of nsILoginInfo objects.
*
* NOTE: This can be called from JS as:
* var logins = pwmgr.findLogins({}, hostname, ...);

View File

@ -85,7 +85,7 @@ interface nsILoginManagerPrompter : nsISupports {
* @param count
* (length of the array)
* @param aNewLogin
* The new login.
* The new login.
*
* Note: Because the caller does not know the username of the login
* to be changed, aNewLogin.username and aNewLogin.usernameField

View File

@ -68,7 +68,7 @@ interface nsILoginManagerStorage : nsISupports {
* If non-null, file to output logins to.
*
*/
void initWithFile(in nsIFile aInputFile, in nsIFile aOutputFile);
void initWithFile(in nsIFile aInputFile, in nsIFile aOutputFile);
/**
@ -137,7 +137,7 @@ interface nsILoginManagerStorage : nsISupports {
* The number of elements in the array. JS callers can simply use
* the array's .length property and omit this param.
* @param logins
* An array of nsILoginInfo objects.
* An array of nsILoginInfo objects.
*
* NOTE: This can be called from JS as:
* var logins = pwmgr.getAllLogins();
@ -156,7 +156,7 @@ interface nsILoginManagerStorage : nsISupports {
* The number of elements in the array. JS callers can simply use
* the array's .length property and omit this param.
* @param logins
* An array of nsILoginInfo objects.
* An array of nsILoginInfo objects.
*
* NOTE: This can be called from JS as:
* var logins = pwmgr.getAllEncryptedLogins();
@ -251,7 +251,7 @@ interface nsILoginManagerStorage : nsISupports {
* WWW-Authenticate header. See RFC2617. For form logins,
* specify null.
* @param logins
* An array of nsILoginInfo objects.
* An array of nsILoginInfo objects.
*
* NOTE: This can be called from JS as:
* var logins = pwmgr.findLogins({}, hostname, ...);

View File

@ -45,7 +45,7 @@ function nsLoginInfo() {}
nsLoginInfo.prototype = {
classID : Components.ID("{0f2f347c-1e4f-40cc-8efd-792dea70a85e}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsILoginInfo, Ci.nsILoginMetaInfo]),
QueryInterface: XPCOMUtils.generateQI([Ci.nsILoginInfo, Ci.nsILoginMetaInfo]),
// Allow storage-Legacy.js to get at the JS object so it can
// slap on a few extra properties for internal use.

View File

@ -206,7 +206,7 @@ LoginManager.prototype = {
_observer : {
_pwmgr : null,
QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver,
QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsIFormSubmitObserver,
Ci.nsISupportsWeakReference]),
@ -235,7 +235,7 @@ LoginManager.prototype = {
this._pwmgr.log("got change to " + prefName + " preference");
if (prefName == "debug") {
this._pwmgr._debug =
this._pwmgr._debug =
this._pwmgr._prefBranch.getBoolPref("debug");
} else if (prefName == "rememberSignons") {
this._pwmgr._remember =
@ -718,7 +718,7 @@ LoginManager.prototype = {
// Locate the username field in the form by searching backwards
// from the first passwordfield, assume the first text field is the
// username. We might not find a username field if the user is
// already logged in to the site.
// already logged in to the site.
for (var i = pwFields[0].index - 1; i >= 0; i--) {
var element = form.elements[i];
var fieldType = (element.hasAttribute("type") ?
@ -916,7 +916,7 @@ LoginManager.prototype = {
// if the passwords differ.
if (!login.username && formLogin.username) {
var restoreMe = formLogin.username;
formLogin.username = "";
formLogin.username = "";
same = formLogin.matches(login, false);
formLogin.username = restoreMe;
} else if (!formLogin.username && login.username) {
@ -1112,7 +1112,7 @@ LoginManager.prototype = {
// Need to get a list of logins if we weren't given them
if (foundLogins == null) {
var formOrigin =
var formOrigin =
this._getPasswordOrigin(form.ownerDocument.documentURI);
var actionOrigin = this._getActionOrigin(form);
foundLogins = this.findLogins({}, formOrigin, actionOrigin, null);

View File

@ -83,7 +83,7 @@ nsFormFillController::nsFormFillController() :
mTimeout(50),
mMinResultsForPopup(1),
mMaxRows(0),
mDisableAutoComplete(PR_FALSE),
mDisableAutoComplete(PR_FALSE),
mCompleteDefaultIndex(PR_FALSE),
mCompleteSelectedIndex(PR_FALSE),
mForceComplete(PR_FALSE),
@ -188,10 +188,10 @@ NS_IMETHODIMP
nsFormFillController::AttachToBrowser(nsIDocShell *aDocShell, nsIAutoCompletePopup *aPopup)
{
NS_ENSURE_TRUE(aDocShell && aPopup, NS_ERROR_ILLEGAL_VALUE);
mDocShells->AppendElement(aDocShell);
mPopups->AppendElement(aPopup);
// Listen for focus events on the domWindow of the docShell
nsCOMPtr<nsIDOMWindow> domWindow = GetWindowForDocShell(aDocShell);
AddWindowListeners(domWindow);
@ -204,16 +204,16 @@ nsFormFillController::DetachFromBrowser(nsIDocShell *aDocShell)
{
PRInt32 index = GetIndexOfDocShell(aDocShell);
NS_ENSURE_TRUE(index >= 0, NS_ERROR_FAILURE);
// Stop listening for focus events on the domWindow of the docShell
nsCOMPtr<nsIDocShell> docShell;
mDocShells->GetElementAt(index, getter_AddRefs(docShell));
nsCOMPtr<nsIDOMWindow> domWindow = GetWindowForDocShell(docShell);
RemoveWindowListeners(domWindow);
mDocShells->RemoveElementAt(index);
mPopups->RemoveElementAt(index);
return NS_OK;
}
@ -424,13 +424,13 @@ nsFormFillController::GetSearchParam(nsAString &aSearchParam)
{
if (!mFocusedInput) {
NS_WARNING("mFocusedInput is null for some reason! avoiding a crash. should find out why... - ben");
return NS_ERROR_FAILURE; // XXX why? fix me.
return NS_ERROR_FAILURE; // XXX why? fix me.
}
mFocusedInput->GetName(aSearchParam);
if (aSearchParam.IsEmpty())
mFocusedInput->GetId(aSearchParam);
return NS_OK;
}
@ -612,8 +612,8 @@ nsFormFillController::StartSearch(const nsAString &aSearchString, const nsAStrin
}
NS_ENSURE_SUCCESS(rv, rv);
aListener->OnSearchResult(this, result);
aListener->OnSearchResult(this, result);
return NS_OK;
}
@ -727,7 +727,7 @@ nsFormFillController::HandleEvent(nsIDOMEvent* aEvent)
mPwmgrInputs.Enumerate(RemoveForDOMDocumentEnumerator, domDoc);
}
return NS_OK;
return NS_OK;
}
@ -751,7 +751,7 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent)
{
nsCOMPtr<nsIDOMEventTarget> target;
aEvent->GetTarget(getter_AddRefs(target));
nsCOMPtr<nsIDOMHTMLInputElement> input = do_QueryInterface(target);
if (!input)
return NS_OK;
@ -772,19 +772,19 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent)
!isReadOnly || isPwmgrInput) {
StartControllingInput(input);
}
return NS_OK;
}
PRBool
PRBool
nsFormFillController::IsInputAutoCompleteOff()
{
PRBool autoCompleteOff = PR_FALSE;
if (mFocusedInput) {
nsAutoString autocomplete;
nsAutoString autocomplete;
mFocusedInput->GetAttribute(NS_LITERAL_STRING("autocomplete"), autocomplete);
// Check the input for autocomplete="off", then the form
if (autocomplete.LowerCaseEqualsLiteral("off")) {
autoCompleteOff = PR_TRUE;
@ -866,11 +866,11 @@ nsFormFillController::KeyPress(nsIDOMEvent* aEvent)
mController->HandleEnter(PR_FALSE, &cancel);
break;
}
if (cancel) {
aEvent->PreventDefault();
}
return NS_OK;
}
@ -963,7 +963,7 @@ nsFormFillController::RemoveWindowListeners(nsIDOMWindow *aWindow)
return;
StopControllingInput();
nsCOMPtr<nsIDOMDocument> domDoc;
aWindow->GetDocument(getter_AddRefs(domDoc));
mPwmgrInputs.Enumerate(RemoveForDOMDocumentEnumerator, domDoc);
@ -972,7 +972,7 @@ nsFormFillController::RemoveWindowListeners(nsIDOMWindow *aWindow)
nsIDOMEventTarget* target = nsnull;
if (privateDOMWindow)
target = privateDOMWindow->GetChromeEventHandler();
if (!target)
return;
@ -1014,17 +1014,17 @@ void
nsFormFillController::StartControllingInput(nsIDOMHTMLInputElement *aInput)
{
// Make sure we're not still attached to an input
StopControllingInput();
StopControllingInput();
// Find the currently focused docShell
nsCOMPtr<nsIDocShell> docShell = GetDocShellForInput(aInput);
PRInt32 index = GetIndexOfDocShell(docShell);
if (index < 0)
return;
// Cache the popup for the focused docShell
mPopups->GetElementAt(index, getter_AddRefs(mFocusedPopup));
AddKeyListener(aInput);
mFocusedInput = aInput;
@ -1110,7 +1110,7 @@ nsFormFillController::GetIndexOfDocShell(nsIDocShell *aDocShell)
nsCOMPtr<nsIDocShell> parentShell = do_QueryInterface(parentItem);
return GetIndexOfDocShell(parentShell);
}
return -1;
}

View File

@ -81,16 +81,16 @@ public:
protected:
void AddWindowListeners(nsIDOMWindow *aWindow);
void RemoveWindowListeners(nsIDOMWindow *aWindow);
void AddKeyListener(nsIDOMHTMLInputElement *aInput);
void RemoveKeyListener();
void StartControllingInput(nsIDOMHTMLInputElement *aInput);
void StopControllingInput();
void RevalidateDataList();
PRBool RowMatch(nsFormHistory *aHistory, PRUint32 aIndex, const nsAString &aInputName, const nsAString &aInputValue);
inline nsIDocShell *GetDocShellForInput(nsIDOMHTMLInputElement *aInput);
inline nsIDOMWindow *GetWindowForDocShell(nsIDocShell *aDocShell);
inline PRInt32 GetIndexOfDocShell(nsIDocShell *aDocShell);
@ -120,7 +120,7 @@ protected:
PRUint32 mTimeout;
PRUint32 mMinResultsForPopup;
PRUint32 mMaxRows;
PRPackedBool mDisableAutoComplete;
PRPackedBool mDisableAutoComplete;
PRPackedBool mCompleteDefaultIndex;
PRPackedBool mCompleteSelectedIndex;
PRPackedBool mForceComplete;

View File

@ -60,7 +60,7 @@ interface nsIFormFillController : nsISupports
* @param popup - The popup to show when autocomplete results are available
*/
void attachToBrowser(in nsIDocShell docShell, in nsIAutoCompletePopup popup);
/*
* Stop controlling form fill behavior for the given browser
*

View File

@ -57,7 +57,7 @@ interface nsIFormHistory2 : nsISupports
* Returns true if the form history has any entries.
*/
readonly attribute boolean hasEntries;
/**
* Adds a name and value pair to the form history.
*/
@ -72,7 +72,7 @@ interface nsIFormHistory2 : nsISupports
* Removes all entries that are paired with a name.
*/
void removeEntriesForName(in AString name);
/**
* Removes all entries in the entire form history.
*/