Index: Source/core/svg/graphics/SVGImage.cpp |
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp |
index ca2cc3f6bb3804707b77e8066bb8aa936231ba70..4eece5f8640c22ca445bf53d48ec562c02656414 100644 |
--- a/Source/core/svg/graphics/SVGImage.cpp |
+++ b/Source/core/svg/graphics/SVGImage.cpp |
@@ -395,6 +395,20 @@ bool SVGImage::hasAnimations() const |
return rootElement->timeContainer()->hasAnimations() || toLocalFrame(m_page->mainFrame())->document()->timeline().hasPendingUpdates(); |
} |
+void SVGImage::advanceAnimationForTesting() |
+{ |
+ if (SVGSVGElement* rootElement = svgRootElement(m_page.get())) { |
+ rootElement->timeContainer()->advanceFrameForTesting(); |
+ |
+ // The following triggers animation updates which can issue a new draw |
+ // but will not perminately change the animation timeline. |
fs
2015/09/08 14:50:57
s/perminately/permanently/ ?
pdr.
2015/09/08 22:50:37
Nice catch. Fixed.
|
+ // TODO(pdr): Actually advance the document timeline so CSS animations |
fs
2015/09/08 14:50:57
Doing this would also "advance" the SMILTimeContai
|
+ // can be properly tested. |
+ rootElement->document().page()->animator().serviceScriptedAnimations(rootElement->getCurrentTime()); |
+ imageObserver()->animationAdvanced(this); |
+ } |
+} |
+ |
void SVGImage::updateUseCounters(Document& document) const |
{ |
if (SVGSVGElement* rootElement = svgRootElement(m_page.get())) { |