Chromium Code Reviews| Index: ui/gfx/render_text.cc |
| diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc |
| index d5d4011d8c08bd7dc86eb9d1f943cba32d79df52..4a0167e9e5a8969324a14b4f19ce38efa499ea30 100644 |
| --- a/ui/gfx/render_text.cc |
| +++ b/ui/gfx/render_text.cc |
| @@ -393,16 +393,22 @@ RenderText::~RenderText() { |
| } |
| RenderText* RenderText::CreateInstance() { |
| -#if defined(OS_MACOSX) && defined(TOOLKIT_VIEWS) |
| - // Use the more complete HarfBuzz implementation for Views controls on Mac. |
| - return new RenderTextHarfBuzz; |
| +// Disable on Chrome OS. Blocked on http://crbug.com/423791 |
| +#if defined(OS_CHROMEOS) |
| + const bool default_is_harfbuzz = false; |
|
msw
2014/10/15 20:09:57
nit: these could just be return statements below t
ckocagil
2014/10/15 20:17:30
Done.
|
| #else |
| + const bool default_is_harfbuzz = true; |
| +#endif |
| + |
| if (CommandLine::ForCurrentProcess()->HasSwitch( |
| switches::kEnableHarfBuzzRenderText)) { |
| return new RenderTextHarfBuzz; |
| } |
| - return CreateNativeInstance(); |
| -#endif |
| + if (CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kDisableHarfBuzzRenderText)) { |
| + return CreateNativeInstance(); |
| + } |
| + return default_is_harfbuzz ? new RenderTextHarfBuzz : CreateNativeInstance(); |
| } |
| void RenderText::SetText(const base::string16& text) { |