Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: chromeos/dbus/ibus/ibus_lookup_table.cc

Issue 12520020: Fix crash around candidate window layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/ibus/ibus_lookup_table.cc
diff --git a/chromeos/dbus/ibus/ibus_lookup_table.cc b/chromeos/dbus/ibus/ibus_lookup_table.cc
index 77aa07c8aea3ed8b6be48b5d62f6a9d3a5fea18b..38c565614a5a2c10ac42e0975f0ce42f468a7abc 100644
--- a/chromeos/dbus/ibus/ibus_lookup_table.cc
+++ b/chromeos/dbus/ibus/ibus_lookup_table.cc
@@ -118,8 +118,12 @@ bool PopIBusLookupTable(dbus::MessageReader* reader, IBusLookupTable* table) {
<< "5th argument should be int32.";
return false;
}
+
+ // Original IBus spec has third orientation IBUS_ORIENTATION_SYSTEM but it
+ // was not supported in Chrome OS. Thus do not cast from integer to enum.
table->set_orientation(
- static_cast<IBusLookupTable::Orientation>(orientation));
+ orientation == IBusLookupTable::HORIZONTAL ?
+ IBusLookupTable::HORIZONTAL : IBusLookupTable::VERTICAL);
dbus::MessageReader text_array_reader(NULL);
if (!ibus_object_reader.PopArray(&text_array_reader)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698