| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 const Element* element = toElement(renderer.node()); | 71 const Element* element = toElement(renderer.node()); |
| 72 if (const ActiveAnimations* activeAnimations = element->activeAnimations()) | 72 if (const ActiveAnimations* activeAnimations = element->activeAnimations()) |
| 73 return activeAnimations->hasActiveAnimationsOnCompositor(property); | 73 return activeAnimations->hasActiveAnimationsOnCompositor(property); |
| 74 | 74 |
| 75 return false; | 75 return false; |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool ActiveAnimations::hasActiveAnimations(CSSPropertyID property) const | 78 bool ActiveAnimations::hasActiveAnimations(CSSPropertyID property) const |
| 79 { | 79 { |
| 80 return m_defaultStack.affects(property); | 80 for (PlayerSet::const_iterator it = m_players.begin(); it != players().end()
; ++it) { |
| 81 const Player& player = *it->key; |
| 82 ASSERT(player.source()); |
| 83 // FIXME: Needs to consider AnimationGroup once added. |
| 84 ASSERT(player.source()->isAnimation()); |
| 85 const Animation& animation = *toAnimation(player.source()); |
| 86 if (animation.isCurrent() && animation.affects(property)) |
| 87 return true; |
| 88 } |
| 89 return false; |
| 81 } | 90 } |
| 82 | 91 |
| 83 bool ActiveAnimations::hasActiveAnimationsOnCompositor(CSSPropertyID property) c
onst | 92 bool ActiveAnimations::hasActiveAnimationsOnCompositor(CSSPropertyID property) c
onst |
| 84 { | 93 { |
| 85 return m_defaultStack.hasActiveAnimationsOnCompositor(property); | 94 return m_defaultStack.hasActiveAnimationsOnCompositor(property); |
| 86 } | 95 } |
| 87 | 96 |
| 88 void ActiveAnimations::cancelAnimationOnCompositor() | 97 void ActiveAnimations::cancelAnimationOnCompositor() |
| 89 { | 98 { |
| 90 for (PlayerSet::iterator it = m_players.begin(); it != players().end(); ++it
) | 99 for (PlayerSet::iterator it = m_players.begin(); it != players().end(); ++it
) |
| 91 it->key->cancelAnimationOnCompositor(); | 100 it->key->cancelAnimationOnCompositor(); |
| 92 } | 101 } |
| 93 | 102 |
| 94 } // namespace WebCore | 103 } // namespace WebCore |
| OLD | NEW |