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

Unified Diff: cc/layers/layer.cc

Issue 368883003: cc: Disallow scroll offset animations when impl-scrolling isn't supported (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « cc/animation/animation_registrar.cc ('k') | cc/test/fake_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index e00d2c5b905df44584ff21fdb275ae919cffaa25..82978daa03633a23d52b405414b4be0ead50b08c 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -14,6 +14,7 @@
#include "base/time/time.h"
#include "cc/animation/animation.h"
#include "cc/animation/animation_events.h"
+#include "cc/animation/animation_registrar.h"
#include "cc/animation/keyframed_animation_curve.h"
#include "cc/animation/layer_animation_controller.h"
#include "cc/layers/layer_client.h"
@@ -1099,6 +1100,11 @@ bool Layer::AddAnimation(scoped_ptr <Animation> animation) {
if (!layer_animation_controller_->animation_registrar())
return false;
+ if (animation->target_property() == Animation::ScrollOffset &&
+ !layer_animation_controller_->animation_registrar()
+ ->supports_scroll_animations())
+ return false;
+
UMA_HISTOGRAM_BOOLEAN("Renderer.AnimationAddedToOrphanLayer",
!layer_tree_host_);
layer_animation_controller_->AddAnimation(animation.Pass());
« no previous file with comments | « cc/animation/animation_registrar.cc ('k') | cc/test/fake_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698