Fix favicon crash animation.

This fixes several problems with the code:
* The code to animate the old favicon out of the tab was broken.  The favicon offset needed to be applied unconditionally in PaintIcon().
* The favicon (old or new) could overlay the tabstrip/toolbar divider during the bottom part of the animation, looking glitchy.  The favicon bounds needed to be clipped to the tab interior bounds.
* The code that tried to reset the crash animation when the tab data state became uncrashed didn't work, because it only functioned when the data state was still "crashed".  Besides this, since the code just deleted the animation instead of Stop()ing it, the override in the crash animation to reset the favicon offset to 0 wouldn't have run anyway.  Fixed both of these issues, which otherwise would have resulted in the favicon being left at a nonzero offset if the tab became uncrashed mid-animation.

This also cleans up a few things that will have little or no effect:
* The distance to animate down (and back up) was hardcoded to 27.  Compute this based on the tab interior height instead.  Today that height is 23, which means the animation will appear to move slightly slower and spend less time "at the bottom".  In the upcoming MD world, that height will be back to 27.
* Removed most of the helper functions and inlined them into their callers, which helped with fixing some of the bugs above and made things shorter and more obvious overall.

BUG=none
TEST=Navigate to a site with a favicon.  Use the omnibox to navigate the tab to chrome://crash then immediately switch to another tab.  The original favicon should animate down out of the tab before the crashed favicon animates up, and at the bottom the icons should not overlay the tabstrip/toolbar divider.
R=sky@chromium.org

Review URL: https://codereview.chromium.org/1394473004 .

Cr-Commit-Position: refs/heads/master@{#353419}
2 files changed