Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index 0a8a986932c617eb0a17ce44c542e908f3ed58ca..293ecc90a75fb1e3acaf69ef323ef70dbff8ebfe 100644 |
--- a/Source/core/rendering/RenderObject.cpp |
+++ b/Source/core/rendering/RenderObject.cpp |
@@ -2790,7 +2790,7 @@ void RenderObject::collectAnnotatedRegions(Vector<AnnotatedRegionValue>& regions |
curr->collectAnnotatedRegions(regions); |
} |
-bool RenderObject::willRenderImage(ImageResource*) |
+bool RenderObject::willRenderImage(ImageResource*, bool repeated) |
{ |
// Without visibility we won't render (and therefore don't care about animation). |
if (style()->visibility() != VISIBLE) |
@@ -2800,6 +2800,16 @@ bool RenderObject::willRenderImage(ImageResource*) |
if (document().activeDOMObjectsAreSuspended()) |
return false; |
+ // We will not render a new imagePweb |
dmazzoni
2014/11/24 17:50:47
Typo?
je_julie(Not used)
2014/11/27 17:22:50
Done.
|
+ // when AnimatedImageType is set to AnimatedImageTypeNone or |
+ // when AnimatedImageType is set to AnimatedImageTypeOnce and frame is last. |
+ if (document().settings()) { |
+ AnimatedImageType animation = document().settings()->animatedImageType(); |
+ if (animation == AnimatedImageTypeNone) |
+ return false; |
+ if (animation == AnimatedImageTypeOnce && repeated) |
+ return false; |
+ } |
// If we're not in a window (i.e., we're dormant from being in a background tab) |
// then we don't want to render either. |
return document().view()->isVisible(); |