mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests [iframe] Reset the size when navigating cross-origin This patch resets the intrinsic size info from `<iframe>` content when the content navigates cross-origin, to prevent leaking the size information. To do this, when `DocumentLoader` for an `<iframe>` child content checks if it's a cross-origin navigation in `CommitNavigation()`, and clears the natural dimension if so. `FrameLoader` is changed to keep the old document origin. `RenderWidgetHostViewChildFrame` needs a new queue for the intrinsic size events, as its `frame_connector_` isn't set yet at the `CommitNavigation()` timing. `content_switch_dependent_feature_overrides.cc` is needed to change to enable the flag in the browser when testing. In the non-testing environments, the flag in Blink and Browser are automatically synchronized. The existing test `responsive-iframe-navigation.html` is extended to test cross-origin as a new variant. In addition, it tests the initial viewport size of the child frame. All changes are under a runtime flag. Bug: 418397278 Change-Id: If8977a4fab2f9bf0c7bdb7bd2dc7c939b2b03f64 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7893591 Commit-Queue: Koji Ishii <[email protected]> Reviewed-by: Rakina Zata Amni <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Reviewed-by: Ian Kilpatrick <[email protected]> Cr-Commit-Position: refs/heads/main@{#1644590} -- wpt-commits: baafee6d47fb8e90bdcd186d9cf2378042081b96 wpt-pr: 60522