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

RESOLVED FIXED in Firefox 41

Status

()

Toolkit
Password Manager
P1
enhancement
Rank:
15
RESOLVED FIXED
2 years ago
11 months ago

People

(Reporter: MattN, Assigned: MattN)

Tracking

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

unspecified
mozilla41
Points:
5
Dependency tree / graph
Bug Flags:
firefox-backlog +
qe-verify -

Firefox Tracking Flags

(firefox41 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(3 attachments)

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+
Created 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
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
Created attachment 8620704 [details]
MozReview Request: Bug 1168707 - Improve logging of FormLike objects with a toJSON method and add/improve some logging. 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)
Created 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

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

Updated

2 years ago
Blocks: 1175279

Updated

2 years ago
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.

Comment 12

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/4bb0b566feb9
https://hg.mozilla.org/integration/fx-team/rev/b2019a8bf749
https://hg.mozilla.org/integration/fx-team/rev/54e05c26ea80
https://hg.mozilla.org/mozilla-central/rev/4bb0b566feb9
https://hg.mozilla.org/mozilla-central/rev/b2019a8bf749
https://hg.mozilla.org/mozilla-central/rev/54e05c26ea80
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41

Updated

2 years ago
Blocks: 1178459
Blocks: 1291060
Depends on: 1304002
You need to log in before you can comment on or make changes to this bug.