summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-12 19:25:17 +0000
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-12 19:25:17 +0000
commitd059942239cea4e43435f12ee781f36ea955ac3b (patch)
tree6fa61a5b3960d41df503575934cf9c5520716b82
parent318a6c7f41368480504cd258bf1d3ade8079b8f8 (diff)
downloadchromium_src-d059942239cea4e43435f12ee781f36ea955ac3b.zip
chromium_src-d059942239cea4e43435f12ee781f36ea955ac3b.tar.gz
chromium_src-d059942239cea4e43435f12ee781f36ea955ac3b.tar.bz2
Revert of https://codereview.chromium.org/132903003/
Reason for revert: browser_test crashes on Linux ChromiumOS Tests (dbg)(2) TBR=sky@chromium.org,vollick@chromium.org NOTREECHECKS=true NOTRY=true BUG=None Review URL: https://codereview.chromium.org/131473003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244448 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ui/compositor/layer_animation_element.cc2
-rw-r--r--ui/compositor/layer_animator.h2
-rw-r--r--ui/views/corewm/visibility_controller.cc21
3 files changed, 4 insertions, 21 deletions
diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc
index f6b91f4..76f8ab7 100644
--- a/ui/compositor/layer_animation_element.cc
+++ b/ui/compositor/layer_animation_element.cc
@@ -219,7 +219,7 @@ class VisibilityTransition : public LayerAnimationElement {
protected:
virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
- start_ = delegate ? delegate->GetVisibilityForAnimation() : !target_;
+ start_ = delegate->GetVisibilityForAnimation();
}
virtual bool OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE {
diff --git a/ui/compositor/layer_animator.h b/ui/compositor/layer_animator.h
index a1ce619..ad3754d 100644
--- a/ui/compositor/layer_animator.h
+++ b/ui/compositor/layer_animator.h
@@ -34,7 +34,7 @@ class ScopedLayerAnimationSettings;
// When a property of layer needs to be changed it is set by way of
// LayerAnimator. This enables LayerAnimator to animate property changes.
// NB: during many tests, set_disable_animations_for_test is used and causes
-// all animations to complete immediately. The layer animator is ref counted
+// all animations to complete immediately. The layer animation is ref counted
// so that if its owning layer is deleted (and the owning layer is only other
// class that should ever hold a ref ptr to a LayerAnimator), the animator can
// ensure that it is not disposed of until it finishes executing. It does this
diff --git a/ui/views/corewm/visibility_controller.cc b/ui/views/corewm/visibility_controller.cc
index b6fa833..c34f4f3 100644
--- a/ui/views/corewm/visibility_controller.cc
+++ b/ui/views/corewm/visibility_controller.cc
@@ -7,8 +7,6 @@
#include "ui/aura/window.h"
#include "ui/aura/window_property.h"
#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animation_sequence.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/views/corewm/window_animations.h"
namespace views {
@@ -50,7 +48,8 @@ void VisibilityController::UpdateLayerVisibility(aura::Window* window,
if (!visible) {
// For window hiding animation, we want to check if the window is already
- // animating, and delay calling SetVisible(false) if it is.
+ // animating, and not do SetVisible(false) if it is.
+ // TODO(vollick): remove this.
animated = animated || (window->layer()->GetAnimator()->
IsAnimatingProperty(ui::LayerAnimationElement::OPACITY) &&
window->layer()->GetTargetOpacity() == 0.0f);
@@ -61,22 +60,6 @@ void VisibilityController::UpdateLayerVisibility(aura::Window* window,
// only made not visible once the animation is complete.
if (!animated || visible)
window->layer()->SetVisible(visible);
- else {
- base::TimeDelta duration = base::TimeDelta::FromSeconds(0);
- ui::LayerAnimator* animator = window->layer()->GetAnimator();
- // Since we're likely not running a visibility animation currently (just an
- // opacity animation), if we were to schedule a visibility animation now,
- // it would run immediately since the property is 'free'. We don't want
- // this. Scheduling a zero duration pause will fix this. The visibility
- // animation will run after the "pause", and the pause won't run until the
- // opacity animation is done.
- animator->SchedulePauseForProperties(duration,
- ui::LayerAnimationElement::OPACITY,
- ui::LayerAnimationElement::VISIBILITY,
- -1);
- animator->ScheduleAnimation(new ui::LayerAnimationSequence(
- ui::LayerAnimationElement::CreateVisibilityElement(visible, duration)));
- }
}
SuspendChildWindowVisibilityAnimations::SuspendChildWindowVisibilityAnimations(