Bug 1548771 Comment 9 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

My findings so far on using `checkVisibility` from CSSOM API:

The [ccsom docs](https://drafts.csswg.org/cssom-view/#dom-checkvisibilityoptions-checkvisibilitycss) describe the following steps:
> The checkVisibility(options) method must run these steps, when called on an element this:
>
> 1. If this does not have an associated box, return false.
>
> 2. If a shadow-including ancestor of this has content-visibility: hidden, return false.
>
> 3. If the checkOpacity dictionary member of options is true, and this, or a shadow-including ancestor of this, has a computed opacity value of 0, return false.
>
> 4. If the checkVisibilityCSS dictionary member of options is true, and this is invisible, return false.
>
> 5. Return true.

On first `DOMContentLoaded` calling checkVisibility without adding optional checkVisibilityOptions parameters returns false for both elements and therefore prevents autofilling.   When we switch from `show_qr` tab to `show_login` tab checkVisibility returns true for both elements. But focusing on the passwordField shows the AutocompletePopup but only fills in password. Not sure why, because logs say that the correct usernameField is detected as well.
My findings so far on using `checkVisibility` from CSSOM API:

The [ccsom docs](https://drafts.csswg.org/cssom-view/#dom-checkvisibilityoptions-checkvisibilitycss) describe the following steps:
> The checkVisibility(options) method must run these steps, when called on an element this:
>
> 1. If this does not have an associated box, return false.
>
> 2. If a shadow-including ancestor of this has content-visibility: hidden, return false.
>
> 3. If the checkOpacity dictionary member of options is true, and this, or a shadow-including ancestor of this, has a computed opacity value of 0, return false.
>
> 4. If the checkVisibilityCSS dictionary member of options is true, and this is invisible, return false.
>
> 5. Return true.

On first `DOMContentLoaded` calling checkVisibility without adding optional checkVisibilityOptions parameters returns false for both elements and therefore prevents autofilling (step 3 and 4 not relevant at this point). When we switch from `show_qr` tab to `show_login` tab checkVisibility returns true for both elements. But focusing on the passwordField shows the AutocompletePopup but only fills in password. Not sure why, because logs say that the correct usernameField is detected as well.
My findings so far on using `checkVisibility` from CSSOM API:

The [ccsom docs](https://drafts.csswg.org/cssom-view/#dom-checkvisibilityoptions-checkvisibilitycss) describe the following steps:
> The checkVisibility(options) method must run these steps, when called on an element this:
>
> 1. If this does not have an associated box, return false.
>
> 2. If a shadow-including ancestor of this has content-visibility: hidden, return false.
>
> 3. If the checkOpacity dictionary member of options is true, and this, or a shadow-including ancestor of this, has a computed opacity value of 0, return false.
>
> 4. If the checkVisibilityCSS dictionary member of options is true, and this is invisible, return false.
>
> 5. Return true.

On first `DOMContentLoaded` calling checkVisibility without adding optional checkVisibilityOptions parameters returns false for both elements (usernameField and passwordField) and therefore prevents autofilling (step 3 and 4 not relevant at this point). When we switch from `show_qr` tab to `show_login` tab on [authet15.alipay.com](authet15.alipay.com/login/index.htm) checkVisibility returns true for both elements. But focusing on the passwordField shows the AutocompletePopup but only fills in password. Not sure why, because logs say that the correct usernameField is detected as well.

Back to Bug 1548771 Comment 9