[Webkit-unassigned] [Bug 248338] New: [web-animations] opacity should use unclamped values for from/to keyframes with iterationComposite
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 25 02:01:06 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=248338
Bug ID: 248338
Summary: [web-animations] opacity should use unclamped values
for from/to keyframes with iterationComposite
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Animations
Assignee: webkit-unassigned at lists.webkit.org
Reporter: graouts at webkit.org
CC: dino at apple.com, graouts at apple.com
We're failing one last test in web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html:
test(t => {
const div = createDiv(t);
const anim =
div.animate({ opacity: [0, 0.4] },
{ duration: 100 * MS_PER_SEC,
easing: 'linear',
iterations: 10,
iterationComposite: 'accumulate' });
anim.pause();
anim.currentTime = anim.effect.getComputedTiming().duration / 2;
assert_equals(getComputedStyle(div).opacity, '0.2',
'Animated opacity style at 50s of the first iteration');
anim.currentTime = anim.effect.getComputedTiming().duration * 2;
assert_equals(getComputedStyle(div).opacity, '0.8',
'Animated opacity style at 0s of the third iteration');
anim.currentTime += anim.effect.getComputedTiming().duration / 2;
assert_equals(getComputedStyle(div).opacity, '1', // (0.8 + 1.2) * 0.5
'Animated opacity style at 50s of the third iteration');
}, 'iteration composition of opacity animation');
We fail the final assertion because we actually blending between 0.8 and 1.0. Indeed, when we compute the from/to keyframe when iterationComposite is set to "accumulate", we go through the blending code and this will lead to the RenderStyle methods to be called to set the property value on the keyframe styles, which clamps the values to the valid [0-1] range, thus not allowing us to set 1.2.
For types that are backed by numeric values that don't require special accumulation blending rules, we should use some simple math to implement iterationComposite instead of going through the blending code.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221125/22299302/attachment.htm>
More information about the webkit-unassigned
mailing list