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

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

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « ui/views/controls/menu/menu_runner.cc ('k') | ui/views/controls/table/table_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/styled_label.h" 5 #include "ui/views/controls/styled_label.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 result->SetEnabledColor(style_info.color); 50 result->SetEnabledColor(style_info.color);
51 result->SetFontList(font_list); 51 result->SetFontList(font_list);
52 52
53 if (!style_info.tooltip.empty()) 53 if (!style_info.tooltip.empty())
54 result->SetTooltipText(style_info.tooltip); 54 result->SetTooltipText(style_info.tooltip);
55 if (style_info.font_style != gfx::Font::NORMAL) { 55 if (style_info.font_style != gfx::Font::NORMAL) {
56 result->SetFontList( 56 result->SetFontList(
57 result->font_list().DeriveWithStyle(style_info.font_style)); 57 result->font_list().DeriveWithStyle(style_info.font_style));
58 } 58 }
59 59
60 return result.Pass(); 60 return result;
61 } 61 }
62 62
63 } // namespace 63 } // namespace
64 64
65 65
66 // StyledLabel::RangeStyleInfo ------------------------------------------------ 66 // StyledLabel::RangeStyleInfo ------------------------------------------------
67 67
68 StyledLabel::RangeStyleInfo::RangeStyleInfo() 68 StyledLabel::RangeStyleInfo::RangeStyleInfo()
69 : font_style(gfx::Font::NORMAL), 69 : font_style(gfx::Font::NORMAL),
70 color(SK_ColorTRANSPARENT), 70 color(SK_ColorTRANSPARENT),
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 DCHECK_LE(used_width, width); 370 DCHECK_LE(used_width, width);
371 // The user-specified line height only applies to interline spacing, so the 371 // The user-specified line height only applies to interline spacing, so the
372 // final line's height is unaffected. 372 // final line's height is unaffected.
373 int total_height = line * line_height + 373 int total_height = line * line_height +
374 CalculateLineHeight(font_list_) + GetInsets().height(); 374 CalculateLineHeight(font_list_) + GetInsets().height();
375 calculated_size_ = gfx::Size(used_width + GetInsets().width(), total_height); 375 calculated_size_ = gfx::Size(used_width + GetInsets().width(), total_height);
376 return calculated_size_; 376 return calculated_size_;
377 } 377 }
378 378
379 } // namespace views 379 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_runner.cc ('k') | ui/views/controls/table/table_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698