Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 void copyToCompositableValueMap(const AnimationEffect::CompositableValueMap* sou rce, AnimationEffect::CompositableValueMap& target) | 40 void copyToCompositableValueMap(const AnimationEffect::CompositableValueMap* sou rce, AnimationEffect::CompositableValueMap& target) |
| 41 { | 41 { |
| 42 if (!source) | 42 if (!source) |
| 43 return; | 43 return; |
| 44 for (AnimationEffect::CompositableValueMap::const_iterator iter = source->be gin(); iter != source->end(); ++iter) | 44 for (AnimationEffect::CompositableValueMap::const_iterator iter = source->be gin(); iter != source->end(); ++iter) |
| 45 target.set(iter->key, iter->value); | 45 target.set(iter->key, iter->value); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace | 48 } // namespace |
| 49 | 49 |
| 50 bool AnimationStack::affects(CSSPropertyID property) const | |
| 51 { | |
| 52 for (size_t i = 0; i < m_activeAnimations.size(); ++i) | |
|
Steve Block
2013/11/18 05:03:03
Needs braces
dstockwell
2013/11/18 05:30:34
Done.
| |
| 53 if (m_activeAnimations[i]->affects(property)) | |
| 54 return true; | |
| 55 return false; | |
| 56 } | |
| 57 | |
| 50 AnimationEffect::CompositableValueMap AnimationStack::compositableValues(const A nimationStack* animationStack, const Vector<InertAnimation*>* newAnimations, con st HashSet<const Player*>* cancelledPlayers, Animation::Priority priority) | 58 AnimationEffect::CompositableValueMap AnimationStack::compositableValues(const A nimationStack* animationStack, const Vector<InertAnimation*>* newAnimations, con st HashSet<const Player*>* cancelledPlayers, Animation::Priority priority) |
| 51 { | 59 { |
| 52 AnimationEffect::CompositableValueMap result; | 60 AnimationEffect::CompositableValueMap result; |
| 53 | 61 |
| 54 if (animationStack) { | 62 if (animationStack) { |
| 55 const Vector<Animation*>& animations = animationStack->m_activeAnimation s; | 63 const Vector<Animation*>& animations = animationStack->m_activeAnimation s; |
| 56 for (size_t i = 0; i < animations.size(); ++i) { | 64 for (size_t i = 0; i < animations.size(); ++i) { |
| 57 Animation* animation = animations[i]; | 65 Animation* animation = animations[i]; |
| 58 if (animation->priority() != priority) | 66 if (animation->priority() != priority) |
| 59 continue; | 67 continue; |
| 60 if (cancelledPlayers && cancelledPlayers->contains(animation->player ())) | 68 if (cancelledPlayers && cancelledPlayers->contains(animation->player ())) |
| 61 continue; | 69 continue; |
| 62 copyToCompositableValueMap(animation->compositableValues(), result); | 70 copyToCompositableValueMap(animation->compositableValues(), result); |
| 63 } | 71 } |
| 64 } | 72 } |
| 65 | 73 |
| 66 if (newAnimations) { | 74 if (newAnimations) { |
| 67 for (size_t i = 0; i < newAnimations->size(); ++i) | 75 for (size_t i = 0; i < newAnimations->size(); ++i) |
| 68 copyToCompositableValueMap(newAnimations->at(i)->sample().get(), res ult); | 76 copyToCompositableValueMap(newAnimations->at(i)->sample().get(), res ult); |
| 69 } | 77 } |
| 70 | 78 |
| 71 return result; | 79 return result; |
| 72 } | 80 } |
| 73 | 81 |
| 74 } // namespace WebCore | 82 } // namespace WebCore |
| OLD | NEW |