Skip to content

Commit 90767fd

Browse files
lilleschromium-wpt-export-bot
authored andcommitted
Use TreeCountingChecker in scale interpolations
Invalidate scale interpolation for tree counting function changes on DOM mutations. Also change TreeCountingChecker to take a CSSLengthResolver instead of a StyleResolverState. Bug: 415626999 Change-Id: I7a9ca34f87a6ce3b36df3cf30eb40c4637ae19aa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6534157 Reviewed-by: Anders Hartvoll Ruud Commit-Queue: Rune Lillesveen Cr-Commit-Position: refs/heads/main@{#1459320}
1 parent 9b5c726 commit 90767fd

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
>
2+
<title>CSS Values and Units Test: sibling-index() changing scale() during @keyframes animationtitle>
3+
<link rel="help" href="https://drafts.csswg.org/css-values-5/#tree-counting">
4+
<script src="/resources/testharness.js">script>
5+
<script src="/resources/testharnessreport.js">script>
6+
<style>
7+
@keyframes --anim {
8+
from {
9+
scale: 0.7 calc(0.2 * sibling-index());
10+
}
11+
to {
12+
scale: 0.3 2;
13+
}
14+
}
15+
#target {
16+
animation: --anim 1000s step-end;
17+
}
18+
style>
19+
<div>
20+
<div id="rm">div>
21+
<div>div>
22+
<div id="target">div>
23+
div>
24+
<script>
25+
test(() => {
26+
assert_equals(getComputedStyle(target).scale, "0.7 0.6");
27+
}, "Initially, the sibling-index() is 3 for #target");
28+
29+
test(() => {
30+
rm.remove();
31+
assert_equals(getComputedStyle(target).scale, "0.7 0.4");
32+
}, "Removing a preceding sibling of #target reduces the sibling-index()");
33+
34+
script>

0 commit comments

Comments
 (0)