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

Unified Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 73643004: Web Animations: Extract an API for servicing animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Switch to references for non-null params. Created 7 years, 1 month 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/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 096dbd4a3a45f7c0e5a2ffd84196b0e9b1e1ad91..430d8e33b2cdc14ab972fd24ba1f6dbc14138de4 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -29,9 +29,7 @@
#include "RuntimeEnabledFeatures.h"
#include "StylePropertyShorthand.h"
#include "bindings/v8/ExceptionState.h"
-#include "core/animation/ActiveAnimations.h"
-#include "core/animation/AnimationClock.h"
-#include "core/animation/DocumentTimeline.h"
+#include "core/animation/DocumentAnimations.h"
#include "core/css/BasicShapeFunctions.h"
#include "core/css/CSSArrayFunctionValue.h"
#include "core/css/CSSAspectRatioValue.h"
@@ -1625,13 +1623,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
// If a compositor animation is running we may need to service animations
// in order to generate an up to date value.
- if (RuntimeEnabledFeatures::webAnimationsCSSEnabled() && styledNode->isElementNode()) {
- const Element* element = toElement(styledNode);
- if (const ActiveAnimations* activeAnimations = element->activeAnimations()) {
- if (activeAnimations->hasActiveAnimationsOnCompositor(propertyID))
- document.serviceAnimations(monotonicallyIncreasingTime());
- }
- }
+ DocumentAnimations::serviceBeforeGetComputedStyle(*styledNode, propertyID);
document.updateStyleForNodeIfNeeded(styledNode);

Powered by Google App Engine
This is Rietveld 408576698