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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 { | 545 { |
546 if (m_timeContainer) | 546 if (m_timeContainer) |
547 m_timeContainer->schedule(this); | 547 m_timeContainer->schedule(this); |
548 } | 548 } |
549 | 549 |
550 SVGElement* SVGSMILElement::targetElement() | 550 SVGElement* SVGSMILElement::targetElement() |
551 { | 551 { |
552 if (m_targetElement) | 552 if (m_targetElement) |
553 return m_targetElement; | 553 return m_targetElement; |
554 | 554 |
| 555 if (!inDocument()) |
| 556 return 0; |
| 557 |
555 String href = getAttribute(XLinkNames::hrefAttr); | 558 String href = getAttribute(XLinkNames::hrefAttr); |
556 ContainerNode* target = href.isEmpty() ? parentNode() : SVGURIReference::tar
getElementFromIRIString(href, document()); | 559 ContainerNode* target = href.isEmpty() ? parentNode() : SVGURIReference::tar
getElementFromIRIString(href, document()); |
557 if (!target || !target->isSVGElement()) | 560 if (!target || !target->isSVGElement()) |
558 return 0; | 561 return 0; |
559 | 562 |
560 SVGElement* targetElement = static_cast<SVGElement*>(target); | 563 SVGElement* targetElement = static_cast<SVGElement*>(target); |
561 targetElementWillChange(m_targetElement, targetElement); | 564 targetElementWillChange(m_targetElement, targetElement); |
562 m_targetElement = targetElement; | 565 m_targetElement = targetElement; |
563 document()->accessSVGExtensions()->addAnimationElementToTarget(this, m_targe
tElement); | 566 document()->accessSVGExtensions()->addAnimationElementToTarget(this, m_targe
tElement); |
564 return m_targetElement; | 567 return m_targetElement; |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 | 1133 |
1131 void SVGSMILElement::endedActiveInterval() | 1134 void SVGSMILElement::endedActiveInterval() |
1132 { | 1135 { |
1133 clearTimesWithDynamicOrigins(m_beginTimes); | 1136 clearTimesWithDynamicOrigins(m_beginTimes); |
1134 clearTimesWithDynamicOrigins(m_endTimes); | 1137 clearTimesWithDynamicOrigins(m_endTimes); |
1135 } | 1138 } |
1136 | 1139 |
1137 } | 1140 } |
1138 | 1141 |
1139 #endif | 1142 #endif |
OLD | NEW |