Open Bug 1659224 Opened 4 years ago Updated 11 months ago

Ensure formLike.elements correctly lists all HTMLInputElement and HTMLSelectElement descendants of formLike.rootElement, even if they are inside ShadowRoots

Categories

(Toolkit :: Password Manager, defect, P2)

defect

Tracking

()

People

(Reporter: bdanforth, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

The root cause for Bug 1643163, and likely other bugs blocking the meta Bug 1629226, is that formLike.elements is incorrectly [] (an empty array) when the getter is called to identify username and password fields that are inside one or more ShadowRoots.

Test cases should cover all scenarios described in the Description of Bug 1629226 including the following:

  • Elements* inside nested ShadowRoots
  • Elements in ShadowRoots that are not encountered while traversing the ancestor chain
    • E.g. Elements in sibling ShadowRoots as in Case 1 Shadow DOM
    • This is salient, because Bug 1659217 will likely rely on this traversal to get formLike.rootElement, and we may be able to find some of these elements during that traversal.
  • Elements in ShadowRoots for pages with multiple forms (some in <form>s and some in "formless")

*: By "Elements", I am referring to HTMLInputElements and HTMLSelectElements, which are currently the only form elements we consider in our FormLike class when creating a form from a field (FormLikeFactory.createFromField). This is the method used for any Shadow DOM scenario where the password field is inside a Shadow Root, as the "DOMInputPasswordAdded" event will fire instead of "DOMFormHasPassword" when the field is added to the DOM, even if it is also inside a <form>.

Blocks: 1643163
Blocks: 1629226
No longer blocks: 1643163
Blocks: 1643163
Assignee: nobody → bdanforth
Severity: -- → S2
Status: NEW → ASSIGNED
Priority: -- → P2
Depends on: 1659217
Assignee: bdanforth → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: