Commit 747ce67e authored by David Black's avatar David Black Committed by Commit Bot

Fixed issue which caused AssistantOptInView to be painted wrong.

I was unable to repro the bug consistently with an unaltered build.
I was able to repro the bug, however, with some local changes in which
I posted the UpdateLabel calls to simulate a timing issue. With this
change, I was able to reproduce the bug consistently.

Bug: b:130758812
Change-Id: I063527e9c52f5584104ce556d3558fc4ed62e228
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1577494Reviewed-by: default avatarTao Wu <wutao@chromium.org>
Commit-Queue: David Black <dmblack@google.com>
Cr-Commit-Position: refs/heads/master@{#652883}
parent 5dc4e140
......@@ -181,6 +181,12 @@ void AssistantOptInView::UpdateLabel(mojom::ConsentStatus consent_status) {
CreateStyleInfo(gfx::Font::Weight::BOLD));
container_->SetAccessibleName(label_text);
// After updating the |label_| we need to ensure that it is remeasured and
// repainted to address a timing bug in which the AssistantOptInView was
// sometimes drawn in an invalid state (b/130758812).
container_->Layout();
container_->SchedulePaint();
}
} // namespace ash
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