Chromium Code Reviews| 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)) |
|
suzyh_UTC10 (ex-contributor)
2016/07/07 05:59:44
Could the toDocument conversion here ever fail, or
|
| m_parent->updateSpecifiedTiming(timing); |
| } |