Title: [107693] trunk/Source/WebCore
- Revision
- 107693
- Author
- [email protected]
- Date
- 2012-02-14 02:19:08 -0800 (Tue, 14 Feb 2012)
Log Message
Convert svg/animations to use SMIL methods for driving the timeline
https://bugs.webkit.org/show_bug.cgi?id=78422
Reviewed by Hajime Morita.
Fix last-minute typo in clearTimesWithDynamicOrigins, leading to assertions browsing the W3C SVG animation tests.
Covered by existing tests in svg/animations.
* svg/SVGAnimationElement.cpp: Remove unused endedActiveInterval.
* svg/SVGAnimationElement.h: Ditto.
* svg/animation/SVGSMILElement.cpp:
(WebCore::clearTimesWithDynamicOrigins): Fix order of walking the times list.
(WebCore::SVGSMILElement::reset): Move calls to clearTimesWithDynamicOrigins into endedActiveInterval.
(WebCore::SVGSMILElement::endedActiveInterval):
* svg/animation/SVGSMILElement.h:
(SVGSMILElement): Devirtualize endedActiveInterval.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (107692 => 107693)
--- trunk/Source/WebCore/ChangeLog 2012-02-14 10:04:12 UTC (rev 107692)
+++ trunk/Source/WebCore/ChangeLog 2012-02-14 10:19:08 UTC (rev 107693)
@@ -1,3 +1,22 @@
+2012-02-14 Nikolas Zimmermann <[email protected]>
+
+ Convert svg/animations to use SMIL methods for driving the timeline
+ https://bugs.webkit.org/show_bug.cgi?id=78422
+
+ Reviewed by Hajime Morita.
+
+ Fix last-minute typo in clearTimesWithDynamicOrigins, leading to assertions browsing the W3C SVG animation tests.
+ Covered by existing tests in svg/animations.
+
+ * svg/SVGAnimationElement.cpp: Remove unused endedActiveInterval.
+ * svg/SVGAnimationElement.h: Ditto.
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::clearTimesWithDynamicOrigins): Fix order of walking the times list.
+ (WebCore::SVGSMILElement::reset): Move calls to clearTimesWithDynamicOrigins into endedActiveInterval.
+ (WebCore::SVGSMILElement::endedActiveInterval):
+ * svg/animation/SVGSMILElement.h:
+ (SVGSMILElement): Devirtualize endedActiveInterval.
+
2012-02-14 Sheriff Bot <[email protected]>
Unreviewed, rolling out r107661.
Modified: trunk/Source/WebCore/svg/SVGAnimationElement.cpp (107692 => 107693)
--- trunk/Source/WebCore/svg/SVGAnimationElement.cpp 2012-02-14 10:04:12 UTC (rev 107692)
+++ trunk/Source/WebCore/svg/SVGAnimationElement.cpp 2012-02-14 10:19:08 UTC (rev 107693)
@@ -624,9 +624,5 @@
calculateAnimatedValue(effectivePercent, repeat, resultElement);
}
-void SVGAnimationElement::endedActiveInterval()
-{
}
-
-}
#endif // ENABLE(SVG)
Modified: trunk/Source/WebCore/svg/SVGAnimationElement.h (107692 => 107693)
--- trunk/Source/WebCore/svg/SVGAnimationElement.h 2012-02-14 10:04:12 UTC (rev 107692)
+++ trunk/Source/WebCore/svg/SVGAnimationElement.h 2012-02-14 10:19:08 UTC (rev 107693)
@@ -104,7 +104,6 @@
// from SVGSMILElement
virtual void startedActiveInterval();
virtual void updateAnimation(float percent, unsigned repeat, SVGSMILElement* resultElement);
- virtual void endedActiveInterval();
private:
virtual void attributeChanged(Attribute*) OVERRIDE;
Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (107692 => 107693)
--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp 2012-02-14 10:04:12 UTC (rev 107692)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp 2012-02-14 10:19:08 UTC (rev 107693)
@@ -170,12 +170,9 @@
static inline void clearTimesWithDynamicOrigins(Vector<SMILTimeWithOrigin>& timeList)
{
- size_t timeListSize = timeList.size();
- for (size_t i = 0; i < timeListSize; ++i) {
- if (!timeList[i].originIsScript())
- continue;
- timeList.remove(i);
- --timeListSize;
+ for (int i = timeList.size() - 1; i >= 0; --i) {
+ if (timeList[i].originIsScript())
+ timeList.remove(i);
}
}
@@ -189,9 +186,6 @@
m_lastPercent = 0;
m_lastRepeat = 0;
m_nextProgressTime = 0;
-
- clearTimesWithDynamicOrigins(m_beginTimes);
- clearTimesWithDynamicOrigins(m_endTimes);
resolveFirstInterval();
}
@@ -1054,7 +1048,13 @@
SMILTime elapsed = this->elapsed();
addBeginTime(elapsed, elapsed);
}
-
+
+void SVGSMILElement::endedActiveInterval()
+{
+ clearTimesWithDynamicOrigins(m_beginTimes);
+ clearTimesWithDynamicOrigins(m_endTimes);
}
+}
+
#endif
Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.h (107692 => 107693)
--- trunk/Source/WebCore/svg/animation/SVGSMILElement.h 2012-02-14 10:04:12 UTC (rev 107692)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.h 2012-02-14 10:19:08 UTC (rev 107693)
@@ -117,7 +117,7 @@
private:
virtual void startedActiveInterval() = 0;
virtual void updateAnimation(float percent, unsigned repeat, SVGSMILElement* resultElement) = 0;
- virtual void endedActiveInterval() = 0;
+ void endedActiveInterval();
enum BeginOrEnd {
Begin,
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes