Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 1347493004: Recomposite transform animations when CSS zoom changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix tests Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/virtual/threaded/animations/zoom-responsive-transform-animation-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/css/CSSAnimations.cpp
diff --git a/Source/core/animation/css/CSSAnimations.cpp b/Source/core/animation/css/CSSAnimations.cpp
index b6e38541be9178181b1c81aa14f2879ab4c3cd7f..9569be47afe786ef7e81aefb6cbf7f2de367eb62 100644
--- a/Source/core/animation/css/CSSAnimations.cpp
+++ b/Source/core/animation/css/CSSAnimations.cpp
@@ -228,6 +228,8 @@ void CSSAnimations::calculateCompositorAnimationUpdate(CSSAnimationUpdate& updat
return;
const ComputedStyle& oldStyle = *animatingElement->layoutObject()->style();
+ if (!oldStyle.shouldCompositeForCurrentAnimations())
+ return;
CSSAnimations& cssAnimations = elementAnimations->cssAnimations();
for (auto& runningAnimation : cssAnimations.m_animations.values()) {
@@ -241,6 +243,20 @@ void CSSAnimations::calculateCompositorAnimationUpdate(CSSAnimationUpdate& updat
}
}
}
+
+ if (oldStyle.hasCurrentTransformAnimation() && oldStyle.effectiveZoom() != style.effectiveZoom()) {
+ for (auto& entry : elementAnimations->animations()) {
+ Animation& animation = *entry.key;
+ if (animation.effect() && animation.effect()->isKeyframeEffect()) {
+ EffectModel* model = toKeyframeEffect(animation.effect())->model();
+ if (model && model->isKeyframeEffectModel()) {
+ KeyframeEffectModelBase* keyframeEffect = toKeyframeEffectModelBase(model);
+ if (keyframeEffect->affects(PropertyHandle(CSSPropertyTransform)) && keyframeEffect->snapshotAllCompositorKeyframes(element, &style))
+ update.updateCompositorKeyframes(&animation);
+ }
+ }
+ }
+ }
}
void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate& update, const Element* animatingElement, Element& element, const ComputedStyle& style, ComputedStyle* parentStyle, StyleResolver* resolver)
« no previous file with comments | « LayoutTests/virtual/threaded/animations/zoom-responsive-transform-animation-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698