Commit 214b555e authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Convert Layout() calls to InvalidateLayout().

Once a layout is performed, if anything moves, that will schedule paints
as appropriate.

Bug: 627663
Change-Id: Ia6c32431f39af8380ebb9e9ec9a357ea5366da84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2348292Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797509}
parent fdf6ef00
...@@ -199,8 +199,7 @@ void DownloadShelfView::Layout() { ...@@ -199,8 +199,7 @@ void DownloadShelfView::Layout() {
void DownloadShelfView::AnimationProgressed(const gfx::Animation* animation) { void DownloadShelfView::AnimationProgressed(const gfx::Animation* animation) {
if (animation == &new_item_animation_) { if (animation == &new_item_animation_) {
Layout(); InvalidateLayout();
SchedulePaint();
} else if (animation == &shelf_animation_) { } else if (animation == &shelf_animation_) {
// Force a re-layout of the parent, which will call back into // Force a re-layout of the parent, which will call back into
// GetPreferredSize, where we will do our animation. In the case where the // GetPreferredSize, where we will do our animation. In the case where the
...@@ -285,8 +284,7 @@ void DownloadShelfView::RemoveDownloadView(View* view) { ...@@ -285,8 +284,7 @@ void DownloadShelfView::RemoveDownloadView(View* view) {
Close(); Close();
else else
AutoClose(); AutoClose();
Layout(); InvalidateLayout();
SchedulePaint();
} }
void DownloadShelfView::ConfigureButtonForTheme(views::MdTextButton* button) { void DownloadShelfView::ConfigureButtonForTheme(views::MdTextButton* button) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment