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

Side by Side Diff: ui/views/controls/label.cc

Issue 1543173002: Switch to standard integer types in ui/views/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/label.h" 5 #include "ui/views/controls/label.h"
6 6
7 #include <stddef.h>
8
7 #include <algorithm> 9 #include <algorithm>
8 #include <cmath> 10 #include <cmath>
9 #include <limits> 11 #include <limits>
10 #include <utility> 12 #include <utility>
11 #include <vector> 13 #include <vector>
12 14
13 #include "base/i18n/rtl.h" 15 #include "base/i18n/rtl.h"
14 #include "base/logging.h" 16 #include "base/logging.h"
15 #include "base/profiler/scoped_tracker.h" 17 #include "base/profiler/scoped_tracker.h"
16 #include "base/strings/string_split.h" 18 #include "base/strings/string_split.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 } 577 }
576 578
577 bool Label::ShouldShowDefaultTooltip() const { 579 bool Label::ShouldShowDefaultTooltip() const {
578 const gfx::Size text_size = GetTextSize(); 580 const gfx::Size text_size = GetTextSize();
579 const gfx::Size size = GetContentsBounds().size(); 581 const gfx::Size size = GetContentsBounds().size();
580 return !obscured() && (text_size.width() > size.width() || 582 return !obscured() && (text_size.width() > size.width() ||
581 (multi_line() && text_size.height() > size.height())); 583 (multi_line() && text_size.height() > size.height()));
582 } 584 }
583 585
584 } // namespace views 586 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698