Closed Bug 1278158 Opened 8 years ago Closed 8 years ago

Using the context menu in an iframe: "fillForm: There is no login form anymore…"

Categories

(Toolkit :: Password Manager, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla50
Tracking Status
firefox46 --- wontfix
firefox47 --- wontfix
firefox48 --- wontfix
firefox49 --- verified
firefox50 --- verified

People

(Reporter: MattN, Assigned: saadq, Mentored)

References

()

Details

(Whiteboard: [lang=js])

Attachments

(1 file)

STR:
1) Load http://www.tmngo.ca/hbocanada/
2) Click Sign In
3) Choose Bell
4) Right-click in the username field and choose to Fill one of your saved logins.

Expected result:
My login is filled

Actual result:
> LoginManagerContent: fillForm: There is no login form anymore. The form may have been removed or the document may have changed. LoginManagerContent.jsm:469
is logged and the login isn't filled.

This is likely a bug from the initial implementation.
The log message is because `this.stateForDocument(topDocument).loginFormForFill` is null which may be a bug but really I think that block should be skipped altogether when `inputElement` is truthy.

> if (!topState.loginFormForFill) {

should be

> if (!inputElement && !topState.loginFormForFill) {

in LoginManagerContent.jsm.

A test can be added to toolkit/components/passwordmgr/test/browser/browser_context_menu.js though we'll need to make sure it fails without the patch as I'm not sure what the exact conditions are that cause `loginFormForFill` to be null at this stage. Once we know that cause it would probably be worth filing a separate bug on fixing `loginFormForFill`.
Mentor: MattN+bmo
Has Regression Range: --- → irrelevant
Has STR: --- → yes
Whiteboard: [lang=js]
Assignee: nobody → saad
Status: NEW → ASSIGNED
Comment on attachment 8760964 [details]
Bug 1278158 - Allowing filling login forms with an inputElement but without loginFormForFill.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58356/diff/1-2/
Comment on attachment 8760964 [details]
Bug 1278158 - Allowing filling login forms with an inputElement but without loginFormForFill.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58356/diff/2-3/
Comment on attachment 8760964 [details]
Bug 1278158 - Allowing filling login forms with an inputElement but without loginFormForFill.

https://reviewboard.mozilla.org/r/58356/#review55486

Nit: The commit message ideally describes what is being changed/fixed instead of the problem (which the bug summary usually describes). Example:
Bug 1278158 - Allowing filling login forms with an inputElement but without loginFormForFill. r=MattN

::: toolkit/components/passwordmgr/test/browser/browser_context_menu_iframe.js:1
(Diff revision 3)
> +/*

It seems like the `hg copy` metadata was lost so this isn't showing up as a copy anymore.

::: toolkit/components/passwordmgr/test/browser/browser_context_menu_iframe.js:9
(Diff revision 3)
> +
> +"use strict";
> +
> +// The hostname for the test URIs.
> +const TEST_HOSTNAME = "https://example.com";
> +const IFRAME_PAGE_PATH = "/browser/toolkit/components/passwordmgr/test/browser/form_basic_iframe.html";

Nit: Add a note that this test needs to run with the only login form being in a frame to test when loginFormForFill is null.
Attachment #8760964 - Flags: review?(MattN+bmo) → review+
Comment on attachment 8760964 [details]
Bug 1278158 - Allowing filling login forms with an inputElement but without loginFormForFill.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58356/diff/3-4/
Attachment #8760964 - Attachment description: Bug 1278158 - Using the context menu in an iframe: "fillForm: There is no login form anymore…". → Bug 1278158 - Allowing filling login forms with an inputElement but without loginFormForFill.
Comment on attachment 8760964 [details]
Bug 1278158 - Allowing filling login forms with an inputElement but without loginFormForFill.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58356/diff/4-5/
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/9694e3713635
Allowing filling login forms with an inputElement but without loginFormForFill. r=MattN
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9694e3713635
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Comment on attachment 8760964 [details]
Bug 1278158 - Allowing filling login forms with an inputElement but without loginFormForFill.

Approval Request Comment
[Feature/regressing bug #]: bug 433238
[User impact if declined]: The login fill context menu item is broken in subframes.
[Describe test coverage new/current, TreeHerder]: New browser-chrome test and a month of baking.
[Risks and why]: Low risk trivial change to a single `if` condition which was obviously wrong by inspection
[String/UUID change made/needed]: None
Attachment #8760964 - Flags: approval-mozilla-aurora?
Comment on attachment 8760964 [details]
Bug 1278158 - Allowing filling login forms with an inputElement but without loginFormForFill.

This patch fixes a UI issue where the user login is not filled. Take it in 49 aurora.
Attachment #8760964 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Reproduced this issue using Fx48.0RC build 2 on Windows 10 x64.

Confirming the fix across platforms using:
- latest 50.0a1 Nightly, build ID 20160728030208
- latest 49.0a2 Aurora, build ID 20160728004010.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
QA Contact: cornel.ionce
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: