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

Unified Diff: Source/core/animation/KeyframeEffect.cpp

Issue 1196913005: Implement animations for Independent CSS Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix rotate-interpolation test Created 5 years, 6 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 | « Source/core/animation/DoubleStyleInterpolation.cpp ('k') | Source/core/animation/StringKeyframe.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/KeyframeEffect.cpp
diff --git a/Source/core/animation/KeyframeEffect.cpp b/Source/core/animation/KeyframeEffect.cpp
index fcf364a1ed5817ef5777f49f5131967e6a63eb0a..0afa07e9837f71cf7e403be29b4d57eaf5ac9465 100644
--- a/Source/core/animation/KeyframeEffect.cpp
+++ b/Source/core/animation/KeyframeEffect.cpp
@@ -136,9 +136,13 @@ void KeyframeEffect::applyEffects()
if (!m_target || !m_model)
return;
- // Cancel composited animation of transform if a motion path has been introduced on the element.
+ // Cancel composited animation of transform if a motion path, translate,
+ // rotate or scale operation has been introduced on the element.
if (m_target->computedStyle()
- && m_target->computedStyle()->hasMotionPath()
+ && (m_target->computedStyle()->hasMotionPath()
+ || m_target->computedStyle()->translate()
+ || m_target->computedStyle()->rotate()
+ || m_target->computedStyle()->scale())
&& animation()->hasActiveAnimationsOnCompositor()
&& animation()->affects(*m_target, CSSPropertyTransform)) {
animation()->cancelAnimationOnCompositor();
@@ -242,7 +246,7 @@ bool KeyframeEffect::isCandidateForAnimationOnCompositor(double animationPlaybac
{
if (!model()
|| !m_target
- || (m_target->computedStyle() && m_target->computedStyle()->hasMotionPath()))
+ || (m_target->computedStyle() && (m_target->computedStyle()->hasMotionPath() || m_target->computedStyle()->translate() || m_target->computedStyle()->rotate() || m_target->computedStyle()->scale())))
return false;
return CompositorAnimations::instance()->isCandidateForAnimationOnCompositor(specifiedTiming(), *m_target, animation(), *model(), animationPlaybackRate);
« no previous file with comments | « Source/core/animation/DoubleStyleInterpolation.cpp ('k') | Source/core/animation/StringKeyframe.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698