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

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

Issue 2398373002: Construct KeyframeEffectReadOnly objects (Closed)
Patch Set: Test tweaks in response to review 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
index 1c07f6ab1bcfc3c786609c6e08f02750cd4c0721..a7d89ac50fdad1f05161a2a45024f3c67e8df9cb 100644
--- a/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
+++ b/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
@@ -58,10 +58,11 @@ KeyframeEffect* KeyframeEffect::create(
double duration,
ExceptionState& exceptionState) {
DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
- if (element)
+ if (element) {
UseCounter::count(
element->document(),
UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
+ }
Timing timing;
if (!TimingInput::convert(duration, timing, exceptionState))
return nullptr;
@@ -77,10 +78,11 @@ KeyframeEffect* KeyframeEffect::create(
const KeyframeEffectOptions& timingInput,
ExceptionState& exceptionState) {
DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
- if (element)
+ if (element) {
UseCounter::count(
element->document(),
UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
+ }
Timing timing;
Document* document = element ? &element->document() : nullptr;
if (!TimingInput::convert(timingInput, timing, document, exceptionState))
@@ -96,10 +98,11 @@ KeyframeEffect* KeyframeEffect::create(
const DictionarySequenceOrDictionary& effectInput,
ExceptionState& exceptionState) {
DCHECK(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
- if (element)
+ if (element) {
UseCounter::count(
element->document(),
UseCounter::AnimationConstructorKeyframeListEffectNoTiming);
+ }
return create(element, EffectInput::convert(element, effectInput,
executionContext, exceptionState),
Timing());

Powered by Google App Engine
This is Rietveld 408576698