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

Issue 9877009: Two tweaks to avoid invoking ShelfLayoutManager::LayoutShelf unless we (Closed)

Created:
8 years, 9 months ago by sky
Modified:
8 years, 9 months ago
CC:
chromium-reviews, dhollowa+watch_chromium.org, sadrul, tfarina, ben+watch_chromium.org
Visibility:
Public.

Description

Two tweaks to avoid invoking ShelfLayoutManager::LayoutShelf unless we need to. The reason we should only invoke LayoutShelf is that it'll cancel any animations. Here's the two problematic scenarios I noticed: . ImageView::SetImage invoked PreferredSizeChanged even if it didn't. PreferredSizeChanged eventually makes it way to LayoutShelf, so we should only invoke this if the preferred size actually changed. . StatusAreaLayoutManager::SetChildBounds need not do anything if the size matches. BUG=120679 TEST=none R=ben@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=129480

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -4 lines) Patch
M ash/wm/status_area_layout_manager.cc View 2 chunks +17 lines, -3 lines 0 comments Download
M ui/views/controls/image_view.cc View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
sky
8 years, 9 months ago (2012-03-28 17:13:33 UTC) #1
Ben Goodger (Google)
8 years, 9 months ago (2012-03-28 17:15:51 UTC) #2
lgtm

Powered by Google App Engine
This is Rietveld 408576698