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

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

Issue 15405006: Modify AnimationEffect::sample() to return a CompositableValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix rebase Created 7 years, 7 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/core.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index e2885a7a53b88f62402f8da6db68841530a1cfb8..e1b199a7e66b01c689d29fb2e235e21fdbcdefd9 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -36,6 +36,7 @@
#include "UserAgentStyleSheets.h"
#include "WebKitFontFamilyNames.h"
#include "XMLNames.h"
+#include "core/animation/AnimatableValue.h"
#include "core/animation/Animation.h"
#include "core/css/CSSBorderImage.h"
#include "core/css/CSSCalculationValue.h"
@@ -1842,28 +1843,28 @@ void StyleResolver::applyAnimatedProperties(const Element* target)
for (size_t i = 0; i < animations->size(); ++i) {
RefPtr<Animation> animation = animations->at(i);
- RefPtr<StylePropertySet> properties = animation->cachedStyle();
- for (unsigned j = 0; j < properties->propertyCount(); ++j) {
- StylePropertySet::PropertyReference current = properties->propertyAt(j);
- CSSPropertyID property = current.id();
+ const AnimationEffect::CompositableValueMap* compositableValues = animation->compositableValues();
+ for (AnimationEffect::CompositableValueMap::const_iterator iter = compositableValues->begin(); iter != compositableValues->end(); ++iter) {
+ CSSPropertyID property = iter->key;
+ // FIXME: Composite onto the underlying value.
+ RefPtr<CSSValue> value = iter->value->composite(AnimatableValue()).toCSSValue();
switch (pass) {
case VariableDefinitions:
ASSERT_NOT_REACHED();
continue;
case HighPriorityProperties:
if (property < CSSPropertyLineHeight)
- applyProperty(current.id(), current.value());
+ applyProperty(property, value.get());
else if (property == CSSPropertyLineHeight)
- m_state.setLineHeightValue(current.value());
+ m_state.setLineHeightValue(value.get());
continue;
case LowPriorityProperties:
if (property > CSSPropertyLineHeight)
- applyProperty(current.id(), current.value());
+ applyProperty(property, value.get());
continue;
}
}
}
-
}
template <StyleResolver::StyleApplicationPass pass>
« no previous file with comments | « Source/core/core.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698