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 11 matching lines...) Expand all Loading... |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/svg/animation/SVGSMILElement.h" | 27 #include "core/svg/animation/SVGSMILElement.h" |
28 | 28 |
29 #include "SVGNames.h" | 29 #include "SVGNames.h" |
30 #include "XLinkNames.h" | 30 #include "XLinkNames.h" |
31 #include "bindings/v8/ExceptionStatePlaceholder.h" | 31 #include "bindings/v8/ExceptionStatePlaceholder.h" |
| 32 #include "bindings/v8/ScriptEventListener.h" |
32 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
33 #include "core/events/EventListener.h" | 34 #include "core/events/EventListener.h" |
34 #include "core/events/EventSender.h" | 35 #include "core/events/EventSender.h" |
35 #include "core/svg/SVGDocumentExtensions.h" | 36 #include "core/svg/SVGDocumentExtensions.h" |
36 #include "core/svg/SVGSVGElement.h" | 37 #include "core/svg/SVGSVGElement.h" |
37 #include "core/svg/SVGURIReference.h" | 38 #include "core/svg/SVGURIReference.h" |
38 #include "core/svg/animation/SMILTimeContainer.h" | 39 #include "core/svg/animation/SMILTimeContainer.h" |
39 #include "platform/FloatConversion.h" | 40 #include "platform/FloatConversion.h" |
40 #include "wtf/MathExtras.h" | 41 #include "wtf/MathExtras.h" |
41 #include "wtf/StdLibExtras.h" | 42 #include "wtf/StdLibExtras.h" |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 connectConditions(); | 511 connectConditions(); |
511 } else if (name == SVGNames::endAttr) { | 512 } else if (name == SVGNames::endAttr) { |
512 if (!m_conditions.isEmpty()) { | 513 if (!m_conditions.isEmpty()) { |
513 disconnectConditions(); | 514 disconnectConditions(); |
514 m_conditions.clear(); | 515 m_conditions.clear(); |
515 parseBeginOrEnd(fastGetAttribute(SVGNames::beginAttr), Begin); | 516 parseBeginOrEnd(fastGetAttribute(SVGNames::beginAttr), Begin); |
516 } | 517 } |
517 parseBeginOrEnd(value.string(), End); | 518 parseBeginOrEnd(value.string(), End); |
518 if (inDocument()) | 519 if (inDocument()) |
519 connectConditions(); | 520 connectConditions(); |
| 521 } else if (name == SVGNames::onbeginAttr) { |
| 522 setAttributeEventListener(EventTypeNames::beginEvent, createAttributeEve
ntListener(this, name, value)); |
| 523 } else if (name == SVGNames::onendAttr) { |
| 524 setAttributeEventListener(EventTypeNames::endEvent, createAttributeEvent
Listener(this, name, value)); |
| 525 } else if (name == SVGNames::onrepeatAttr) { |
| 526 setAttributeEventListener(EventTypeNames::repeatEvent, createAttributeEv
entListener(this, name, value)); |
520 } else | 527 } else |
521 SVGElement::parseAttribute(name, value); | 528 SVGElement::parseAttribute(name, value); |
522 } | 529 } |
523 | 530 |
524 void SVGSMILElement::svgAttributeChanged(const QualifiedName& attrName) | 531 void SVGSMILElement::svgAttributeChanged(const QualifiedName& attrName) |
525 { | 532 { |
526 if (!isSupportedAttribute(attrName)) { | 533 if (!isSupportedAttribute(attrName)) { |
527 SVGElement::svgAttributeChanged(attrName); | 534 SVGElement::svgAttributeChanged(attrName); |
528 return; | 535 return; |
529 } | 536 } |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 if (eventType == "repeatn") { | 1286 if (eventType == "repeatn") { |
1280 unsigned repeatEventCount = m_repeatEventCountList.first(); | 1287 unsigned repeatEventCount = m_repeatEventCountList.first(); |
1281 m_repeatEventCountList.remove(0); | 1288 m_repeatEventCountList.remove(0); |
1282 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount)); | 1289 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount)); |
1283 } else { | 1290 } else { |
1284 dispatchEvent(Event::create(eventType)); | 1291 dispatchEvent(Event::create(eventType)); |
1285 } | 1292 } |
1286 } | 1293 } |
1287 | 1294 |
1288 } | 1295 } |
OLD | NEW |