From d856e104fb6cfcaa14c4cc8cd92cd564baaf8e4e Mon Sep 17 00:00:00 2001 From: "paroga@webkit.org" Date: Wed, 11 Sep 2013 20:18:15 +0000 Subject: [PATCH] Fix animations with !USE(ACCELERATED_COMPOSITING) after r147792. https://bugs.webkit.org/show_bug.cgi?id=121159 Reviewed by Simon Fraser. CSSPropertyAnimation::blendProperties() is available always and needs to be called to make the animations work. * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::animate): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::animate): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155556 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 15 +++++++++++++++ .../WebCore/page/animation/ImplicitAnimation.cpp | 2 +- .../WebCore/page/animation/KeyframeAnimation.cpp | 3 ++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 9bc1e18767e..5a4de106e4a 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2013-09-11 Patrick Gansterer + + Fix animations with !USE(ACCELERATED_COMPOSITING) after r147792. + https://bugs.webkit.org/show_bug.cgi?id=121159 + + Reviewed by Simon Fraser. + + CSSPropertyAnimation::blendProperties() is available always + and needs to be called to make the animations work. + + * page/animation/ImplicitAnimation.cpp: + (WebCore::ImplicitAnimation::animate): + * page/animation/KeyframeAnimation.cpp: + (WebCore::KeyframeAnimation::animate): + 2013-09-11 David Hyatt Move all collapsing margin code out of RenderBlock and into RenderBlockFlow. diff --git a/Source/WebCore/page/animation/ImplicitAnimation.cpp b/Source/WebCore/page/animation/ImplicitAnimation.cpp index 8b253084545..2e5402e1814 100644 --- a/Source/WebCore/page/animation/ImplicitAnimation.cpp +++ b/Source/WebCore/page/animation/ImplicitAnimation.cpp @@ -77,10 +77,10 @@ void ImplicitAnimation::animate(CompositeAnimation*, RenderObject*, const Render if (!animatedStyle) animatedStyle = RenderStyle::clone(targetStyle); -#if USE(ACCELERATED_COMPOSITING) bool needsAnim = CSSPropertyAnimation::blendProperties(this, m_animatingProperty, animatedStyle.get(), m_fromStyle.get(), m_toStyle.get(), progress(1, 0, 0)); // FIXME: we also need to detect cases where we have to software animate for other reasons, // such as a child using inheriting the transform. https://bugs.webkit.org/show_bug.cgi?id=23902 +#if USE(ACCELERATED_COMPOSITING) if (!needsAnim) // If we are running an accelerated animation, set a flag in the style which causes the style // to compare as different to any other style. This ensures that changes to the property diff --git a/Source/WebCore/page/animation/KeyframeAnimation.cpp b/Source/WebCore/page/animation/KeyframeAnimation.cpp index ef068e95391..4782e0a00b4 100644 --- a/Source/WebCore/page/animation/KeyframeAnimation.cpp +++ b/Source/WebCore/page/animation/KeyframeAnimation.cpp @@ -184,8 +184,9 @@ void KeyframeAnimation::animate(CompositeAnimation* compositeAnimation, RenderOb const RenderStyle* toStyle = 0; double progress = 0.0; fetchIntervalEndpointsForProperty(*it, fromStyle, toStyle, progress); -#if USE(ACCELERATED_COMPOSITING) + bool needsAnim = CSSPropertyAnimation::blendProperties(this, *it, animatedStyle.get(), fromStyle, toStyle, progress); +#if USE(ACCELERATED_COMPOSITING) if (!needsAnim) // If we are running an accelerated animation, set a flag in the style // to indicate it. This can be used to make sure we get an updated -- GitLab