Snav: Test visibility through the visual viewport
Scenario: activeElement (focus) resides in an *offscreen* iframe's viewport. Problem: Spatnav only checked if activeElement was visible in its localmost frame. Even if that frame wasn't visible to the user, activeElement was used as the starting point in the search for focus candidates. Solution: Do not only ensure that activeElement is visible in its own frame: Also ensure that activeElement is being visible through the root frame. We do this by testing visibility through VisualViewport. Note: Element::VisibleBoundsInVisualViewport() returns an empty rect if an element is clipped by an iframe but VBIVV does not return an empty rect if the element is clipped by an overflow div. That's why we first still check the node's LayoutObject's VisualRectInDocument(). Let's fix this problem in Issue 889840. Bug: 881721 Change-Id: I091d07a4f1f909e947fce11a335e3e6fe756ce18 Reviewed-on: https://chromium-review.googlesource.com/1243246 Commit-Queue: Hugo Holgersson <hugoh@vewd.com> Reviewed-by:David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#594730}
Showing
This diff is collapsed.
Please register or sign in to comment