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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 }; | 74 }; |
75 | 75 |
76 inline RepeatEvent* toRepeatEvent(Event* event) | 76 inline RepeatEvent* toRepeatEvent(Event* event) |
77 { | 77 { |
78 ASSERT_WITH_SECURITY_IMPLICATION(!event || event->type() == "repeatn"); | 78 ASSERT_WITH_SECURITY_IMPLICATION(!event || event->type() == "repeatn"); |
79 return static_cast<RepeatEvent*>(event); | 79 return static_cast<RepeatEvent*>(event); |
80 } | 80 } |
81 | 81 |
82 static SMILEventSender& smilEndEventSender() | 82 static SMILEventSender& smilEndEventSender() |
83 { | 83 { |
84 DEFINE_STATIC_LOCAL(SMILEventSender, sender, (EventTypeNames::endEvent)); | 84 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SMILEventSender>, sender, (SMILEv
entSender::create(EventTypeNames::endEvent))); |
85 return sender; | 85 return *sender; |
86 } | 86 } |
87 | 87 |
88 static SMILEventSender& smilBeginEventSender() | 88 static SMILEventSender& smilBeginEventSender() |
89 { | 89 { |
90 DEFINE_STATIC_LOCAL(SMILEventSender, sender, (EventTypeNames::beginEvent)); | 90 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SMILEventSender>, sender, (SMILEv
entSender::create(EventTypeNames::beginEvent))); |
91 return sender; | 91 return *sender; |
92 } | 92 } |
93 | 93 |
94 static SMILEventSender& smilRepeatEventSender() | 94 static SMILEventSender& smilRepeatEventSender() |
95 { | 95 { |
96 DEFINE_STATIC_LOCAL(SMILEventSender, sender, (EventTypeNames::repeatEvent)); | 96 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SMILEventSender>, sender, (SMILEv
entSender::create(EventTypeNames::repeatEvent))); |
97 return sender; | 97 return *sender; |
98 } | 98 } |
99 | 99 |
100 static SMILEventSender& smilRepeatNEventSender() | 100 static SMILEventSender& smilRepeatNEventSender() |
101 { | 101 { |
102 DEFINE_STATIC_LOCAL(SMILEventSender, sender, (AtomicString("repeatn", Atomic
String::ConstructFromLiteral))); | 102 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SMILEventSender>, sender, (SMILEv
entSender::create(AtomicString("repeatn", AtomicString::ConstructFromLiteral))))
; |
103 return sender; | 103 return *sender; |
104 } | 104 } |
105 | 105 |
106 // This is used for duration type time values that can't be negative. | 106 // This is used for duration type time values that can't be negative. |
107 static const double invalidCachedTime = -1.; | 107 static const double invalidCachedTime = -1.; |
108 | 108 |
109 class ConditionEventListener final : public EventListener { | 109 class ConditionEventListener final : public EventListener { |
110 public: | 110 public: |
111 static PassRefPtrWillBeRawPtr<ConditionEventListener> create(SVGSMILElement*
animation, SVGSMILElement::Condition* condition) | 111 static PassRefPtrWillBeRawPtr<ConditionEventListener> create(SVGSMILElement*
animation, SVGSMILElement::Condition* condition) |
112 { | 112 { |
113 return adoptRefWillBeNoop(new ConditionEventListener(animation, conditio
n)); | 113 return adoptRefWillBeNoop(new ConditionEventListener(animation, conditio
n)); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 , m_cachedMin(invalidCachedTime) | 199 , m_cachedMin(invalidCachedTime) |
200 , m_cachedMax(invalidCachedTime) | 200 , m_cachedMax(invalidCachedTime) |
201 { | 201 { |
202 resolveFirstInterval(); | 202 resolveFirstInterval(); |
203 } | 203 } |
204 | 204 |
205 SVGSMILElement::~SVGSMILElement() | 205 SVGSMILElement::~SVGSMILElement() |
206 { | 206 { |
207 #if !ENABLE(OILPAN) | 207 #if !ENABLE(OILPAN) |
208 clearResourceAndEventBaseReferences(); | 208 clearResourceAndEventBaseReferences(); |
209 #endif | |
210 smilEndEventSender().cancelEvent(this); | 209 smilEndEventSender().cancelEvent(this); |
211 smilBeginEventSender().cancelEvent(this); | 210 smilBeginEventSender().cancelEvent(this); |
212 smilRepeatEventSender().cancelEvent(this); | 211 smilRepeatEventSender().cancelEvent(this); |
213 smilRepeatNEventSender().cancelEvent(this); | 212 smilRepeatNEventSender().cancelEvent(this); |
214 #if !ENABLE(OILPAN) | |
215 clearConditions(); | 213 clearConditions(); |
216 | 214 |
217 unscheduleIfScheduled(); | 215 unscheduleIfScheduled(); |
218 #endif | 216 #endif |
219 } | 217 } |
220 | 218 |
221 void SVGSMILElement::clearResourceAndEventBaseReferences() | 219 void SVGSMILElement::clearResourceAndEventBaseReferences() |
222 { | 220 { |
223 removeAllOutgoingReferences(); | 221 removeAllOutgoingReferences(); |
224 } | 222 } |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 visitor->trace(m_targetElement); | 1361 visitor->trace(m_targetElement); |
1364 visitor->trace(m_timeContainer); | 1362 visitor->trace(m_timeContainer); |
1365 visitor->trace(m_conditions); | 1363 visitor->trace(m_conditions); |
1366 visitor->trace(m_syncBaseDependents); | 1364 visitor->trace(m_syncBaseDependents); |
1367 #endif | 1365 #endif |
1368 SVGElement::trace(visitor); | 1366 SVGElement::trace(visitor); |
1369 SVGTests::trace(visitor); | 1367 SVGTests::trace(visitor); |
1370 } | 1368 } |
1371 | 1369 |
1372 } // namespace blink | 1370 } // namespace blink |
OLD | NEW |