tor-browser

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

commit 7c2551ef34a4dd502aa7c9d6028805fb06aaf1c0
parent e39e65e3728419da293edba852580e91ec0ae581
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date:   Tue, 16 Dec 2025 08:45:49 +0000

Bug 2005297 [wpt PR 56641] - [flex] Fix incorrect cache hit., a=testonly

Automatic update from web-platform-tests
[flex] Fix incorrect cache hit.

When we had a flex-item with a specified height in a column flexbox we'd
incorrectly hit the cache when the definiteness changed.

This was incorrect as the definite height may affect the inner flexbox
items (e.g. they'd stretch to the definite height which may be smaller).

Harmonize the flexbox logic with grid. E.g. we'll miss the cache for
these types of definite changes.

This comes at a small performance penalty in speedometer wrt. the
NewsSite workloads in particular (overall -0.1% now).

To somewhat mitigate this performance issue, we can avoid measuring
flex-items in certain cases. See largish comment in patch for details of
this optimization.

Bug: 433909587
Change-Id: I6701e79a67585eb37d98330e1d914d3469ba9f89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6789149
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: David Grogan <dgrogan@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1556847}

--

wpt-commits: df39f9f192958dd22d0116ec57507e8e33c0938a
wpt-pr: 56641

Diffstat:
Atesting/web-platform/tests/css/css-flexbox/relayout-intrinsic-block-size.html | 10++++++++++
Atesting/web-platform/tests/css/css-values/calc-size/calc-size-flex-009.html | 11+++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/css/css-flexbox/relayout-intrinsic-block-size.html b/testing/web-platform/tests/css/css-flexbox/relayout-intrinsic-block-size.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<link rel="help" href="https://crbug.com/433909587"> +<link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> +<p>Test passes if there is a filled green square.</p> +<div style="display: flex; flex-direction: column;"> + <div style="display: flex; height: 100px;"> + <canvas style="background: green;" width=200 height=200></canvas> + </div> + <div></div> +</div> diff --git a/testing/web-platform/tests/css/css-values/calc-size/calc-size-flex-009.html b/testing/web-platform/tests/css/css-values/calc-size/calc-size-flex-009.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#calc-size"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<p>Test passes if there is a filled green square and <strong>no red</strong>. +<div style="display: flex; width: 100px; height: 100px; background: red;"> + <!-- The auto min-size will be min(80px, 50px) == 50px. + Then passed through the calc-size, it'll be 100px. --> + <div style="min-width: calc-size(auto, size * 2); width: 80px; background: green;"> + <div style="width: 50px;"></div> + </div> +</div>