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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 , m_baseID(baseID) | 162 , m_baseID(baseID) |
163 , m_name(name) | 163 , m_name(name) |
164 , m_offset(offset) | 164 , m_offset(offset) |
165 , m_repeat(repeat) | 165 , m_repeat(repeat) |
166 { | 166 { |
167 } | 167 } |
168 | 168 |
169 SVGSMILElement::SVGSMILElement(const QualifiedName& tagName, Document& doc) | 169 SVGSMILElement::SVGSMILElement(const QualifiedName& tagName, Document& doc) |
170 : SVGElement(tagName, doc) | 170 : SVGElement(tagName, doc) |
171 , m_attributeName(anyQName()) | 171 , m_attributeName(anyQName()) |
172 , m_targetElement(0) | 172 , m_targetElement(nullptr) |
173 , m_syncBaseConditionsConnected(false) | 173 , m_syncBaseConditionsConnected(false) |
174 , m_hasEndEventConditions(false) | 174 , m_hasEndEventConditions(false) |
175 , m_isWaitingForFirstInterval(true) | 175 , m_isWaitingForFirstInterval(true) |
176 , m_intervalBegin(SMILTime::unresolved()) | 176 , m_intervalBegin(SMILTime::unresolved()) |
177 , m_intervalEnd(SMILTime::unresolved()) | 177 , m_intervalEnd(SMILTime::unresolved()) |
178 , m_previousIntervalBegin(SMILTime::unresolved()) | 178 , m_previousIntervalBegin(SMILTime::unresolved()) |
179 , m_activeState(Inactive) | 179 , m_activeState(Inactive) |
180 , m_lastPercent(0) | 180 , m_lastPercent(0) |
181 , m_lastRepeat(0) | 181 , m_lastRepeat(0) |
182 , m_nextProgressTime(0) | 182 , m_nextProgressTime(0) |
183 , m_documentOrderIndex(0) | 183 , m_documentOrderIndex(0) |
184 , m_cachedDur(invalidCachedTime) | 184 , m_cachedDur(invalidCachedTime) |
185 , m_cachedRepeatDur(invalidCachedTime) | 185 , m_cachedRepeatDur(invalidCachedTime) |
186 , m_cachedRepeatCount(invalidCachedTime) | 186 , m_cachedRepeatCount(invalidCachedTime) |
187 , m_cachedMin(invalidCachedTime) | 187 , m_cachedMin(invalidCachedTime) |
188 , m_cachedMax(invalidCachedTime) | 188 , m_cachedMax(invalidCachedTime) |
189 { | 189 { |
190 resolveFirstInterval(); | 190 resolveFirstInterval(); |
191 } | 191 } |
192 | 192 |
193 SVGSMILElement::~SVGSMILElement() | 193 SVGSMILElement::~SVGSMILElement() |
194 { | 194 { |
195 #if !ENABLE(OILPAN) | 195 #if !ENABLE(OILPAN) |
196 clearResourceAndEventBaseReferences(); | 196 clearResourceAndEventBaseReferences(); |
197 #endif | 197 #endif |
198 smilEndEventSender().cancelEvent(this); | 198 smilEndEventSender().cancelEvent(this); |
199 smilBeginEventSender().cancelEvent(this); | 199 smilBeginEventSender().cancelEvent(this); |
200 smilRepeatEventSender().cancelEvent(this); | 200 smilRepeatEventSender().cancelEvent(this); |
201 smilRepeatNEventSender().cancelEvent(this); | 201 smilRepeatNEventSender().cancelEvent(this); |
| 202 #if !ENABLE(OILPAN) |
202 clearConditions(); | 203 clearConditions(); |
203 if (m_timeContainer && m_targetElement && hasValidAttributeName()) | 204 if (m_timeContainer && m_targetElement && hasValidAttributeName()) |
204 m_timeContainer->unschedule(this, m_targetElement, m_attributeName); | 205 m_timeContainer->unschedule(this, m_targetElement, m_attributeName); |
| 206 #endif |
205 } | 207 } |
206 | 208 |
207 void SVGSMILElement::clearResourceAndEventBaseReferences() | 209 void SVGSMILElement::clearResourceAndEventBaseReferences() |
208 { | 210 { |
209 document().accessSVGExtensions().removeAllTargetReferencesForElement(this); | 211 document().accessSVGExtensions().removeAllTargetReferencesForElement(this); |
210 } | 212 } |
211 | 213 |
212 void SVGSMILElement::clearConditions() | 214 void SVGSMILElement::clearConditions() |
213 { | 215 { |
214 disconnectSyncBaseConditions(); | 216 disconnectSyncBaseConditions(); |
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 const AtomicString& eventType = eventSender->eventType(); | 1325 const AtomicString& eventType = eventSender->eventType(); |
1324 if (eventType == "repeatn") { | 1326 if (eventType == "repeatn") { |
1325 unsigned repeatEventCount = m_repeatEventCountList.first(); | 1327 unsigned repeatEventCount = m_repeatEventCountList.first(); |
1326 m_repeatEventCountList.remove(0); | 1328 m_repeatEventCountList.remove(0); |
1327 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount)); | 1329 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount)); |
1328 } else { | 1330 } else { |
1329 dispatchEvent(Event::create(eventType)); | 1331 dispatchEvent(Event::create(eventType)); |
1330 } | 1332 } |
1331 } | 1333 } |
1332 | 1334 |
| 1335 void SVGSMILElement::trace(Visitor* visitor) |
| 1336 { |
| 1337 visitor->trace(m_targetElement); |
| 1338 SVGElement::trace(visitor); |
1333 } | 1339 } |
| 1340 |
| 1341 } |
OLD | NEW |