From eae7497ed95dfc7267d83a210fff989d433c4d02 Mon Sep 17 00:00:00 2001 From: "rsesek@chromium.org" Date: Tue, 13 Nov 2012 11:08:31 +0000 Subject: [Mac] In the renderer's patched TISCreateInputSourceList(), return real objects. To get around an Apple bug, TISCreateInputSourceList() has been mach_override'd to return a fake data array. This array should contain TSMInputSource but instead contains strings. This causes the renderer to crash for certain IMEs. This uses the KeyboardInputSource and KeyboardLayoutInputSource in the array instead. BUG=152566 TEST=Verified that trackpad handwriting still works and that the sandbox tests pass. Review URL: https://chromiumcodereview.appspot.com/11364207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167371 0039d316-1c4b-4281-b951-d872f2087c98 --- content/renderer/renderer_main.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'content/renderer/renderer_main.cc') diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc index 2450648..57dc634 100644 --- a/content/renderer/renderer_main.cc +++ b/content/renderer/renderer_main.cc @@ -52,13 +52,17 @@ namespace { CFArrayRef ChromeTISCreateInputSourceList( CFDictionaryRef properties, Boolean includeAllInstalled) { - CFTypeRef values[] = { CFSTR("") }; + base::mac::ScopedCFTypeRef input_source( + TISCopyCurrentKeyboardInputSource()); + base::mac::ScopedCFTypeRef layout_source( + TISCopyCurrentKeyboardLayoutInputSource()); + CFTypeRef values[] = { input_source.get(), layout_source.get() }; return CFArrayCreate( kCFAllocatorDefault, values, arraysize(values), &kCFTypeArrayCallBacks); } void InstallFrameworkHacks() { - // See http://crbug.com/31225 + // See http://crbug.com/31225 and http://crbug.com/152566 // TODO: Don't do this on newer OS X revisions that have a fix for // http://openradar.appspot.com/radar?id=1156410 // To check if this is broken: -- cgit v1.1