Remove OmniboxViewViews::ElideAnimation::HasStarted
This method was a relic from an earlier version of this code, when the animation faded the path from a given starting color to a given ending color. In that version, HasStarted() was necessary to avoid duplicate animations, which would cause a flicker. For example, an initial user interaction would start to animate the path from opaque to transparent, and a subsequent user interaction while still animating could restart the same animation, causing the path to flicker from a midpoint color back to opaque to start the animation again. To avoid this flicker, I introduced HasStarted() to avoid running a given animation more than once. But the new ElideAnimation version of the code animates from whatever the current state is to the desired end state. This means that restarting a duplicate animation is a no-op and doesn't cause any flicker, so we can get rid of HasStarted(). I've also added unit tests for the cases where HasStarted() was used. Bug: 1099875 Change-Id: I53af1ae2437fbe24e6646c99d743f0af2a398ffa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2278164 Commit-Queue: Emily Stark <estark@chromium.org> Reviewed-by:Justin Donnelly <jdonnelly@chromium.org> Cr-Commit-Position: refs/heads/master@{#785747}
Showing
This diff is collapsed.
Please register or sign in to comment