tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 50108abe775ab642ecd0228bf640db6b57dcfe2e
parent 60c0dcc735e8ab8fe378e7769f92a31941a0ce5b
Author: Koji Ishii <kojii@chromium.org>
Date:   Tue, 21 Oct 2025 10:29:51 +0000

Bug 1994618 [wpt PR 55468] - [iframe] Add `window.requestResize()`, a=testonly

Automatic update from web-platform-tests
[iframe] Add `window.requestResize()`

This patch adds `window.requestResize()`, which forces a
layout, updates the natural size, and updates the layout of
the `IFRAME` element in the parent frame.

No behavior changes as the changes are under a runtime flag
for testing.

Bug: 418397278
Change-Id: I61393b2172386e649655e844ad3a8edda927d742
Low-Coverage-Reason: EXPERIMENTAL_CODE
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7040609
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1530636}

--

wpt-commits: 064370c67ec682c51f8a45b6604b1ce6f15ac42c
wpt-pr: 55468

Diffstat:
Atesting/web-platform/tests/css/css-sizing/resources/iframe-contents-request-resize.html | 17+++++++++++++++++
Atesting/web-platform/tests/css/css-sizing/responsive-iframe-request-resize.tentative.html | 13+++++++++++++
2 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/css/css-sizing/resources/iframe-contents-request-resize.html b/testing/web-platform/tests/css/css-sizing/resources/iframe-contents-request-resize.html @@ -0,0 +1,17 @@ +<!doctype HTML> +<head> +<style> +* { margin: 0 } +</style> +<meta name="responsive-embedded-sizing"> +</head> +<div id="target"></div> +<script> +window.addEventListener('load', () => { + requestAnimationFrame(() => { + target.style.width = '100px'; + target.style.height = '400px'; + window.requestResize(); + }) +}); +</script> diff --git a/testing/web-platform/tests/css/css-sizing/responsive-iframe-request-resize.tentative.html b/testing/web-platform/tests/css/css-sizing/responsive-iframe-request-resize.tentative.html @@ -0,0 +1,13 @@ +<!doctype HTML> +<title>Test that the `window.requestResize()` resizes the iframe.</title> +<link rel="author" href="mailto:kojii@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-sizing/"> +<link rel="match" href="responsive-iframe-ref.html"> +<style> +iframe { + border: 1px solid black; + contain-intrinsic-size: from-element; +} +</style> +<iframe frameborder=0 src="resources/iframe-contents-request-resize.html"> +</iframe>