Created by: RyanBerliner
First found in #35659 (specific comment with details), this fixes a bug in the isVisible
utility that was introduced with the latest version of chrome 97.0.4692.71. Previous to the chrome update the following html would produce a 0 length getClientRects()
when run on the span being checked.
<details>
<span>This is the element being checked by isVisible</span>
</details>
This meant that we didn't need any special handling for this case. However, after the chrome update, it returns non-zero length results, and it doesn't look like we can rely on it for all our visibility information. The changes in this PR add explicit support for checking visibility of elements inside the <details>
element. Should chrome ever revert their behavior, this should certainly still function, albeit a bit redundant.