Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: cf865e9c2ded23352aa31f4625e0049a0a739cb8 https://github.com/WebKit/WebKit/commit/cf865e9c2ded23352aa31f4625e0049a0a739cb8 Author: Antoine Quint <grao...@webkit.org> Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/column-rule-color-001-expected.txt M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/to-color-change-expected.txt M Source/WebCore/animation/KeyframeEffect.cpp M Source/WebCore/animation/KeyframeEffect.h M Source/WebCore/animation/KeyframeEffectStack.cpp M Source/WebCore/style/StyleResolver.cpp M Source/WebCore/style/StyleResolver.h Log Message: ----------- [web-animations] keyframes should be recomputed when the "currentcolor" value is used https://bugs.webkit.org/show_bug.cgi?id=251491 Reviewed by Antti Koivisto. Keyframes can set any number of color-related properties to use `currentcolor`. We need to recompute keyframes if the value to which `currentcolor` would resolve changes during an animation. To that end, we keep track of properties set to `currentcolor` on keyframes, and recompute the keyframes if we find that `RenderStyle::color()` has changed during style resolution. In the case where one of those properties is the `color` property, the relevant value is not the style's value, but the parent style's value. In this case, which is bound to be rather rare, we elect to always recompute keyframes. * LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/column-rule-color-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/to-color-change-expected.txt: * Source/WebCore/animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::updateBlendingKeyframes): (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes): (WebCore::KeyframeEffect::hasPropertySetToCurrentColor const): (WebCore::KeyframeEffect::hasColorSetToCurrentColor const): * Source/WebCore/animation/KeyframeEffect.h: * Source/WebCore/animation/KeyframeEffectStack.cpp: (WebCore::KeyframeEffectStack::applyKeyframeEffects): * Source/WebCore/style/StyleResolver.cpp: (WebCore::Style::Resolver::keyframeStylesForAnimation): * Source/WebCore/style/StyleResolver.h: Canonical link: https://commits.webkit.org/259736@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes