diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 11:08:31 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 11:08:31 +0000 |
commit | eae7497ed95dfc7267d83a210fff989d433c4d02 (patch) | |
tree | e58632ccd03bd9d46ff20b064e13914a8e1028de /content/renderer/renderer_main.cc | |
parent | 251a1b9c067be888e9d665e34e9e9aeb37b71cac (diff) | |
download | chromium_src-eae7497ed95dfc7267d83a210fff989d433c4d02.zip chromium_src-eae7497ed95dfc7267d83a210fff989d433c4d02.tar.gz chromium_src-eae7497ed95dfc7267d83a210fff989d433c4d02.tar.bz2 |
[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
Diffstat (limited to 'content/renderer/renderer_main.cc')
-rw-r--r-- | content/renderer/renderer_main.cc | 8 |
1 files changed, 6 insertions, 2 deletions
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<TISInputSourceRef> input_source( + TISCopyCurrentKeyboardInputSource()); + base::mac::ScopedCFTypeRef<TISInputSourceRef> 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: |