Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: Source/core/svg/animation/SVGSMILElement.cpp

Issue 173523003: Make clearing the animated type at the end of an interval more robust (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop explicit timeout in TC. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/svg/animations/animateTransform-circular-linked-syncbases-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 if (restart != RestartAlways) 1013 if (restart != RestartAlways)
1014 return DidNotRestartInterval; 1014 return DidNotRestartInterval;
1015 SMILTime nextBegin = findInstanceTime(Begin, m_intervalBegin, false); 1015 SMILTime nextBegin = findInstanceTime(Begin, m_intervalBegin, false);
1016 if (nextBegin < m_intervalEnd) { 1016 if (nextBegin < m_intervalEnd) {
1017 m_intervalEnd = nextBegin; 1017 m_intervalEnd = nextBegin;
1018 notifyDependentsIntervalChanged(); 1018 notifyDependentsIntervalChanged();
1019 } 1019 }
1020 } 1020 }
1021 1021
1022 if (elapsed >= m_intervalEnd) { 1022 if (elapsed >= m_intervalEnd) {
1023 if (resolveNextInterval()) 1023 if (resolveNextInterval() && elapsed >= m_intervalBegin)
1024 return DidRestartInterval; 1024 return DidRestartInterval;
1025 } 1025 }
1026 return DidNotRestartInterval; 1026 return DidNotRestartInterval;
1027 } 1027 }
1028 1028
1029 void SVGSMILElement::seekToIntervalCorrespondingToTime(SMILTime elapsed) 1029 void SVGSMILElement::seekToIntervalCorrespondingToTime(SMILTime elapsed)
1030 { 1030 {
1031 ASSERT(!m_isWaitingForFirstInterval); 1031 ASSERT(!m_isWaitingForFirstInterval);
1032 ASSERT(elapsed >= m_intervalBegin); 1032 ASSERT(elapsed >= m_intervalBegin);
1033 1033
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 dispatchRepeatEvents(repeat); 1190 dispatchRepeatEvents(repeat);
1191 1191
1192 updateAnimation(percent, repeat, resultElement); 1192 updateAnimation(percent, repeat, resultElement);
1193 m_lastPercent = percent; 1193 m_lastPercent = percent;
1194 m_lastRepeat = repeat; 1194 m_lastRepeat = repeat;
1195 } 1195 }
1196 1196
1197 if ((oldActiveState == Active && m_activeState != Active) || restartedInterv al == DidRestartInterval) { 1197 if ((oldActiveState == Active && m_activeState != Active) || restartedInterv al == DidRestartInterval) {
1198 smilEndEventSender().dispatchEventSoon(this); 1198 smilEndEventSender().dispatchEventSoon(this);
1199 endedActiveInterval(); 1199 endedActiveInterval();
1200 if (restartedInterval == DidNotRestartInterval && m_activeState != Froze n && this == resultElement) 1200 if (!animationIsContributing && this == resultElement)
1201 clearAnimatedType(m_targetElement); 1201 clearAnimatedType(m_targetElement);
1202 } 1202 }
1203 1203
1204 // Triggering all the pending events if the animation timeline is changed. 1204 // Triggering all the pending events if the animation timeline is changed.
1205 if (seekToTime) { 1205 if (seekToTime) {
1206 if (m_activeState == Inactive) 1206 if (m_activeState == Inactive)
1207 smilBeginEventSender().dispatchEventSoon(this); 1207 smilBeginEventSender().dispatchEventSoon(this);
1208 1208
1209 if (repeat) { 1209 if (repeat) {
1210 for (unsigned repeatEventCount = 1; repeatEventCount < repeat; repea tEventCount++) 1210 for (unsigned repeatEventCount = 1; repeatEventCount < repeat; repea tEventCount++)
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 if (eventType == "repeatn") { 1311 if (eventType == "repeatn") {
1312 unsigned repeatEventCount = m_repeatEventCountList.first(); 1312 unsigned repeatEventCount = m_repeatEventCountList.first();
1313 m_repeatEventCountList.remove(0); 1313 m_repeatEventCountList.remove(0);
1314 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount)); 1314 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount));
1315 } else { 1315 } else {
1316 dispatchEvent(Event::create(eventType)); 1316 dispatchEvent(Event::create(eventType));
1317 } 1317 }
1318 } 1318 }
1319 1319
1320 } 1320 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/animations/animateTransform-circular-linked-syncbases-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698