Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Issue 276033: [chromium-reviews] Fix bug: browser action button disappears when loading a new extension. This ... (Closed)

Created:
11 years, 2 months ago by sidchat (Google)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, ben+cc_chromium.org, Aaron Boodman
Visibility:
Public.

Description

Fix bug: browser action button disappears when loading a new extension. This was happenening because BrowserActionContainer, on receiving notification about an extension load/unload/change, deletes all BrowserAction views, re-adds all the views again, and asks the toolbar to SetBounds for the BrowserActionContainer. However, during deletion, it does not re-set the bounds. As a result, when SetBounds is called by the toolbar again, it does not see any changed in BrowserActionContainer, and does not layout again, causing all the browser actions to disappear. The solution lies in forcing Layout() after SetBounds() in ToolbarView. BUG=23593 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29143

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -0 lines) Patch
M chrome/browser/views/toolbar_view.cc View 2 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
sidchat (Google)
11 years, 2 months ago (2009-10-14 22:11:57 UTC) #1
Erik does not do reviews
http://codereview.chromium.org/276033/diff/1/2 File chrome/browser/views/browser_actions_container.cc (right): http://codereview.chromium.org/276033/diff/1/2#newcode435 Line 435: SetBounds(0, 0, 0, 0); rather than this, why ...
11 years, 2 months ago (2009-10-14 23:14:51 UTC) #2
sidchat (Google)
http://codereview.chromium.org/276033/diff/1/2 File chrome/browser/views/browser_actions_container.cc (right): http://codereview.chromium.org/276033/diff/1/2#newcode435 Line 435: SetBounds(0, 0, 0, 0); That is not working, ...
11 years, 2 months ago (2009-10-14 23:46:35 UTC) #3
sidchat (Google)
Moved the change - please have another look. -Sid On 2009/10/14 23:46:35, sidchat (Google) wrote: ...
11 years, 2 months ago (2009-10-14 23:47:02 UTC) #4
Erik does not do reviews
LGTM - sigh This all feels very fragile to me. I think this all stems ...
11 years, 2 months ago (2009-10-15 00:10:52 UTC) #5
sidchat (Google)
11 years, 2 months ago (2009-10-15 00:34:55 UTC) #6
Right - that seems to be the stem of this problem. I will add comments and a
TODO.

-Sid

On 2009/10/15 00:10:52, Erik Kay wrote:
> LGTM - sigh
> 
> This all feels very fragile to me.  I think this all stems from
> RefreshBrowserActionViews which removes and re-adds everything whenever any
> extension is loaded, regardless of whether it has a page action.  That's
> probably the real thing that should be fixed (handling load/unload/disable
> individually).  Maybe add a TODO there as well?
> 
> http://codereview.chromium.org/276033/diff/3001/5
> File chrome/browser/views/toolbar_view.cc (right):
> 
> http://codereview.chromium.org/276033/diff/3001/5#newcode555
> Line 555: browser_actions_->Layout();
> Add a short comment explaining why this is necessary.

Powered by Google App Engine
This is Rietveld 408576698