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

Side by Side Diff: third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/animation/KeyframeEffectReadOnly.h" 5 #include "core/animation/KeyframeEffectReadOnly.h"
6 6
7 #include "bindings/core/v8/Dictionary.h" 7 #include "bindings/core/v8/Dictionary.h"
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "core/animation/Animation.h" 9 #include "core/animation/Animation.h"
10 #include "core/animation/CompositorAnimations.h" 10 #include "core/animation/CompositorAnimations.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ExceptionState& exceptionState) { 42 ExceptionState& exceptionState) {
43 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); 43 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
44 if (element) { 44 if (element) {
45 UseCounter::count( 45 UseCounter::count(
46 element->document(), 46 element->document(),
47 UseCounter::AnimationConstructorKeyframeListEffectObjectTiming); 47 UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
48 } 48 }
49 Timing timing; 49 Timing timing;
50 if (!TimingInput::convert(duration, timing, exceptionState)) 50 if (!TimingInput::convert(duration, timing, exceptionState))
51 return nullptr; 51 return nullptr;
52 return create(element, EffectInput::convert(element, effectInput, 52 return create(element,
53 executionContext, exceptionState), 53 EffectInput::convert(element, effectInput, executionContext,
54 exceptionState),
54 timing); 55 timing);
55 } 56 }
56 57
57 KeyframeEffectReadOnly* KeyframeEffectReadOnly::create( 58 KeyframeEffectReadOnly* KeyframeEffectReadOnly::create(
58 ExecutionContext* executionContext, 59 ExecutionContext* executionContext,
59 Element* element, 60 Element* element,
60 const DictionarySequenceOrDictionary& effectInput, 61 const DictionarySequenceOrDictionary& effectInput,
61 const KeyframeEffectOptions& timingInput, 62 const KeyframeEffectOptions& timingInput,
62 ExceptionState& exceptionState) { 63 ExceptionState& exceptionState) {
63 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); 64 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
64 if (element) { 65 if (element) {
65 UseCounter::count( 66 UseCounter::count(
66 element->document(), 67 element->document(),
67 UseCounter::AnimationConstructorKeyframeListEffectObjectTiming); 68 UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
68 } 69 }
69 Timing timing; 70 Timing timing;
70 Document* document = element ? &element->document() : nullptr; 71 Document* document = element ? &element->document() : nullptr;
71 if (!TimingInput::convert(timingInput, timing, document, exceptionState)) 72 if (!TimingInput::convert(timingInput, timing, document, exceptionState))
72 return nullptr; 73 return nullptr;
73 return create(element, EffectInput::convert(element, effectInput, 74 return create(element,
74 executionContext, exceptionState), 75 EffectInput::convert(element, effectInput, executionContext,
76 exceptionState),
75 timing); 77 timing);
76 } 78 }
77 79
78 KeyframeEffectReadOnly* KeyframeEffectReadOnly::create( 80 KeyframeEffectReadOnly* KeyframeEffectReadOnly::create(
79 ExecutionContext* executionContext, 81 ExecutionContext* executionContext,
80 Element* element, 82 Element* element,
81 const DictionarySequenceOrDictionary& effectInput, 83 const DictionarySequenceOrDictionary& effectInput,
82 ExceptionState& exceptionState) { 84 ExceptionState& exceptionState) {
83 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); 85 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
84 if (element) { 86 if (element) {
85 UseCounter::count( 87 UseCounter::count(
86 element->document(), 88 element->document(),
87 UseCounter::AnimationConstructorKeyframeListEffectNoTiming); 89 UseCounter::AnimationConstructorKeyframeListEffectNoTiming);
88 } 90 }
89 return create(element, EffectInput::convert(element, effectInput, 91 return create(element,
90 executionContext, exceptionState), 92 EffectInput::convert(element, effectInput, executionContext,
93 exceptionState),
91 Timing()); 94 Timing());
92 } 95 }
93 96
94 KeyframeEffectReadOnly::KeyframeEffectReadOnly(Element* target, 97 KeyframeEffectReadOnly::KeyframeEffectReadOnly(Element* target,
95 EffectModel* model, 98 EffectModel* model,
96 const Timing& timing, 99 const Timing& timing,
97 Priority priority, 100 Priority priority,
98 EventDelegate* eventDelegate) 101 EventDelegate* eventDelegate)
99 : AnimationEffectReadOnly(timing, eventDelegate), 102 : AnimationEffectReadOnly(timing, eventDelegate),
100 m_target(target), 103 m_target(target),
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } 373 }
371 374
372 DEFINE_TRACE(KeyframeEffectReadOnly) { 375 DEFINE_TRACE(KeyframeEffectReadOnly) {
373 visitor->trace(m_target); 376 visitor->trace(m_target);
374 visitor->trace(m_model); 377 visitor->trace(m_model);
375 visitor->trace(m_sampledEffect); 378 visitor->trace(m_sampledEffect);
376 AnimationEffectReadOnly::trace(visitor); 379 AnimationEffectReadOnly::trace(visitor);
377 } 380 }
378 381
379 } // namespace blink 382 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698