OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 if (m_timeContainer) { | 228 if (m_timeContainer) { |
229 m_timeContainer->unschedule(this); | 229 m_timeContainer->unschedule(this); |
230 m_timeContainer = 0; | 230 m_timeContainer = 0; |
231 } | 231 } |
232 // Calling disconnectConditions() may kill us if there are syncbase cond
itions. | 232 // Calling disconnectConditions() may kill us if there are syncbase cond
itions. |
233 // OK, but we don't want to die inside the call. | 233 // OK, but we don't want to die inside the call. |
234 RefPtr<SVGSMILElement> keepAlive(this); | 234 RefPtr<SVGSMILElement> keepAlive(this); |
235 disconnectConditions(); | 235 disconnectConditions(); |
236 | 236 |
237 // Clear target now, because disconnectConditions calls targetElement()
which will recreate the target if we removed it sooner. | 237 // Clear target now, because disconnectConditions calls targetElement()
which will recreate the target if we removed it sooner. |
238 if (m_targetElement) { | 238 if (m_targetElement) |
239 document()->accessSVGExtensions()->removeAnimationElementFromTarget(
this, m_targetElement); | 239 resetTargetElement(); |
240 targetElementWillChange(m_targetElement, 0); | |
241 m_targetElement = 0; | |
242 } | |
243 | 240 |
244 m_attributeName = anyQName(); | 241 m_attributeName = anyQName(); |
245 } | 242 } |
246 | 243 |
247 SVGElement::removedFrom(rootParent); | 244 SVGElement::removedFrom(rootParent); |
248 } | 245 } |
249 | 246 |
250 SMILTime SVGSMILElement::parseOffsetValue(const String& data) | 247 SMILTime SVGSMILElement::parseOffsetValue(const String& data) |
251 { | 248 { |
252 bool ok; | 249 bool ok; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 if (currentTarget) | 574 if (currentTarget) |
578 clearAnimatedType(currentTarget); | 575 clearAnimatedType(currentTarget); |
579 | 576 |
580 // If the animation state is not Inactive, always reset to a clear state bef
ore leaving the old target element. | 577 // If the animation state is not Inactive, always reset to a clear state bef
ore leaving the old target element. |
581 if (m_activeState != Inactive) | 578 if (m_activeState != Inactive) |
582 endedActiveInterval(); | 579 endedActiveInterval(); |
583 } | 580 } |
584 | 581 |
585 void SVGSMILElement::resetTargetElement() | 582 void SVGSMILElement::resetTargetElement() |
586 { | 583 { |
| 584 document()->accessSVGExtensions()->removeAnimationElementFromTarget(this, m_
targetElement); |
587 targetElementWillChange(m_targetElement, 0); | 585 targetElementWillChange(m_targetElement, 0); |
588 m_targetElement = 0; | 586 m_targetElement = 0; |
589 animationAttributeChanged(); | 587 animationAttributeChanged(); |
590 } | 588 } |
591 | 589 |
592 SMILTime SVGSMILElement::elapsed() const | 590 SMILTime SVGSMILElement::elapsed() const |
593 { | 591 { |
594 return m_timeContainer ? m_timeContainer->elapsed() : 0; | 592 return m_timeContainer ? m_timeContainer->elapsed() : 0; |
595 } | 593 } |
596 | 594 |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 | 1148 |
1151 void SVGSMILElement::endedActiveInterval() | 1149 void SVGSMILElement::endedActiveInterval() |
1152 { | 1150 { |
1153 clearTimesWithDynamicOrigins(m_beginTimes); | 1151 clearTimesWithDynamicOrigins(m_beginTimes); |
1154 clearTimesWithDynamicOrigins(m_endTimes); | 1152 clearTimesWithDynamicOrigins(m_endTimes); |
1155 } | 1153 } |
1156 | 1154 |
1157 } | 1155 } |
1158 | 1156 |
1159 #endif | 1157 #endif |
OLD | NEW |