Skip to content

Commit e6a4baf

Browse files
chlily1Chromium LUCI CQ
authored and
Chromium LUCI CQ
committed
[M113][DownloadBubble] Always invalidate layout when showing animation
This fixes a bug that caused the download animation to go up the left side of the window to (0, 0). By always invalidating the layout when the animation needs to be displayed, we will force Layout() to run first before the code that calculates the animation's position based on the view bounds. (cherry picked from commit 771f528) Bug: 1428369 Change-Id: Idb381181e3790b3b76f550c51368570b77e00d01 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4375591 Commit-Queue: Lily Chen <chlily@chromium.org> Reviewed-by: Daniel Rubery <drubery@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1123095} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4381536 Auto-Submit: Lily Chen <chlily@chromium.org> Cr-Commit-Position: refs/branch-heads/5672@{#129} Cr-Branched-From: 5f2a724-refs/heads/main@{#1121455}
1 parent 1bf3d7f commit e6a4baf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc

+2-3
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,8 @@ void DownloadToolbarButtonView::Disable() {
278278
void DownloadToolbarButtonView::UpdateDownloadIcon(bool show_animation) {
279279
if (show_animation && gfx::Animation::ShouldRenderRichAnimation()) {
280280
has_pending_download_started_animation_ = true;
281-
if (!needs_layout()) {
282-
ShowPendingDownloadStartedAnimation();
283-
}
281+
// Invalidate the layout to show the animation in Layout().
282+
PreferredSizeChanged();
284283
}
285284
UpdateIcon();
286285
}

0 commit comments

Comments
 (0)