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

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

Issue 2757543002: Ensure baseComputedStyle optimisation is cleared during registered custom property animations (Closed)
Patch Set: Rebased Created 3 years, 9 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 971a1f05d0f5958c187ab6b0c180919925ef4d57..461a543a219d3713c53b2e7288eb28dad947faaf 100644
--- a/third_party/WebKit/Source/core/animation/ElementAnimation.h
+++ b/third_party/WebKit/Source/core/animation/ElementAnimation.h
@@ -66,7 +66,7 @@ class ElementAnimation {
if (!TimingInput::convert(duration, timing, exceptionState))
return nullptr;
- return animateInternal(element, effect, timing);
+ return animate(element, effect, timing);
}
static Animation* animate(ScriptState* scriptState,
@@ -85,7 +85,7 @@ class ElementAnimation {
exceptionState))
return nullptr;
- Animation* animation = animateInternal(element, effect, timing);
+ Animation* animation = animate(element, effect, timing);
animation->setId(options.id());
return animation;
}
@@ -99,7 +99,15 @@ class ElementAnimation {
exceptionState);
if (exceptionState.hadException())
return nullptr;
- return animateInternal(element, effect, Timing());
+ return animate(element, effect, Timing());
+ }
+
+ static Animation* animate(Element& element,
+ EffectModel* effect,
+ const Timing& timing) {
+ KeyframeEffect* keyframeEffect =
+ KeyframeEffect::create(&element, effect, timing);
+ return element.document().timeline().play(keyframeEffect);
}
static HeapVector<Member<Animation>> getAnimations(Element& element) {
@@ -118,15 +126,6 @@ class ElementAnimation {
}
return animations;
}
-
- private:
- static Animation* animateInternal(Element& element,
- EffectModel* effect,
- const Timing& timing) {
- KeyframeEffect* keyframeEffect =
- KeyframeEffect::create(&element, effect, timing);
- return element.document().timeline().play(keyframeEffect);
- }
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/animation/AnimationClock.cpp ('k') | third_party/WebKit/Source/core/animation/StringKeyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698