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

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

Issue 2047293002: Code cleanup: Replace Element with Document in element.animate() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_killForceConversionsToAnimatableValues
Patch Set: Fix unit test crash. Created 4 years, 5 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/AnimationEffectTiming.cpp
diff --git a/third_party/WebKit/Source/core/animation/AnimationEffectTiming.cpp b/third_party/WebKit/Source/core/animation/AnimationEffectTiming.cpp
index f95a7b5a1542491371b1812ea5c3147a8272b7ca..ff063821247b43165ecaf26c7c290ade131cafa7 100644
--- a/third_party/WebKit/Source/core/animation/AnimationEffectTiming.cpp
+++ b/third_party/WebKit/Source/core/animation/AnimationEffectTiming.cpp
@@ -8,6 +8,7 @@
#include "bindings/core/v8/UnrestrictedDoubleOrString.h"
#include "core/animation/AnimationEffect.h"
#include "core/animation/KeyframeEffect.h"
+#include "core/dom/Document.h"
#include "platform/animation/TimingFunction.h"
namespace blink {
@@ -126,15 +127,10 @@ void AnimationEffectTiming::setDirection(String direction)
m_parent->updateSpecifiedTiming(timing);
}
-void AnimationEffectTiming::setEasing(String easing, ExceptionState& exceptionState)
+void AnimationEffectTiming::setEasing(ExecutionContext* executionContext, String easing, ExceptionState& exceptionState)
{
Timing timing = m_parent->specifiedTiming();
- // The AnimationEffectTiming might not be attached to a document at this
- // point, so we pass nullptr in to setTimingFunction. This means that these
- // calls are not considered in the WebAnimationsEasingAsFunction*
- // UseCounters, but the bug we are tracking there does not come through
- // this interface.
- if (TimingInput::setTimingFunction(timing, easing, nullptr, exceptionState))
+ if (TimingInput::setTimingFunction(timing, easing, toDocument(*executionContext), exceptionState))
m_parent->updateSpecifiedTiming(timing);
}

Powered by Google App Engine
This is Rietveld 408576698