Closed Bug 1168707 Opened 9 years ago Closed 9 years ago

When a password field is added to a document (possibly outside of a <form>) the autofill code should run

Categories

(Toolkit :: Password Manager, enhancement, P1)

enhancement
Points:
5

Tracking

()

RESOLVED FIXED
mozilla41
Iteration:
41.3 - Jun 29
Tracking Status
firefox41 --- fixed

People

(Reporter: MattN, Assigned: MattN)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(3 files)

Autofill should occur and autocomplete should be setup when the notification from bug 1132211 about a new password field is received.
Flags: qe-verify-
Flags: firefox-backlog+
Bug 1168707 - Run password autofill code when a password field is added to a document outside of a <form>. f=dolske
This WIP patch seems to be working well on a test page in the wild :)
Assignee: nobody → MattN+bmo
Status: NEW → ASSIGNED
Iteration: --- → 41.2 - Jun 8
Comment on attachment 8615163 [details]
MozReview Request: Bug 1168707 - Update test_formless_submit.html to test and cleanup recipes. r=dolske

Bug 1168707 - Run password autofill code when a password field is added to a document outside of a <form>. f=dolske
Tests are mostly there now. I mostly need to split some things up into separate patches, clean up debugging info, add some more comments, and look into autocomplete (which may be a follow-up).
Attachment #8615163 - Attachment description: MozReview Request: Bug 1168707 - Run password autofill code when a password field is added to a document outside of a <form>. f=dolske → MozReview Request: Bug 1168707 - Update test_formless_submit.html to test and cleanup recipes. r=dolske
Attachment #8615163 - Flags: review?(dolske)
Comment on attachment 8615163 [details]
MozReview Request: Bug 1168707 - Update test_formless_submit.html to test and cleanup recipes. r=dolske

Bug 1168707 - Update test_formless_submit.html to test and cleanup recipes. r=dolske
Bug 1168707 - Improve logging of FormLike objects with a toJSON method and add/improve some logging. r=dolske
Attachment #8620704 - Flags: review?(dolske)
Bug 1168707 - Run password autofill code when a password field is added to a document outside of a <form>. r=dolske
Attachment #8620705 - Flags: review?(dolske)
Iteration: 41.2 - Jun 8 → 41.3 - Jun 29
Blocks: 1175279
Rank: 15
Priority: -- → P1
Attachment #8615163 - Flags: review?(dolske) → review+
Comment on attachment 8615163 [details]
MozReview Request: Bug 1168707 - Update test_formless_submit.html to test and cleanup recipes. r=dolske

https://reviewboard.mozilla.org/r/10187/#review10561

Ship It!
Comment on attachment 8620704 [details]
MozReview Request: Bug 1168707 - Improve logging of FormLike objects with a toJSON method and add/improve some logging. r=dolske

https://reviewboard.mozilla.org/r/10805/#review10563

Ship It!
Attachment #8620704 - Flags: review?(dolske) → review+
Comment on attachment 8620705 [details]
MozReview Request: Bug 1168707 - Run password autofill code when a password field is added to a document outside of a <form>. r=dolske

https://reviewboard.mozilla.org/r/10807/#review10565

Ship It!

::: toolkit/components/passwordmgr/LoginManagerContent.jsm:309
(Diff revision 1)
> +        this._fetchLoginsFromParentAndFillForm(formLike2, window);

Nit: Move the fetchLoginsFromParentAndFillForm() call to be last, so we've cleaned up before it runs (and ensure we've cleaned up lest it asplode).

::: toolkit/components/passwordmgr/LoginManagerContent.jsm:341
(Diff revision 1)
> +    // TODO: separate form and non-form since non-form aren't throttled the same?

Nit: talked about this and can just nuke TODO.
Attachment #8620705 - Flags: review?(dolske) → review+
From followup discussion:

Would be good to further defer the formless processing until we know the document has loaded, because otherwise you're gambling with the timing of the network / parser... eg, if password-change page is loading, and it happens to briefly stall in between the input (such that we fill in the page then, incorrectly).

This has the slight downside that the fill might not happen as quickly as it could. But I don't think that's a big deal, and if the base page hasn't finished loading it's not necessarily safe for the use to submit it then anyway.
Blocks: 1178459
Blocks: 1291060
Depends on: 1304002
You need to log in before you can comment on or make changes to this bug.