summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/animation/animation.cc4
-rw-r--r--cc/animation/animation.h2
-rw-r--r--webkit/renderer/compositor_bindings/compositor_bindings.gyp2
-rw-r--r--webkit/renderer/compositor_bindings/web_animation_impl.cc13
-rw-r--r--webkit/renderer/compositor_bindings/web_compositor_support_impl.cc13
-rw-r--r--webkit/renderer/compositor_bindings/web_compositor_support_impl.h7
-rw-r--r--webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc52
-rw-r--r--webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h51
8 files changed, 3 insertions, 141 deletions
diff --git a/cc/animation/animation.cc b/cc/animation/animation.cc
index 263c347..f21a1d4 100644
--- a/cc/animation/animation.cc
+++ b/cc/animation/animation.cc
@@ -32,8 +32,8 @@ static const char* const s_targetPropertyNames[] = {
"Transform",
"Opacity",
"Filter",
- "ScrollOffset",
- "BackgroundColor"
+ "BackgroundColor",
+ "ScrollOffset"
};
COMPILE_ASSERT(static_cast<int>(cc::Animation::TargetPropertyEnumSize) ==
diff --git a/cc/animation/animation.h b/cc/animation/animation.h
index f996c38..c7d53c2 100644
--- a/cc/animation/animation.h
+++ b/cc/animation/animation.h
@@ -42,8 +42,8 @@ class CC_EXPORT Animation {
Transform = 0,
Opacity,
Filter,
- ScrollOffset,
BackgroundColor,
+ ScrollOffset,
// This sentinel must be last.
TargetPropertyEnumSize
};
diff --git a/webkit/renderer/compositor_bindings/compositor_bindings.gyp b/webkit/renderer/compositor_bindings/compositor_bindings.gyp
index 09f4b51..6acc57c 100644
--- a/webkit/renderer/compositor_bindings/compositor_bindings.gyp
+++ b/webkit/renderer/compositor_bindings/compositor_bindings.gyp
@@ -69,8 +69,6 @@
'web_layer_impl_fixed_bounds.h',
'web_nine_patch_layer_impl.cc',
'web_nine_patch_layer_impl.h',
- 'web_scroll_offset_animation_curve_impl.cc',
- 'web_scroll_offset_animation_curve_impl.h',
'web_scrollbar_layer_impl.cc',
'web_scrollbar_layer_impl.h',
'web_solid_color_layer_impl.cc',
diff --git a/webkit/renderer/compositor_bindings/web_animation_impl.cc b/webkit/renderer/compositor_bindings/web_animation_impl.cc
index c401d5c..dbcc184 100644
--- a/webkit/renderer/compositor_bindings/web_animation_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_animation_impl.cc
@@ -11,7 +11,6 @@
#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;
@@ -52,14 +51,6 @@ 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(),
@@ -118,9 +109,5 @@ 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
diff --git a/webkit/renderer/compositor_bindings/web_compositor_support_impl.cc b/webkit/renderer/compositor_bindings/web_compositor_support_impl.cc
index 51bb621..a49de09 100644
--- a/webkit/renderer/compositor_bindings/web_compositor_support_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_compositor_support_impl.cc
@@ -19,7 +19,6 @@
#include "webkit/renderer/compositor_bindings/web_image_layer_impl.h"
#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
#include "webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.h"
-#include "webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h"
#include "webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h"
#include "webkit/renderer/compositor_bindings/web_solid_color_layer_impl.h"
#include "webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.h"
@@ -41,9 +40,6 @@ using blink::WebScrollbar;
using blink::WebScrollbarLayer;
using blink::WebScrollbarThemeGeometry;
using blink::WebScrollbarThemePainter;
-#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
-using blink::WebScrollOffsetAnimationCurve;
-#endif
using blink::WebSolidColorLayer;
using blink::WebTransformAnimationCurve;
using blink::WebTransformOperations;
@@ -110,15 +106,6 @@ WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() {
return new WebFloatAnimationCurveImpl();
}
-#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
-WebScrollOffsetAnimationCurve*
-WebCompositorSupportImpl::createScrollOffsetAnimationCurve(
- blink::WebFloatPoint target_value,
- blink::WebAnimationCurve::TimingFunctionType timing_function) {
- return new WebScrollOffsetAnimationCurveImpl(target_value, timing_function);
-}
-#endif
-
WebTransformAnimationCurve*
WebCompositorSupportImpl::createTransformAnimationCurve() {
return new WebTransformAnimationCurveImpl();
diff --git a/webkit/renderer/compositor_bindings/web_compositor_support_impl.h b/webkit/renderer/compositor_bindings/web_compositor_support_impl.h
index e89a0cb..276a5906 100644
--- a/webkit/renderer/compositor_bindings/web_compositor_support_impl.h
+++ b/webkit/renderer/compositor_bindings/web_compositor_support_impl.h
@@ -7,7 +7,6 @@
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop_proxy.h"
-#include "third_party/WebKit/public/platform/WebAnimationCurve.h"
#include "third_party/WebKit/public/platform/WebCompositorSupport.h"
#include "third_party/WebKit/public/platform/WebLayer.h"
#include "third_party/WebKit/public/platform/WebTransformOperations.h"
@@ -44,12 +43,6 @@ class WebCompositorSupportImpl : public blink::WebCompositorSupport {
int animation_id);
virtual blink::WebFilterAnimationCurve* createFilterAnimationCurve();
virtual blink::WebFloatAnimationCurve* createFloatAnimationCurve();
-#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
- virtual blink::WebScrollOffsetAnimationCurve*
- createScrollOffsetAnimationCurve(
- blink::WebFloatPoint target_value,
- blink::WebAnimationCurve::TimingFunctionType timing_function);
-#endif
virtual blink::WebTransformAnimationCurve* createTransformAnimationCurve();
virtual blink::WebTransformOperations* createTransformOperations();
virtual blink::WebFilterOperations* createFilterOperations();
diff --git a/webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc b/webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc
deleted file mode 100644
index fc6c76a..0000000
--- a/webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h"
-
-#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
-
-#include "cc/animation/scroll_offset_animation_curve.h"
-#include "cc/animation/timing_function.h"
-#include "webkit/renderer/compositor_bindings/web_animation_curve_common.h"
-
-using blink::WebFloatPoint;
-
-namespace webkit {
-
-WebScrollOffsetAnimationCurveImpl::WebScrollOffsetAnimationCurveImpl(
- WebFloatPoint target_value,
- TimingFunctionType timing_function)
- : curve_(cc::ScrollOffsetAnimationCurve::Create(
- gfx::Vector2dF(target_value.x, target_value.y),
- CreateTimingFunction(timing_function))) {}
-
-WebScrollOffsetAnimationCurveImpl::~WebScrollOffsetAnimationCurveImpl() {}
-
-blink::WebAnimationCurve::AnimationCurveType
-WebScrollOffsetAnimationCurveImpl::type() const {
- return WebAnimationCurve::AnimationCurveTypeScrollOffset;
-}
-
-void WebScrollOffsetAnimationCurveImpl::setInitialValue(
- WebFloatPoint initial_value) {
- curve_->SetInitialValue(gfx::Vector2dF(initial_value.x, initial_value.y));
-}
-
-WebFloatPoint WebScrollOffsetAnimationCurveImpl::getValue(double time) const {
- gfx::Vector2dF value = curve_->GetValue(time);
- return WebFloatPoint(value.x(), value.y());
-}
-
-double WebScrollOffsetAnimationCurveImpl::duration() const {
- return curve_->Duration();
-}
-
-scoped_ptr<cc::AnimationCurve>
-WebScrollOffsetAnimationCurveImpl::CloneToAnimationCurve() const {
- return curve_->Clone();
-}
-
-} // namespace webkit
-
-#endif // WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
diff --git a/webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h b/webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h
deleted file mode 100644
index ae1c8b0..0000000
--- a/webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_
-#define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_
-
-#include "third_party/WebKit/public/platform/WebAnimationCurve.h"
-
-#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
-
-#include "base/memory/scoped_ptr.h"
-#include "third_party/WebKit/public/platform/WebScrollOffsetAnimationCurve.h"
-#include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h"
-
-namespace cc {
-class AnimationCurve;
-class ScrollOffsetAnimationCurve;
-}
-
-namespace webkit {
-
-class WebScrollOffsetAnimationCurveImpl
- : public blink::WebScrollOffsetAnimationCurve {
- public:
- WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebScrollOffsetAnimationCurveImpl(
- blink::WebFloatPoint target_value,
- TimingFunctionType timing_function);
- virtual ~WebScrollOffsetAnimationCurveImpl();
-
- // blink::WebAnimationCurve implementation.
- virtual AnimationCurveType type() const;
-
- // blink::WebScrollOffsetAnimationCurve implementation.
- virtual void setInitialValue(blink::WebFloatPoint initial_value);
- virtual blink::WebFloatPoint getValue(double time) const;
- virtual double duration() const;
-
- scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const;
-
- private:
- scoped_ptr<cc::ScrollOffsetAnimationCurve> curve_;
-
- DISALLOW_COPY_AND_ASSIGN(WebScrollOffsetAnimationCurveImpl);
-};
-
-} // namespace webkit
-
-#endif // WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
-
-#endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_