tor-browser

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

commit ddc5c1148992d6eb2f812b732fd89bfdfd388fb3
parent db64aa013c261a50efc38e0f62d12cbcffc50cbf
Author: Diego Escalante <descalante@mozilla.com>
Date:   Thu,  2 Oct 2025 12:51:57 +0000

Bug 1991007 - Add wpt to test invalidating :is() in non-subject compound. r=dshin

Differential Revision: https://phabricator.services.mozilla.com/D267091

Diffstat:
Mtesting/web-platform/tests/css/selectors/invalidation/is.html | 22++++++++++++++++++++++
1 file changed, 22 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/css/selectors/invalidation/is.html b/testing/web-platform/tests/css/selectors/invalidation/is.html @@ -45,6 +45,10 @@ .c>.e { color: black; } + /* Non-Subject Compound */ + .a:is(.b *) .c{ + color: blue; + } </style> </head> <body> @@ -82,6 +86,15 @@ Red </div> </div> + <div id=b4> + <div> + <div class=a> + <div class=c id="c3"> + Blue + </div> + </div> + </div> + </div> <script> document.body.offsetTop; @@ -134,6 +147,15 @@ assert_equals(getComputedStyle(b2).color, blue); assert_equals(getComputedStyle(h1).color, blue); }, "Test specificity of :is()."); + + test(() => { + b4.className = "b"; + assert_equals(getComputedStyle(c3).color, blue); + b4.className = ""; + assert_equals(getComputedStyle(c3).color, red); + b4.className = "b"; + assert_equals(getComputedStyle(c3).color, blue); + }, "Invalidate :is() in non-subject compound"); </script> </body> </html>