| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 void Animation::updateChildrenAndEffects(bool wasInEffect) const | 85 void Animation::updateChildrenAndEffects(bool wasInEffect) const |
| 86 { | 86 { |
| 87 ASSERT(m_activeInAnimationStack == wasInEffect); | 87 ASSERT(m_activeInAnimationStack == wasInEffect); |
| 88 if (isInEffect()) | 88 if (isInEffect()) |
| 89 const_cast<Animation*>(this)->applyEffects(wasInEffect); | 89 const_cast<Animation*>(this)->applyEffects(wasInEffect); |
| 90 else if (wasInEffect) | 90 else if (wasInEffect) |
| 91 const_cast<Animation*>(this)->clearEffects(); | 91 const_cast<Animation*>(this)->clearEffects(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 double Animation::calculateTimeToEffectChange(double inheritedTime, double activ
eTime, Phase phase) const |
| 95 { |
| 96 if (phase == PhaseBefore) { |
| 97 return activeTime - inheritedTime; |
| 98 } |
| 99 if (phase == PhaseActive) { |
| 100 return 0; |
| 101 } |
| 102 if (phase == PhaseAfter) { |
| 103 // If this Animation is still in effect then it will need to update |
| 104 // when its parent goes out of effect. We have no way of knowing when |
| 105 // that will be, however, so the parent will need to supply it. |
| 106 return -1; |
| 107 } |
| 108 ASSERT_NOT_REACHED(); |
| 109 return 0; |
| 110 } |
| 111 |
| 94 } // namespace WebCore | 112 } // namespace WebCore |
| OLD | NEW |