summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text.h
diff options
context:
space:
mode:
authorandresantoso <andresantoso@chromium.org>2014-12-08 17:33:57 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-09 01:34:22 +0000
commit62fd79bb7907a559887866bbdba869d25f72b011 (patch)
treed1c93b22b1c31cd3cb1e3c390ac78fa5c80d4576 /ui/gfx/render_text.h
parent027c289f089d558cd8b45078538bfe044fc70978 (diff)
downloadchromium_src-62fd79bb7907a559887866bbdba869d25f72b011.zip
chromium_src-62fd79bb7907a559887866bbdba869d25f72b011.tar.gz
chromium_src-62fd79bb7907a559887866bbdba869d25f72b011.tar.bz2
MacViews: Use RenderTextHarfBuzz only for Textfields
Using RenderTextHarfBuzz for string sizing and eliding on Mac is problematic because it may not match when drawn by Cocoa, so we use RenderTextMac. But RenderTextMac does not have support for editing that is needed by views::Textfield, so use RenderTextHarfBuzz for MacViews textfields. Review URL: https://codereview.chromium.org/779793006 Cr-Commit-Position: refs/heads/master@{#307396}
Diffstat (limited to 'ui/gfx/render_text.h')
-rw-r--r--ui/gfx/render_text.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 8fea48c..7b03df0 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -191,6 +191,10 @@ class GFX_EXPORT RenderText {
// Creates a platform-specific or cross-platform RenderText instance.
static RenderText* CreateInstance();
+ static RenderText* CreateInstanceForEditing();
+
+ // Creates another instance of the same concrete class.
+ virtual scoped_ptr<RenderText> CreateInstanceOfSameType() const = 0;
const base::string16& text() const { return text_; }
void SetText(const base::string16& text);