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

Unified Diff: ui/views/layout/grid_layout.cc

Issue 185653012: rAc - fix off-by-small-number error in grid layout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | ui/views/layout/grid_layout_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/layout/grid_layout.cc
diff --git a/ui/views/layout/grid_layout.cc b/ui/views/layout/grid_layout.cc
index a378169aed93d90a605715e40d18f5929358c707..9466c5160d1558873e8df8336a01493e659ac3ca 100644
--- a/ui/views/layout/grid_layout.cc
+++ b/ui/views/layout/grid_layout.cc
@@ -57,7 +57,8 @@ class LayoutElement {
for (typename std::vector<T*>::iterator i = elements->begin();
i != elements->end(); ++i) {
total_percent += (*i)->ResizePercent();
- resize_count++;
+ if ((*i)->ResizePercent() > 0)
+ resize_count++;
}
if (total_percent == 0) {
// None of the elements are resizable, return.
« no previous file with comments | « no previous file | ui/views/layout/grid_layout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698