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

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

Issue 808853006: Revert "Fixed StyledLabel size caching" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | ui/views/controls/styled_label.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 #ifndef UI_VIEWS_CONTROLS_STYLED_LABEL_H_ 5 #ifndef UI_VIEWS_CONTROLS_STYLED_LABEL_H_
6 #define UI_VIEWS_CONTROLS_STYLED_LABEL_H_ 6 #define UI_VIEWS_CONTROLS_STYLED_LABEL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // The ranges that should be linkified, sorted by start position. 140 // The ranges that should be linkified, sorted by start position.
141 StyleRanges style_ranges_; 141 StyleRanges style_ranges_;
142 142
143 // A mapping from a view to the range it corresponds to in |text_|. Only views 143 // A mapping from a view to the range it corresponds to in |text_|. Only views
144 // that correspond to ranges with is_link style set will be added to the map. 144 // that correspond to ranges with is_link style set will be added to the map.
145 std::map<View*, gfx::Range> link_targets_; 145 std::map<View*, gfx::Range> link_targets_;
146 146
147 // This variable saves the result of the last GetHeightForWidth call in order 147 // This variable saves the result of the last GetHeightForWidth call in order
148 // to avoid repeated calculation. 148 // to avoid repeated calculation.
149 mutable gfx::Size calculated_size_; 149 mutable gfx::Size calculated_size_;
150 int width_at_last_layout_;
151 150
152 // Background color on which the label is drawn, for auto color readability. 151 // Background color on which the label is drawn, for auto color readability.
153 SkColor displayed_on_background_color_; 152 SkColor displayed_on_background_color_;
154 bool displayed_on_background_color_set_; 153 bool displayed_on_background_color_set_;
155 154
156 // Controls whether the text is automatically re-colored to be readable on the 155 // Controls whether the text is automatically re-colored to be readable on the
157 // background. 156 // background.
158 bool auto_color_readability_enabled_; 157 bool auto_color_readability_enabled_;
159 158
160 DISALLOW_COPY_AND_ASSIGN(StyledLabel); 159 DISALLOW_COPY_AND_ASSIGN(StyledLabel);
161 }; 160 };
162 161
163 } // namespace views 162 } // namespace views
164 163
165 #endif // UI_VIEWS_CONTROLS_STYLED_LABEL_H_ 164 #endif // UI_VIEWS_CONTROLS_STYLED_LABEL_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/styled_label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698