From e458b1081aaa5e60d5e32ed93d882ed9b65126d2 Mon Sep 17 00:00:00 2001 From: "rdevlin.cronin" Date: Fri, 26 Sep 2014 16:30:49 -0700 Subject: [PATCH] Fix regression where extension action icons may not be displayed properly A BrowserActionView can set its image view for the first time in UpdateState(), but UpdateState() only called SchedulePaint(), and not Layout() (which is necessary for the image). Coincidentally, with all the Layout()s called on BrowserActionsContainer, this only manifested itself in Windows 8 Metro Mode (likely because race conditions caused the image to be updated after all calls to Layout()). BUG=409782 Review URL: https://codereview.chromium.org/608013002 Cr-Commit-Position: refs/heads/master@{#297069} --- chrome/browser/ui/views/toolbar/browser_action_view.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/browser/ui/views/toolbar/browser_action_view.cc b/chrome/browser/ui/views/toolbar/browser_action_view.cc index 2ae971d8dcba2..7e9d5d1f2b9da 100644 --- a/chrome/browser/ui/views/toolbar/browser_action_view.cc +++ b/chrome/browser/ui/views/toolbar/browser_action_view.cc @@ -154,6 +154,7 @@ void BrowserActionView::UpdateState() { SetTooltipText(name); SetAccessibleName(name); + Layout(); // We need to layout since we may have added an icon as a result. SchedulePaint(); }