Chromium Code Reviews| Index: Source/core/css/resolver/ScopedStyleResolver.cpp |
| diff --git a/Source/core/css/resolver/ScopedStyleResolver.cpp b/Source/core/css/resolver/ScopedStyleResolver.cpp |
| index e3ccf263ce89cf6f8297b15c27800358541f6a8d..2c32814672aeab19d3ae31d0bb5c4b9a06d9b242 100644 |
| --- a/Source/core/css/resolver/ScopedStyleResolver.cpp |
| +++ b/Source/core/css/resolver/ScopedStyleResolver.cpp |
| @@ -90,23 +90,38 @@ void ScopedStyleResolver::resetAuthorStyle() |
| m_keyframesRuleMap.clear(); |
| } |
| -const StyleRuleKeyframes* ScopedStyleResolver::keyframeStylesForAnimation(const StringImpl* animationName) |
| +const StyleRuleKeyframes* ScopedStyleResolver::keyframeStylesForAnimation(const StringImpl* animationName) const |
| { |
| if (m_keyframesRuleMap.isEmpty()) |
| return 0; |
| - KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(animationName); |
| + KeyframesRuleMap::const_iterator it = m_keyframesRuleMap.find(animationName); |
| if (it == m_keyframesRuleMap.end()) |
| return 0; |
| return it->value.get(); |
| } |
| +PassRefPtrWillBeRawPtr<StyleRuleKeyframes> ScopedStyleResolver::keyframeStylesForAnimation(const StringImpl* animationName) |
| +{ |
| + if (m_keyframesRuleMap.isEmpty()) |
| + return nullptr; |
| + |
| + KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(animationName); |
| + if (it == m_keyframesRuleMap.end()) |
| + return nullptr; |
| + |
| + return it->value; |
| +} |
| + |
| void ScopedStyleResolver::addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyframes> rule) |
| { |
| AtomicString s(rule->name()); |
| + |
| + rule->styleChanged(); |
|
dstockwell
2015/01/05 07:31:18
I think on Friday we discussed that we need to cal
shend
2015/01/06 00:36:17
Modifying the style of an existing keyframe seems
dstockwell
2015/01/07 00:18:33
Hmm, but how does that work?
shend
2015/01/08 05:05:29
I'm not exactly sure, but if you follow the call t
dstockwell
2015/01/08 05:27:24
Ahh, I see! I think I misunderstood the purpose of
|
| + |
| if (rule->isVendorPrefixed()) { |
| - KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(rule->name().impl()); |
| + KeyframesRuleMap::iterator it = m_keyframesRuleMap.find(s.impl()); |
| if (it == m_keyframesRuleMap.end()) |
| m_keyframesRuleMap.set(s.impl(), rule); |
| else if (it->value->isVendorPrefixed()) |