tor-browser

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

commit 8162319c2c1dca6a63b2b18dc72a80ac4cb06c5c
parent 97a1c1ad5ac0b165831cf1eeb5e7c52fa66cfefb
Author: Rune Lillesveen <futhark@chromium.org>
Date:   Tue, 21 Oct 2025 10:35:09 +0000

Bug 1994987 [wpt PR 55507] - Reland "Pull SVG animations in from corresponding element", a=testonly

Automatic update from web-platform-tests
Reland "Pull SVG animations in from corresponding element"

This is a reland of commit c7bfc45b12691bd03ca68444235146c382979e68

The original CL added a CHECK for Svg2CascadeEnabled() which turned out
not to be met in the case where the following occurs:

1. Nested CSS transitions happen in a use instantiation tree for an
   inherited property
2. A separate after-change style is enforced in order to get the
   correctly inherited after-change style into the inner transitioned
   element from the ancestor element that does a transition
3. This results in StyleResolver::ResolveBaseStyle() being called for
   the instantiated <use> tree element instead of for the corresponding
   element which normally happens via
   SVGElement::CustomStyleForElement() when Svg2Cascade is not enabled.

This is strictly a bug in the after-change style machinery, which will
no longer be an issue once Svg2Cascade is enabled.

This reland instead does an if-test for Svg2Cascade and adds a crash
test.

Original change's description:
> Pull SVG animations in from corresponding element
>
> Strictly, SVG animations should run in the <use> instance subtrees when
> cloned. For Svg2Cascade, we continue to apply animations from the
> corresponding elements for now.
>
> Bug: 40550039
>
> Change-Id: Idb7831f4b7f4b8cd0687c19d32dc066a6374c49e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7031940
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Commit-Queue: Rune Lillesveen <futhark@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1529979}

Bug: 40550039
Change-Id: Iebc2145d5602b599f67c7f222208d8649b4ccf57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7053482
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1531365}

--

wpt-commits: 884d014f2f8ca3abdfd28e69d958da935836763e
wpt-pr: 55507

Diffstat:
Atesting/web-platform/tests/svg/crashtests/chrome-bug-452651700.html | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/svg/crashtests/chrome-bug-452651700.html b/testing/web-platform/tests/svg/crashtests/chrome-bug-452651700.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<link rel="help" href="https://crbug.com/452651700"> +<svg> + <circle id="a" cx="120" cy="120" r="15" style="transition:fill 1s" /> + <use id="use" style="fill:red;transition:fill 1s" href="#a" x="30" y="0"/> +</svg> +<script> + document.body.offsetTop; + use.style.fill = "green"; +</script>