Index: ui/gfx/render_text.cc |
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc |
index bf98bc0cde55524f3fba35a8657a9f3bf99e8600..3101c0455ca6c10b22d36698d5b95c8f24cc01a2 100644 |
--- a/ui/gfx/render_text.cc |
+++ b/ui/gfx/render_text.cc |
@@ -27,6 +27,10 @@ |
#include "ui/gfx/text_utils.h" |
#include "ui/gfx/utf16_indexing.h" |
+#if defined(OS_WIN) |
+#include "base/win/windows_version.h" |
+#endif |
+ |
namespace gfx { |
namespace { |
@@ -393,16 +397,20 @@ 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; |
+#if defined(OS_WIN) |
+ bool default_is_harfbuzz = base::win::OSInfo::GetInstance()->version() <= |
+ base::win::Version::VERSION_WIN8; |
msw
2014/10/05 17:58:21
Are you sure the sizing problem only affects windo
ckocagil
2014/10/15 19:50:44
This should be fixed on both as of https://crrev.c
|
+#elif defined(OS_CHROMEOS) |
+ bool default_is_harfbuzz = false; |
msw
2014/10/05 17:58:21
What is the chrome os blocker(s)? Add a comment re
ckocagil
2014/10/15 19:50:44
Done.
|
#else |
- if (CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kEnableHarfBuzzRenderText)) { |
- return new RenderTextHarfBuzz; |
- } |
- return CreateNativeInstance(); |
+ bool default_is_harfbuzz = true; |
#endif |
+ |
+ if (!default_is_harfbuzz || CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisableHarfBuzzRenderText)) { |
+ return CreateNativeInstance(); |
+ } |
+ return new RenderTextHarfBuzz; |
} |
void RenderText::SetText(const base::string16& text) { |