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

Side by Side Diff: third_party/WebKit/Source/core/animation/KeyframeEffect.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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ExceptionState& exceptionState) { 59 ExceptionState& exceptionState) {
60 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); 60 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
61 if (element) { 61 if (element) {
62 UseCounter::count( 62 UseCounter::count(
63 element->document(), 63 element->document(),
64 UseCounter::AnimationConstructorKeyframeListEffectObjectTiming); 64 UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
65 } 65 }
66 Timing timing; 66 Timing timing;
67 if (!TimingInput::convert(duration, timing, exceptionState)) 67 if (!TimingInput::convert(duration, timing, exceptionState))
68 return nullptr; 68 return nullptr;
69 return create(element, EffectInput::convert(element, effectInput, 69 return create(element,
70 executionContext, exceptionState), 70 EffectInput::convert(element, effectInput, executionContext,
71 exceptionState),
71 timing); 72 timing);
72 } 73 }
73 74
74 KeyframeEffect* KeyframeEffect::create( 75 KeyframeEffect* KeyframeEffect::create(
75 ExecutionContext* executionContext, 76 ExecutionContext* executionContext,
76 Element* element, 77 Element* element,
77 const DictionarySequenceOrDictionary& effectInput, 78 const DictionarySequenceOrDictionary& effectInput,
78 const KeyframeEffectOptions& timingInput, 79 const KeyframeEffectOptions& timingInput,
79 ExceptionState& exceptionState) { 80 ExceptionState& exceptionState) {
80 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); 81 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
81 if (element) { 82 if (element) {
82 UseCounter::count( 83 UseCounter::count(
83 element->document(), 84 element->document(),
84 UseCounter::AnimationConstructorKeyframeListEffectObjectTiming); 85 UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
85 } 86 }
86 Timing timing; 87 Timing timing;
87 Document* document = element ? &element->document() : nullptr; 88 Document* document = element ? &element->document() : nullptr;
88 if (!TimingInput::convert(timingInput, timing, document, exceptionState)) 89 if (!TimingInput::convert(timingInput, timing, document, exceptionState))
89 return nullptr; 90 return nullptr;
90 return create(element, EffectInput::convert(element, effectInput, 91 return create(element,
91 executionContext, exceptionState), 92 EffectInput::convert(element, effectInput, executionContext,
93 exceptionState),
92 timing); 94 timing);
93 } 95 }
94 96
95 KeyframeEffect* KeyframeEffect::create( 97 KeyframeEffect* KeyframeEffect::create(
96 ExecutionContext* executionContext, 98 ExecutionContext* executionContext,
97 Element* element, 99 Element* element,
98 const DictionarySequenceOrDictionary& effectInput, 100 const DictionarySequenceOrDictionary& effectInput,
99 ExceptionState& exceptionState) { 101 ExceptionState& exceptionState) {
100 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); 102 DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
101 if (element) { 103 if (element) {
102 UseCounter::count( 104 UseCounter::count(
103 element->document(), 105 element->document(),
104 UseCounter::AnimationConstructorKeyframeListEffectNoTiming); 106 UseCounter::AnimationConstructorKeyframeListEffectNoTiming);
105 } 107 }
106 return create(element, EffectInput::convert(element, effectInput, 108 return create(element,
107 executionContext, exceptionState), 109 EffectInput::convert(element, effectInput, executionContext,
110 exceptionState),
108 Timing()); 111 Timing());
109 } 112 }
110 113
111 KeyframeEffect::KeyframeEffect(Element* target, 114 KeyframeEffect::KeyframeEffect(Element* target,
112 EffectModel* model, 115 EffectModel* model,
113 const Timing& timing, 116 const Timing& timing,
114 KeyframeEffectReadOnly::Priority priority, 117 KeyframeEffectReadOnly::Priority priority,
115 EventDelegate* eventDelegate) 118 EventDelegate* eventDelegate)
116 : KeyframeEffectReadOnly(target, model, timing, priority, eventDelegate) {} 119 : KeyframeEffectReadOnly(target, model, timing, priority, eventDelegate) {}
117 120
118 KeyframeEffect::~KeyframeEffect() {} 121 KeyframeEffect::~KeyframeEffect() {}
119 122
120 AnimationEffectTiming* KeyframeEffect::timing() { 123 AnimationEffectTiming* KeyframeEffect::timing() {
121 return AnimationEffectTiming::create(this); 124 return AnimationEffectTiming::create(this);
122 } 125 }
123 126
124 } // namespace blink 127 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698