Closed
Bug 1533176
Opened 5 years ago
Closed 1 year ago
Have FormLikeFactory (and LoginFormFactory return class instances)
Categories
(Toolkit :: Password Manager, enhancement, P3)
Toolkit
Password Manager
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: MattN, Unassigned)
References
Details
(Whiteboard: [passwords:tech-debt])
One of the problems with FormLike/LoginForm objects is that they aren't live since they are vanilla JS objects. I don't recall why that was (maybe for better logging?) but I think things would be easier if LoginForm was a class which extended a FormLike class and those classes can use getters that return live values for things like .elements and .action. Since the FormLike isn't live we have many workarounds and remembering that it's not live is a footgun:
- https://searchfox.org/mozilla-central/rev/fbb251448feb7276f9b1d0a88f9c0cb1cd144ce4/toolkit/components/passwordmgr/LoginManagerContent.jsm#455-462
- https://searchfox.org/mozilla-central/rev/fbb251448feb7276f9b1d0a88f9c0cb1cd144ce4/browser/extensions/formautofill/FormAutofillHandler.jsm#936-951
- https://phabricator.services.mozilla.com/D22039#inline-128645 (where they should be stored on the FormLike but couldn't because a new FormLike instance would be created later).
By having them be live we can also store other properties on a FormLike and ensure they persist (compared to now where we create a new FormLike instance).
Updated•2 years ago
|
Severity: normal → S3
Comment 1•1 year ago
|
||
At the moment we are not clear if we want to proceed with this idea or not.
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•