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 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 repeat = static_cast<unsigned>(activeTime.value() / simpleDuration.value()); | 1092 repeat = static_cast<unsigned>(activeTime.value() / simpleDuration.value()); |
1093 SMILTime simpleTime = fmod(activeTime.value(), simpleDuration.value()); | 1093 SMILTime simpleTime = fmod(activeTime.value(), simpleDuration.value()); |
1094 return narrowPrecisionToFloat(simpleTime.value() / simpleDuration.value()); | 1094 return narrowPrecisionToFloat(simpleTime.value() / simpleDuration.value()); |
1095 } | 1095 } |
1096 | 1096 |
1097 SMILTime SVGSMILElement::calculateNextProgressTime(SMILTime elapsed) const | 1097 SMILTime SVGSMILElement::calculateNextProgressTime(SMILTime elapsed) const |
1098 { | 1098 { |
1099 if (m_activeState == Active) { | 1099 if (m_activeState == Active) { |
1100 // If duration is indefinite the value does not actually change over tim
e. Same is true for <set>. | 1100 // If duration is indefinite the value does not actually change over tim
e. Same is true for <set>. |
1101 SMILTime simpleDuration = this->simpleDuration(); | 1101 SMILTime simpleDuration = this->simpleDuration(); |
1102 if (simpleDuration.isIndefinite() || hasTagName(SVGNames::setTag)) { | 1102 if (simpleDuration.isIndefinite() || isSVGSetElement(*this)) { |
1103 SMILTime repeatingDurationEnd = m_intervalBegin + repeatingDuration(
); | 1103 SMILTime repeatingDurationEnd = m_intervalBegin + repeatingDuration(
); |
1104 // We are supposed to do freeze semantics when repeating ends, even
if the element is still active. | 1104 // We are supposed to do freeze semantics when repeating ends, even
if the element is still active. |
1105 // Take care that we get a timer callback at that point. | 1105 // Take care that we get a timer callback at that point. |
1106 if (elapsed < repeatingDurationEnd && repeatingDurationEnd < m_inter
valEnd && repeatingDurationEnd.isFinite()) | 1106 if (elapsed < repeatingDurationEnd && repeatingDurationEnd < m_inter
valEnd && repeatingDurationEnd.isFinite()) |
1107 return repeatingDurationEnd; | 1107 return repeatingDurationEnd; |
1108 return m_intervalEnd; | 1108 return m_intervalEnd; |
1109 } | 1109 } |
1110 return elapsed + 0.025; | 1110 return elapsed + 0.025; |
1111 } | 1111 } |
1112 return m_intervalBegin >= elapsed ? m_intervalBegin : SMILTime::unresolved()
; | 1112 return m_intervalBegin >= elapsed ? m_intervalBegin : SMILTime::unresolved()
; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 if (eventType == "repeatn") { | 1312 if (eventType == "repeatn") { |
1313 unsigned repeatEventCount = m_repeatEventCountList.first(); | 1313 unsigned repeatEventCount = m_repeatEventCountList.first(); |
1314 m_repeatEventCountList.remove(0); | 1314 m_repeatEventCountList.remove(0); |
1315 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount)); | 1315 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount)); |
1316 } else { | 1316 } else { |
1317 dispatchEvent(Event::create(eventType)); | 1317 dispatchEvent(Event::create(eventType)); |
1318 } | 1318 } |
1319 } | 1319 } |
1320 | 1320 |
1321 } | 1321 } |
OLD | NEW |