tor-browser

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

commit d926c9822c0520469452e36b99d7b2ef649321c8
parent e8ca07b12974bc0dfb339b34f746d86d4c742deb
Author: Koji Ishii <kojii@chromium.org>
Date:   Thu, 27 Nov 2025 15:15:55 +0000

Bug 2002476 [wpt PR 56287] - [iframe] Support the fallback sizing, a=testonly

Automatic update from web-platform-tests
[iframe] Support the fallback sizing

This patch adds layout support for the fallback sizing.

No behavior changes as all changes are under a runtime flag.

Bug: 418397278
Change-Id: Ice2b5d2eafcae3561d7f18ce7978827aee94064d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7203483
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1550247}

--

wpt-commits: 7ffb48edfa87acbb4f7ee29685cb6529c8752f31
wpt-pr: 56287

Diffstat:
Atesting/web-platform/tests/css/css-sizing/responsive-iframe/resources/iframe-contents-slow.html | 19+++++++++++++++++++
Atesting/web-platform/tests/css/css-sizing/responsive-iframe/responsive-iframe-fallback.tentative.html | 28++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/css/css-sizing/responsive-iframe/resources/iframe-contents-slow.html b/testing/web-platform/tests/css/css-sizing/responsive-iframe/resources/iframe-contents-slow.html @@ -0,0 +1,19 @@ +<!doctype HTML> +<head> +<style> +* { margin: 0 } +</style> +<meta name="responsive-embedded-sizing"> +<script> +// Force a sleep for 0.5 second, to make sure the rest of the parsing is done +// via a timer. +const start = new Date().getTime(); +while (true) { + const now = new Date().getTime(); + if (now - start > 500) { + break; + } +} +</script> +</head> +<div style="width: 100px; height: 400px"></div> diff --git a/testing/web-platform/tests/css/css-sizing/responsive-iframe/responsive-iframe-fallback.tentative.html b/testing/web-platform/tests/css/css-sizing/responsive-iframe/responsive-iframe-fallback.tentative.html @@ -0,0 +1,28 @@ +<!doctype HTML> +<title>Test that the fallback size is used.</title> +<link rel="author" href="mailto:kojii@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-sizing/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +iframe { + border: none; + contain-intrinsic-block-size: from-element 100px; +} +</style> +<iframe id=target frameborder=0 src="resources/iframe-contents-slow.html"></iframe> +<script> +async_test(t => { + window.addEventListener('DOMContentLoaded', t.step_func(e => { + requestAnimationFrame(t.step_func(() => { + assert_equals(target.offsetHeight, 100); + })); + })); + window.addEventListener('load', t.step_func(e => { + requestAnimationFrame(t.step_func(() => { + assert_equals(target.offsetHeight, 400); + t.done(); + })); + })); +}, "The fallback size is used"); +</script>