- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.7k
Animation not updated when Container Query units are used #52296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Animation not updated when Container Query units are used #52296
Conversation
| EWS run on previous version of this PR (hash 07ab8b8) 
 | 
07ab8b8    to
    76497b2      
    Compare
  
    | EWS run on previous version of this PR (hash 76497b2) | 
76497b2    to
    142e675      
    Compare
  
    | EWS run on current version of this PR (hash 142e675) | 
| if (keyframeEffect && keyframeEffect->blendingKeyframes().usesContainerUnits()) | ||
| cssAnimation->keyframesRuleDidChange(); | ||
| for (auto& animation : *animations) { | ||
| RefPtr keyframeEffect = dynamicDowncast<KeyframeEffect>(animation->effect()); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be sure, effect() here can return a variety of types? (We always seem to dynamicDowncast to KeyframeEffect.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The effect() method returns an AnimationEffect, current subclasses are KeyframeEffect and CustomEffect (experimental at this stage).
https://bugs.webkit.org/show_bug.cgi?id=299952 rdar://162194744 Reviewed by Antti Koivisto and Anne van Kesteren. Recompute keyframes when container query units are used for all types of animations, not just CSS Animations. * LayoutTests/imported/w3c/web-platform-tests/css/css-conditional/container-queries/container-units-animation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-conditional/container-queries/container-units-animation.html: * Source/WebCore/animation/CSSAnimation.cpp: (WebCore::CSSAnimation::keyframesRuleDidChange): * Source/WebCore/animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::recomputeKeyframesAtNextOpportunity): (WebCore::KeyframeEffect::keyframesRuleDidChange): Deleted. * Source/WebCore/animation/KeyframeEffect.h: * Source/WebCore/style/Styleable.cpp: (WebCore::Styleable::queryContainerDidChange const): Canonical link: https://commits.webkit.org/301584@main
142e675    to
    1fab171      
    Compare
  
    | Committed 301584@main (1fab171): https://commits.webkit.org/301584@main Reviewed commits have been landed. Closing PR #52296 and removing active labels. | 
 🛠 ios-apple
 🛠 ios-apple 🧪 mac-intel-wk2
 🧪 mac-intel-wk2
1fab171
142e675
🧪 win-tests🧪 api-ios