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

Unified Diff: webkit/renderer/compositor_bindings/web_animation_impl.cc

Issue 112933005: Define WebScrollOffsetAnimationCurveImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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: webkit/renderer/compositor_bindings/web_animation_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_animation_impl.cc b/webkit/renderer/compositor_bindings/web_animation_impl.cc
index dbcc184b268168ed8fed0b536ec1a63b547ee14d..c401d5c974128060ca7a6f59530fa726ff1dd463 100644
--- a/webkit/renderer/compositor_bindings/web_animation_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_animation_impl.cc
@@ -11,6 +11,7 @@
#include "third_party/WebKit/public/platform/WebAnimationCurve.h"
#include "webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h"
#include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h"
+#include "webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h"
#include "webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.h"
using cc::Animation;
@@ -51,6 +52,14 @@ WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& web_curve,
curve = filter_curve_impl->CloneToAnimationCurve();
break;
}
+#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+ case WebAnimationCurve::AnimationCurveTypeScrollOffset: {
+ const WebScrollOffsetAnimationCurveImpl* scroll_curve_impl =
+ static_cast<const WebScrollOffsetAnimationCurveImpl*>(&web_curve);
+ curve = scroll_curve_impl->CloneToAnimationCurve();
+ break;
+ }
+#endif
}
animation_ = Animation::Create(
curve.Pass(),
@@ -109,5 +118,9 @@ COMPILE_ASSERT_MATCHING_ENUMS(
WebAnimation::TargetPropertyOpacity, Animation::Opacity);
COMPILE_ASSERT_MATCHING_ENUMS(
WebAnimation::TargetPropertyFilter, Animation::Filter);
+#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+COMPILE_ASSERT_MATCHING_ENUMS(
+ WebAnimation::TargetPropertyScrollOffset, Animation::ScrollOffset);
+#endif
} // namespace webkit

Powered by Google App Engine
This is Rietveld 408576698