tor-browser

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

commit 4c9c8e567cf3fba4c39b148a4feaf24708b20e34
parent f238f03de7e65eb6d72b53a2f89f5f4f85a6bc75
Author: Rune Lillesveen <futhark@chromium.org>
Date:   Mon, 10 Nov 2025 22:19:11 +0000

Bug 1998892 [wpt PR 55933] - Add flip-x/flip-y tests for anchored(fallback), a=testonly

Automatic update from web-platform-tests
Add flip-x/flip-y tests for anchored(fallback)

The new keywords were introduced for <try-tactic> in
position-try-fallbacks and should be queryable by anchored() queries
too.

Change-Id: I5a6cb05f9779544bcbfbc11660c46e2a0e287ec5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7129979
Auto-Submit: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1541662}

--

wpt-commits: 26d1c29ed2cdd34123dc1c1fdfe8f4a3dd7380ac
wpt-pr: 55933

Diffstat:
Mtesting/web-platform/tests/css/css-anchor-position/container-queries/anchored-fallback-try-tactic.html | 36+++++++++++++++++++++++++++++++++++-
Mtesting/web-platform/tests/css/css-anchor-position/container-queries/at-container-anchored-parsing.html | 1+
2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/testing/web-platform/tests/css/css-anchor-position/container-queries/anchored-fallback-try-tactic.html b/testing/web-platform/tests/css/css-anchor-position/container-queries/anchored-fallback-try-tactic.html @@ -25,15 +25,26 @@ #a2 { position-try-fallbacks: flip-inline flip-block; } - #t1, #t2 { + #a3 { + position-try-fallbacks: flip-x flip-y; + } + #t1, #t2, #t3 { --flip-block: no; --flip-inline: no; --flip-inline-block: no; --flip-block-inline: no; + --flip-x: no; + --flip-y: no; + --flip-x-y: no; + --flip-y-x: no; @container anchored(fallback: flip-block) { --flip-block: yes; } @container anchored(fallback: flip-inline) { --flip-inline: yes; } @container anchored(fallback: flip-inline flip-block) { --flip-inline-block: yes; } @container anchored(fallback: flip-block flip-inline) { --flip-block-inline: yes; } + @container anchored(fallback: flip-x) { --flip-x: yes; } + @container anchored(fallback: flip-y) { --flip-y: yes; } + @container anchored(fallback: flip-x flip-y) { --flip-x-y: yes; } + @container anchored(fallback: flip-y flip-x) { --flip-y-x: yes; } } </style> <div id="anchor"></div> @@ -43,6 +54,9 @@ <div id="a2" class="anchored"> <div id="t2"></div> </div> +<div id="a3" class="anchored"> + <div id="t3"></div> +</div> <script> test(() => { const style = getComputedStyle(t1); @@ -50,6 +64,10 @@ assert_equals(style.getPropertyValue("--flip-inline"), "no"); assert_equals(style.getPropertyValue("--flip-inline-block"), "no"); assert_equals(style.getPropertyValue("--flip-block-inline"), "no"); + assert_equals(style.getPropertyValue("--flip-x"), "no"); + assert_equals(style.getPropertyValue("--flip-y"), "no"); + assert_equals(style.getPropertyValue("--flip-x-y"), "no"); + assert_equals(style.getPropertyValue("--flip-y-x"), "no"); }, "@container anchored(fallback) matching flip-block"); test(() => { @@ -58,5 +76,21 @@ assert_equals(style.getPropertyValue("--flip-inline"), "no"); assert_equals(style.getPropertyValue("--flip-inline-block"), "yes"); assert_equals(style.getPropertyValue("--flip-block-inline"), "no"); + assert_equals(style.getPropertyValue("--flip-x"), "no"); + assert_equals(style.getPropertyValue("--flip-y"), "no"); + assert_equals(style.getPropertyValue("--flip-x-y"), "no"); + assert_equals(style.getPropertyValue("--flip-y-x"), "no"); }, "@container anchored(fallback) matching flip-inline flip-block"); + + test(() => { + const style = getComputedStyle(t3); + assert_equals(style.getPropertyValue("--flip-block"), "no"); + assert_equals(style.getPropertyValue("--flip-inline"), "no"); + assert_equals(style.getPropertyValue("--flip-inline-block"), "no"); + assert_equals(style.getPropertyValue("--flip-block-inline"), "no"); + assert_equals(style.getPropertyValue("--flip-x"), "no"); + assert_equals(style.getPropertyValue("--flip-y"), "no"); + assert_equals(style.getPropertyValue("--flip-x-y"), "yes"); + assert_equals(style.getPropertyValue("--flip-y-x"), "no"); + }, "@container anchored(fallback) matching flip-x flip-y"); </script> diff --git a/testing/web-platform/tests/css/css-anchor-position/container-queries/at-container-anchored-parsing.html b/testing/web-platform/tests/css/css-anchor-position/container-queries/at-container-anchored-parsing.html @@ -12,6 +12,7 @@ test_cq_condition_known('anchored(fallback: none)'); test_cq_condition_known('(anchored(fallback: inline-start block-end))'); test_cq_condition_known('anchored(not ((fallback: --foo) or (fallback: --bar flip-inline)))'); + test_cq_condition_known('anchored(fallback: flip-x flip-y flip-start flip-block flip-inline)'); test_cq_condition_unknown('anchored(fallback < none)'); test_cq_condition_unknown('anchored((fallback = none))');