Bug 1770188 [wpt PR 34128] - Fix visualViewport page values in iframe, a=testonly
commita0ad5c511287fbae4656c80c40e8f97c55dcd2b3
authorBlink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Fri, 10 Jun 2022 09:48:23 +0000 (10 09:48 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 13 Jun 2022 10:02:28 +0000 (13 10:02 +0000)
tree113717dd89ef0cf71cb34b91c56fe7e39107024a
parent7712d5bad2c2390abdd46ebf22464eb03db7fa60
Bug 1770188 [wpt PR 34128] - Fix visualViewport page values in iframe, a=testonly

Automatic update from web-platform-tests
Fix visualViewport page values in iframe (#34128)

The visualViewport in an iframe should be entirely independent of the
visualViewport of the root frame. Unfortunately pageLeft/pageTop
erroneously add the root frame's viewport offsets to the document
offset, even when inside an iframe. This CL fixes the issue so that
iframe's report only the document offset (since an iframe cannot be
zoomed, its visualViewport cannot have its own offset).

Bug: 1313970
Change-Id: I917bf72f645d105cdde86bf186e7bebd3741247e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3651641
Commit-Queue: David Bokan <bokan@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011212}

Co-authored-by: David Bokan <bokan@chromium.org>
--

wpt-commits: b514eb2e2e97f381b5ef7cc9746dd45c90d87c77
wpt-pr: 34128
testing/web-platform/tests/visual-viewport/page-and-offset-in-iframe.html [new file with mode: 0644]
testing/web-platform/tests/visual-viewport/scroll-event-order.html
testing/web-platform/tests/visual-viewport/viewport_support.js