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

Unified Diff: chrome/browser/ui/views/tabs/touch_tab_strip_layout.cc

Issue 10291002: Fix crash in touch layout code. Without this can end up indexing into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | chrome/browser/ui/views/tabs/touch_tab_strip_layout_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/touch_tab_strip_layout.cc
diff --git a/chrome/browser/ui/views/tabs/touch_tab_strip_layout.cc b/chrome/browser/ui/views/tabs/touch_tab_strip_layout.cc
index c96c37faa0085c26d4e011230378bd7f84216590..1b5d7cd2d4e483937c25a54c0fc9d69f276054ea 100644
--- a/chrome/browser/ui/views/tabs/touch_tab_strip_layout.cc
+++ b/chrome/browser/ui/views/tabs/touch_tab_strip_layout.cc
@@ -312,7 +312,8 @@ void TouchTabStripLayout::AdjustTrailingStackedTabs() {
ideal_x(index - 1) >= max_stacked_x) {
index--;
}
- if (ideal_x(index) - ideal_x(index - 1) <= stacked_padding_ &&
+ if (index > active_index() &&
+ ideal_x(index) - ideal_x(index - 1) <= stacked_padding_ &&
ideal_x(index - 1) >= max_stacked_x) {
index--;
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/touch_tab_strip_layout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698