Skip to content

Commit 13c6c36

Browse files
lilleschromium-wpt-export-bot
authored andcommitted
Use TreeCountingChecker for rotate interpolations
Coincidentally fixing 384966232 by passing a proper CSSLengthResolver Bug: 415626999, 384966232 Change-Id: Ifa60457e219816e10207977f28b749c85fc8736f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6543093 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Rune Lillesveen <[email protected]> Cr-Commit-Position: refs/heads/main@{#1460561}
1 parent 371bb0b commit 13c6c36

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<title>CSS Values and Units Test: sibling-index() changing rotate during @keyframes animation</title>
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+
rotate: x calc(10deg * sibling-index());
10+
}
11+
to {
12+
rotate: x 90deg;
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).rotate, "x 30deg");
27+
}, "Initially, the sibling-index() is 3 for #target");
28+
29+
test(() => {
30+
rm.remove();
31+
assert_equals(getComputedStyle(target).rotate, "x 20deg");
32+
}, "Removing a preceding sibling of #target reduces the sibling-index()");
33+
34+
</script>

css/css-values/tree-counting/sibling-index-keyframe-scale-dynamic.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<title>CSS Values and Units Test: sibling-index() changing scale() during @keyframes animation</title>
2+
<title>CSS Values and Units Test: sibling-index() changing scale during @keyframes animation</title>
33
<link rel="help" href="https://drafts.csswg.org/css-values-5/#tree-counting">
44
<script src="/resources/testharness.js"></script>
55
<script src="/resources/testharnessreport.js"></script>

0 commit comments

Comments
 (0)