Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[web-animations] keyframes should be recomputed when the "currentcolo…
…r" 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
- Loading branch information
Showing
7 changed files
with
46 additions
and
11 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...d/w3c/web-platform-tests/css/css-animations/responsive/column-rule-color-001-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL column-rule-color responds to currentColor changes assert_equals: expected "rgb(0, 30, 30)" but got "rgb(30, 30, 0)" | ||
PASS column-rule-color responds to currentColor changes | ||
PASS column-rule-color responds to inherited changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters