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

Unified Diff: third_party/WebKit/Source/core/animation/ElementAnimation.h

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/ElementAnimation.h
diff --git a/third_party/WebKit/Source/core/animation/ElementAnimation.h b/third_party/WebKit/Source/core/animation/ElementAnimation.h
index a21eb7b5dfa54f71d5b87c32c2cc79e51a36f0da..f70ee70198dc5bbeb4ec94397e079f0f06679ed8 100644
--- a/third_party/WebKit/Source/core/animation/ElementAnimation.h
+++ b/third_party/WebKit/Source/core/animation/ElementAnimation.h
@@ -52,7 +52,7 @@ class ElementAnimation {
public:
static Animation* animate(ExecutionContext* executionContext, Element& element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, double duration, ExceptionState& exceptionState)
{
- EffectModel* effect = EffectInput::convert(&element, effectInput, executionContext, exceptionState);
+ EffectModel* effect = EffectInput::convert(element.document(), effectInput, executionContext, exceptionState);
if (exceptionState.hadException())
return nullptr;
@@ -65,12 +65,12 @@ public:
static Animation* animate(ExecutionContext* executionContext, Element& element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, const KeyframeEffectOptions& options, ExceptionState& exceptionState)
{
- EffectModel* effect = EffectInput::convert(&element, effectInput, executionContext, exceptionState);
+ EffectModel* effect = EffectInput::convert(element.document(), effectInput, executionContext, exceptionState);
if (exceptionState.hadException())
return nullptr;
Timing timing;
- if (!TimingInput::convert(options, timing, &element.document(), exceptionState))
+ if (!TimingInput::convert(options, timing, element.document(), exceptionState))
return nullptr;
Animation* animation = animateInternal(element, effect, timing);
@@ -80,7 +80,7 @@ public:
static Animation* animate(ExecutionContext* executionContext, Element& element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, ExceptionState& exceptionState)
{
- EffectModel* effect = EffectInput::convert(&element, effectInput, executionContext, exceptionState);
+ EffectModel* effect = EffectInput::convert(element.document(), effectInput, executionContext, exceptionState);
if (exceptionState.hadException())
return nullptr;
return animateInternal(element, effect, Timing());

Powered by Google App Engine
This is Rietveld 408576698