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

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

Issue 298043005: Improve comparison of intervals in SVGSMILElement::resolveFirstInterval (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 925
926 beginAfter = tempEnd; 926 beginAfter = tempEnd;
927 lastIntervalTempEnd = tempEnd; 927 lastIntervalTempEnd = tempEnd;
928 } 928 }
929 beginResult = SMILTime::unresolved(); 929 beginResult = SMILTime::unresolved();
930 endResult = SMILTime::unresolved(); 930 endResult = SMILTime::unresolved();
931 } 931 }
932 932
933 void SVGSMILElement::resolveFirstInterval() 933 void SVGSMILElement::resolveFirstInterval()
934 { 934 {
935 SMILTime begin; 935 SMILInterval firstInterval;
936 SMILTime end; 936 resolveInterval(true, firstInterval.begin, firstInterval.end);
937 resolveInterval(true, begin, end); 937 ASSERT(!firstInterval.begin.isIndefinite());
938 ASSERT(!begin.isIndefinite());
939 938
940 if (!begin.isUnresolved() && (begin != m_intervalBegin || end != m_intervalE nd)) { 939 if (!firstInterval.begin.isUnresolved() && firstInterval != SMILInterval(m_i ntervalBegin, m_intervalEnd)) {
941 m_intervalBegin = begin; 940 m_intervalBegin = firstInterval.begin;
942 m_intervalEnd = end; 941 m_intervalEnd = firstInterval.end;
943 notifyDependentsIntervalChanged(); 942 notifyDependentsIntervalChanged();
944 m_nextProgressTime = min(m_nextProgressTime, m_intervalBegin); 943 m_nextProgressTime = min(m_nextProgressTime, m_intervalBegin);
945 944
946 if (m_timeContainer) 945 if (m_timeContainer)
947 m_timeContainer->notifyIntervalsChanged(); 946 m_timeContainer->notifyIntervalsChanged();
948 } 947 }
949 } 948 }
950 949
951 bool SVGSMILElement::resolveNextInterval() 950 bool SVGSMILElement::resolveNextInterval()
952 { 951 {
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 1347
1349 void SVGSMILElement::trace(Visitor* visitor) 1348 void SVGSMILElement::trace(Visitor* visitor)
1350 { 1349 {
1351 visitor->trace(m_targetElement); 1350 visitor->trace(m_targetElement);
1352 visitor->trace(m_conditions); 1351 visitor->trace(m_conditions);
1353 visitor->trace(m_syncBaseDependents); 1352 visitor->trace(m_syncBaseDependents);
1354 SVGElement::trace(visitor); 1353 SVGElement::trace(visitor);
1355 } 1354 }
1356 1355
1357 } 1356 }
OLDNEW
« Source/core/svg/animation/SMILTime.h ('K') | « Source/core/svg/animation/SMILTime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698