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

Unified Diff: third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.cpp

Issue 2369833002: Introduce KeyframeEffectReadOnly interface (Closed)
Patch Set: Use short form of copyright message Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.cpp
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fc2e4926331dcc0e78f0a2c854e4f417c7b9f841
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.cpp
@@ -0,0 +1,54 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/animation/KeyframeEffectReadOnly.h"
+
+#include "bindings/core/v8/Dictionary.h"
+#include "bindings/core/v8/ExceptionState.h"
+#include "core/animation/EffectInput.h"
+#include "core/animation/KeyframeEffect.h"
+#include "core/animation/KeyframeEffectOptions.h"
+#include "core/animation/SampledEffect.h"
+#include "core/animation/TimingInput.h"
+#include "core/dom/Element.h"
+#include "core/frame/UseCounter.h"
+
+namespace blink {
+
+// Web Animations API Bindings constructors. We never actually want to create a
+// KeyframeEffectReadOnly object, we just want to provide a read-only interface
+// to the KeyframeEffect object, so pass straight through to the subclass
+// factory methods.
+KeyframeEffectReadOnly* KeyframeEffectReadOnly::create(ExecutionContext* executionContext, Element* element, const DictionarySequenceOrDictionary& effectInput, double duration, ExceptionState& exceptionState)
+{
+ return KeyframeEffect::create(executionContext, element, effectInput, duration, exceptionState);
+}
+
+KeyframeEffectReadOnly* KeyframeEffectReadOnly::create(ExecutionContext* executionContext, Element* element, const DictionarySequenceOrDictionary& effectInput, const KeyframeEffectOptions& timingInput, ExceptionState& exceptionState)
+{
+ return KeyframeEffect::create(executionContext, element, effectInput, timingInput, exceptionState);
+}
+
+KeyframeEffectReadOnly* KeyframeEffectReadOnly::create(ExecutionContext* executionContext, Element* element, const DictionarySequenceOrDictionary& effectInput, ExceptionState& exceptionState)
+{
+ return KeyframeEffect::create(executionContext, element, effectInput, exceptionState);
+}
+
+KeyframeEffectReadOnly::KeyframeEffectReadOnly(Element* target, EffectModel* model, const Timing& timing, EventDelegate* eventDelegate)
+ : AnimationEffectReadOnly(timing, eventDelegate)
+ , m_target(target)
+ , m_model(model)
+ , m_sampledEffect(nullptr)
+{
+}
+
+DEFINE_TRACE(KeyframeEffectReadOnly)
+{
+ visitor->trace(m_target);
+ visitor->trace(m_model);
+ visitor->trace(m_sampledEffect);
+ AnimationEffectReadOnly::trace(visitor);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698