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

Side by Side Diff: ui/gfx/render_text.h

Issue 1031533002: Supports the invisible underline for native input fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revised per comments. Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/gfx/render_text.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 (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 #ifndef UI_GFX_RENDER_TEXT_H_ 5 #ifndef UI_GFX_RENDER_TEXT_H_
6 #define UI_GFX_RENDER_TEXT_H_ 6 #define UI_GFX_RENDER_TEXT_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <cstring> 9 #include <cstring>
10 #include <string> 10 #include <string>
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // Select the entire text range. If |reversed| is true, the range will end at 328 // Select the entire text range. If |reversed| is true, the range will end at
329 // the logical beginning of the text; this generally shows the leading portion 329 // the logical beginning of the text; this generally shows the leading portion
330 // of text that overflows its display area. 330 // of text that overflows its display area.
331 void SelectAll(bool reversed); 331 void SelectAll(bool reversed);
332 332
333 // Selects the word at the current cursor position. If there is a non-empty 333 // Selects the word at the current cursor position. If there is a non-empty
334 // selection, the selection bounds are extended to their nearest word 334 // selection, the selection bounds are extended to their nearest word
335 // boundaries. 335 // boundaries.
336 void SelectWord(); 336 void SelectWord();
337 337
338 const Range& GetCompositionRange() const;
339 void SetCompositionRange(const Range& composition_range); 338 void SetCompositionRange(const Range& composition_range);
340 339
341 // Set the text color over the entire text or a logical character range. 340 // Set the text color over the entire text or a logical character range.
342 // The |range| should be valid, non-reversed, and within [0, text().length()]. 341 // The |range| should be valid, non-reversed, and within [0, text().length()].
343 void SetColor(SkColor value); 342 void SetColor(SkColor value);
344 void ApplyColor(SkColor value, const Range& range); 343 void ApplyColor(SkColor value, const Range& range);
345 344
346 // Set the baseline style over the entire text or a logical character range. 345 // Set the baseline style over the entire text or a logical character range.
347 // The |range| should be valid, non-reversed, and within [0, text().length()]. 346 // The |range| should be valid, non-reversed, and within [0, text().length()].
348 void SetBaselineStyle(BaselineStyle value); 347 void SetBaselineStyle(BaselineStyle value);
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 // Lines computed by EnsureLayout. These should be invalidated upon 799 // Lines computed by EnsureLayout. These should be invalidated upon
801 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. 800 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls.
802 std::vector<internal::Line> lines_; 801 std::vector<internal::Line> lines_;
803 802
804 DISALLOW_COPY_AND_ASSIGN(RenderText); 803 DISALLOW_COPY_AND_ASSIGN(RenderText);
805 }; 804 };
806 805
807 } // namespace gfx 806 } // namespace gfx
808 807
809 #endif // UI_GFX_RENDER_TEXT_H_ 808 #endif // UI_GFX_RENDER_TEXT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698