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

Unified Diff: Source/platform/graphics/ImageAnimationPolicy.h

Issue 754813002: Expose setting API to set ImageAnimationPolicy(Allowed, Once, None) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update with fix layout test fail Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/ImageAnimationPolicy.h
diff --git a/Source/core/dom/EmptyNodeList.cpp b/Source/platform/graphics/ImageAnimationPolicy.h
similarity index 77%
copy from Source/core/dom/EmptyNodeList.cpp
copy to Source/platform/graphics/ImageAnimationPolicy.h
index f42da565eece3f6355267a9887d2e5dca1e46780..a4431d2d23186d5b00dc2f4452d4ad38397cc175 100644
--- a/Source/core/dom/EmptyNodeList.cpp
+++ b/Source/platform/graphics/ImageAnimationPolicy.h
@@ -1,5 +1,4 @@
/*
tkent 2014/12/01 01:45:34 Please use the 3-line header. http://www.chromium
je_julie(Not used) 2014/12/01 05:29:24 Done
- * Copyright (C) 2013 Apple Inc. All rights reserved.
* Copyright (C) 2014 Samsung Electronics. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,30 +28,23 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
-#include "core/dom/EmptyNodeList.h"
-
-#include "core/dom/Node.h"
-#include "core/dom/NodeRareData.h"
+#ifndef ImageAnimationPolicy_h
+#define ImageAnimationPolicy_h
namespace blink {
-EmptyNodeList::~EmptyNodeList()
-{
-#if !ENABLE(OILPAN)
- m_owner->nodeLists()->removeEmptyChildNodeList(this);
-#endif
-}
-
-Node* EmptyNodeList::virtualOwnerNode() const
-{
- return &ownerNode();
-}
+// ImageAnimationPolicy is used for controling image animation
dmazzoni 2014/11/29 07:56:33 nit: controling -> controlling
je_julie(Not used) 2014/12/01 05:29:24 Done
+// when image frame is rendered for animation
-void EmptyNodeList::trace(Visitor* visitor)
-{
- visitor->trace(m_owner);
- NodeList::trace(visitor);
-}
+enum ImageAnimationPolicy {
+ // Keep image animated(it's normal behavior).
+ ImageAnimationPolicyAllowed,
dmazzoni 2014/11/29 07:56:33 I'd write this as: // Animate the image (the defa
je_julie(Not used) 2014/12/01 05:29:24 Done
+ // Animate image just once.
+ ImageAnimationPolicyAnimateOnce,
+ // Animation is not allowed and keep still image.
dmazzoni 2014/11/29 07:56:33 How about this? // Show the first frame and do no
je_julie(Not used) 2014/12/01 05:29:24 Done
+ ImageAnimationPolicyNoAnimation
+};
} // namespace blink
+
+#endif // ImageAnimationPolicy_h

Powered by Google App Engine
This is Rietveld 408576698