From 0bd4a57bd1e0436a72be68e6b2f5a164f4ec04a7 Mon Sep 17 00:00:00 2001 From: Emerick Rogul Date: Wed, 11 Oct 2023 16:39:38 -0400 Subject: [PATCH] UpdateIconProgress method was removed Chromium change: https://source.chromium.org/chromium/chromium/src/+/8d32c9a197581cadc78fa93c806e04053861b182 commit 8d32c9a197581cadc78fa93c806e04053861b182 (tag: 119.0.6045.16) Author: Lily Chen Date: Tue Oct 10 00:05:56 2023 +0000 [M119][DownloadBubble] Fix icon bugs introduced in crrev.com/c/4904720 This fixes 2 user-visible bugs that regressed in crrev.com/c/4904720. 1. The animated scanning ring for deep scans disappeared. It is restored by always forcing a redraw of the progress ring if we need to show the scanning animation. 2. Any update to the progress requiring a redraw of the progress ring was not processed until the subsequent update call, resulting in an inconsistent icon state for the first 0.5 seconds. This is fixed by calling UpdateIcon only after redraw_progress_soon_ is set. (cherry picked from commit da92f2fa4190f6513b40c8d032b98d58fe0a8877) Bug: 1487569 --- .../bubble/download_display_controller_unittest.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/browser/download/bubble/download_display_controller_unittest.cc b/browser/download/bubble/download_display_controller_unittest.cc index 4fb8a5626fd..67e7bef7896 100644 --- a/browser/download/bubble/download_display_controller_unittest.cc +++ b/browser/download/bubble/download_display_controller_unittest.cc @@ -107,10 +107,9 @@ class FakeDownloadDisplay : public DownloadDisplay { if (updates.new_active) { active_ = *updates.new_active; } - } - - void UpdateIconProgress(const ProgressInfo& info) override { - progress_info_ = info; + if (updates.new_progress) { + progress_info_ = *updates.new_progress; + } } void ShowDetails() override { detail_shown_ = true; }