New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 902307 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

VisibleBoundsInVisualViewport() reports a visible iframe's body as invisible

Reported by hu...@vewd.com, Nov 6

Issue description

Unit test that fails:

TEST_F(SpatialNavigationTest, ScrollableIframe) {
  SetBodyInnerHTML(
      "<!DOCTYPE html>"
      "<style>"
      "  iframe {"
      "    width: 100px;"
      "    height: 100px;"
      "  }"
      "</style>"
      "<iframe id='iframe'></iframe>");

  SetChildFrameHTML(
      "<!DOCTYPE html>"
      "<a style='display: block; margin-top: 200px'>clipped</a>");

  EXPECT_FALSE(
      ChildDocument().body()->VisibleBoundsInVisualViewport().IsEmpty()); // fail!
}

Found during discussion of https://chromium-review.googlesource.com/c/chromium/src/+/960185/12//COMMIT_MSG.
 

Sign in to add a comment