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

Side by Side 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, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "core/animation/KeyframeEffectReadOnly.h"
6
7 #include "bindings/core/v8/Dictionary.h"
8 #include "bindings/core/v8/ExceptionState.h"
9 #include "core/animation/EffectInput.h"
10 #include "core/animation/KeyframeEffect.h"
11 #include "core/animation/KeyframeEffectOptions.h"
12 #include "core/animation/SampledEffect.h"
13 #include "core/animation/TimingInput.h"
14 #include "core/dom/Element.h"
15 #include "core/frame/UseCounter.h"
16
17 namespace blink {
18
19 // Web Animations API Bindings constructors. We never actually want to create a
20 // KeyframeEffectReadOnly object, we just want to provide a read-only interface
21 // to the KeyframeEffect object, so pass straight through to the subclass
22 // factory methods.
23 KeyframeEffectReadOnly* KeyframeEffectReadOnly::create(ExecutionContext* executi onContext, Element* element, const DictionarySequenceOrDictionary& effectInput, double duration, ExceptionState& exceptionState)
24 {
25 return KeyframeEffect::create(executionContext, element, effectInput, durati on, exceptionState);
26 }
27
28 KeyframeEffectReadOnly* KeyframeEffectReadOnly::create(ExecutionContext* executi onContext, Element* element, const DictionarySequenceOrDictionary& effectInput, const KeyframeEffectOptions& timingInput, ExceptionState& exceptionState)
29 {
30 return KeyframeEffect::create(executionContext, element, effectInput, timing Input, exceptionState);
31 }
32
33 KeyframeEffectReadOnly* KeyframeEffectReadOnly::create(ExecutionContext* executi onContext, Element* element, const DictionarySequenceOrDictionary& effectInput, ExceptionState& exceptionState)
34 {
35 return KeyframeEffect::create(executionContext, element, effectInput, except ionState);
36 }
37
38 KeyframeEffectReadOnly::KeyframeEffectReadOnly(Element* target, EffectModel* mod el, const Timing& timing, EventDelegate* eventDelegate)
39 : AnimationEffectReadOnly(timing, eventDelegate)
40 , m_target(target)
41 , m_model(model)
42 , m_sampledEffect(nullptr)
43 {
44 }
45
46 DEFINE_TRACE(KeyframeEffectReadOnly)
47 {
48 visitor->trace(m_target);
49 visitor->trace(m_model);
50 visitor->trace(m_sampledEffect);
51 AnimationEffectReadOnly::trace(visitor);
52 }
53
54 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698