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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 1281493004: Make CSSAnimationUpdate stack-allocated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 50f7ddd9d5dc6d439de33d0130e9fd31c4123e7a..24f33e43b567dac6bc5fb43f94217aca69500a74 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -95,8 +95,8 @@ void setAnimationUpdateIfNeeded(StyleResolverState& state, Element& element)
{
// If any changes to CSS Animations were detected, stash the update away for application after the
// layout object is updated if we're in the appropriate scope.
- if (state.animationUpdate())
- element.ensureElementAnimations().cssAnimations().setPendingUpdate(state.takeAnimationUpdate());
+ if (!state.animationUpdate().isEmpty())
+ element.ensureElementAnimations().cssAnimations().copy(state.animationUpdate());
}
} // namespace
@@ -926,12 +926,12 @@ bool StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Ele
&& !state.style()->transitions() && !state.style()->animations())
return false;
- state.setAnimationUpdate(CSSAnimations::calculateUpdate(animatingElement, *element, *state.style(), state.parentStyle(), this));
- if (!state.animationUpdate())
+ CSSAnimations::calculateUpdate(animatingElement, *element, *state.style(), state.parentStyle(), state.animationUpdate(), this);
+ if (state.animationUpdate().isEmpty())
return false;
- const ActiveInterpolationMap& activeInterpolationsForAnimations = state.animationUpdate()->activeInterpolationsForAnimations();
- const ActiveInterpolationMap& activeInterpolationsForTransitions = state.animationUpdate()->activeInterpolationsForTransitions();
+ const ActiveInterpolationMap& activeInterpolationsForAnimations = state.animationUpdate().activeInterpolationsForAnimations();
+ const ActiveInterpolationMap& activeInterpolationsForTransitions = state.animationUpdate().activeInterpolationsForTransitions();
applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsForAnimations);
applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsForTransitions);

Powered by Google App Engine
This is Rietveld 408576698