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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 // react to it. | 272 // react to it. |
273 addReferenceTo(svgTarget); | 273 addReferenceTo(svgTarget); |
274 } | 274 } |
275 connectEventBaseConditions(); | 275 connectEventBaseConditions(); |
276 } | 276 } |
277 | 277 |
278 static inline void clearTimesWithDynamicOrigins( | 278 static inline void clearTimesWithDynamicOrigins( |
279 Vector<SMILTimeWithOrigin>& timeList) { | 279 Vector<SMILTimeWithOrigin>& timeList) { |
280 for (int i = timeList.size() - 1; i >= 0; --i) { | 280 for (int i = timeList.size() - 1; i >= 0; --i) { |
281 if (timeList[i].originIsScript()) | 281 if (timeList[i].originIsScript()) |
282 timeList.remove(i); | 282 timeList.erase(i); |
283 } | 283 } |
284 } | 284 } |
285 | 285 |
286 void SVGSMILElement::reset() { | 286 void SVGSMILElement::reset() { |
287 clearAnimatedType(); | 287 clearAnimatedType(); |
288 | 288 |
289 m_activeState = Inactive; | 289 m_activeState = Inactive; |
290 m_isWaitingForFirstInterval = true; | 290 m_isWaitingForFirstInterval = true; |
291 m_interval.begin = SMILTime::unresolved(); | 291 m_interval.begin = SMILTime::unresolved(); |
292 m_interval.end = SMILTime::unresolved(); | 292 m_interval.end = SMILTime::unresolved(); |
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 WTF::bind(&SVGSMILElement::dispatchPendingEvent, | 1233 WTF::bind(&SVGSMILElement::dispatchPendingEvent, |
1234 wrapPersistent(this), eventType)); | 1234 wrapPersistent(this), eventType)); |
1235 } | 1235 } |
1236 | 1236 |
1237 void SVGSMILElement::dispatchPendingEvent(const AtomicString& eventType) { | 1237 void SVGSMILElement::dispatchPendingEvent(const AtomicString& eventType) { |
1238 DCHECK(eventType == EventTypeNames::endEvent || | 1238 DCHECK(eventType == EventTypeNames::endEvent || |
1239 eventType == EventTypeNames::beginEvent || | 1239 eventType == EventTypeNames::beginEvent || |
1240 eventType == EventTypeNames::repeatEvent || eventType == "repeatn"); | 1240 eventType == EventTypeNames::repeatEvent || eventType == "repeatn"); |
1241 if (eventType == "repeatn") { | 1241 if (eventType == "repeatn") { |
1242 unsigned repeatEventCount = m_repeatEventCountList.front(); | 1242 unsigned repeatEventCount = m_repeatEventCountList.front(); |
1243 m_repeatEventCountList.remove(0); | 1243 m_repeatEventCountList.erase(0); |
1244 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount)); | 1244 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount)); |
1245 } else { | 1245 } else { |
1246 dispatchEvent(Event::create(eventType)); | 1246 dispatchEvent(Event::create(eventType)); |
1247 } | 1247 } |
1248 } | 1248 } |
1249 | 1249 |
1250 bool SVGSMILElement::hasValidTarget() { | 1250 bool SVGSMILElement::hasValidTarget() { |
1251 return targetElement() && targetElement()->inActiveDocument(); | 1251 return targetElement() && targetElement()->inActiveDocument(); |
1252 } | 1252 } |
1253 | 1253 |
(...skipping 18 matching lines...) Expand all Loading... |
1272 visitor->trace(m_targetElement); | 1272 visitor->trace(m_targetElement); |
1273 visitor->trace(m_targetIdObserver); | 1273 visitor->trace(m_targetIdObserver); |
1274 visitor->trace(m_timeContainer); | 1274 visitor->trace(m_timeContainer); |
1275 visitor->trace(m_conditions); | 1275 visitor->trace(m_conditions); |
1276 visitor->trace(m_syncBaseDependents); | 1276 visitor->trace(m_syncBaseDependents); |
1277 SVGElement::trace(visitor); | 1277 SVGElement::trace(visitor); |
1278 SVGTests::trace(visitor); | 1278 SVGTests::trace(visitor); |
1279 } | 1279 } |
1280 | 1280 |
1281 } // namespace blink | 1281 } // namespace blink |
OLD | NEW |