| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 SampledEffect* sampledEffect = SampledEffect::create(this); | 186 SampledEffect* sampledEffect = SampledEffect::create(this); |
| 187 sampledEffect->mutableInterpolations().swap(interpolations); | 187 sampledEffect->mutableInterpolations().swap(interpolations); |
| 188 m_sampledEffect = sampledEffect; | 188 m_sampledEffect = sampledEffect; |
| 189 ensureAnimationStack(m_target).add(sampledEffect); | 189 ensureAnimationStack(m_target).add(sampledEffect); |
| 190 changed = true; | 190 changed = true; |
| 191 } else { | 191 } else { |
| 192 return; | 192 return; |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| 196 if (changed) | 196 if (changed) { |
| 197 m_target->setNeedsAnimationStyleRecalc(); | 197 m_target->setNeedsAnimationStyleRecalc(); |
| 198 | 198 if (m_target->isSVGElement()) |
| 199 if (m_target->isSVGElement()) | 199 toSVGElement(*m_target).setWebAnimationsPending(); |
| 200 m_sampledEffect->applySVGUpdate(toSVGElement(*m_target)); | 200 } |
| 201 } | 201 } |
| 202 | 202 |
| 203 void KeyframeEffect::clearEffects() | 203 void KeyframeEffect::clearEffects() |
| 204 { | 204 { |
| 205 ASSERT(animation()); | 205 ASSERT(animation()); |
| 206 ASSERT(m_sampledEffect); | 206 ASSERT(m_sampledEffect); |
| 207 | 207 |
| 208 m_sampledEffect->clear(); | 208 m_sampledEffect->clear(); |
| 209 m_sampledEffect = nullptr; | 209 m_sampledEffect = nullptr; |
| 210 restartAnimationOnCompositor(); | 210 restartAnimationOnCompositor(); |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 371 |
| 372 DEFINE_TRACE(KeyframeEffect) | 372 DEFINE_TRACE(KeyframeEffect) |
| 373 { | 373 { |
| 374 visitor->trace(m_target); | 374 visitor->trace(m_target); |
| 375 visitor->trace(m_model); | 375 visitor->trace(m_model); |
| 376 visitor->trace(m_sampledEffect); | 376 visitor->trace(m_sampledEffect); |
| 377 AnimationEffect::trace(visitor); | 377 AnimationEffect::trace(visitor); |
| 378 } | 378 } |
| 379 | 379 |
| 380 } // namespace blink | 380 } // namespace blink |
| OLD | NEW |