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

Unified Diff: ash/shelf/shelf_view.cc

Issue 2843623002: ash: Return empty shelf icon bounds before initialization. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view.cc
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 9be5a0857adf070f366d7f998055bac8d43d747c..e8a3d28f0d0b72c68996b357c2792bd4b2e3696c 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -317,7 +317,7 @@ void ShelfView::OnShelfAlignmentChanged() {
gfx::Rect ShelfView::GetIdealBoundsOfItemIcon(ShelfID id) {
int index = model_->ItemIndexByID(id);
- if (index == -1)
+ if (index < 0 || last_visible_index_ < 0)
return gfx::Rect();
// Map all items from overflow area to the overflow button. Note that the
// section between last_index_hidden_ and model_->FirstPanelIndex() is the
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698