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

Unified Diff: ui/gfx/render_text.h

Issue 1014163002: [RenderText] Added append text (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed UpdateStyleLengths comment Created 5 years, 9 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/gfx/render_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.h
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 6170c57c28a88251cfa2c7214fe709995789ffb8..fe70f4761beed7b7117b96605d9803a41d8906e3 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -207,6 +207,7 @@ class GFX_EXPORT RenderText {
const base::string16& text() const { return text_; }
void SetText(const base::string16& text);
+ void AppendText(const base::string16& text);
HorizontalAlignment horizontal_alignment() const {
return horizontal_alignment_;
@@ -603,6 +604,9 @@ class GFX_EXPORT RenderText {
size_t TextIndexToGivenTextIndex(const base::string16& given_text,
size_t index);
+ // Adjust ranged styles to accommodate a new text length.
+ void UpdateStyleLengths();
+
// A convenience function to check whether the glyph attached to the caret
// is within the given range.
static bool RangeContainsCaret(const Range& range,
« 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