Bug 900392 Support "SingleCandidate" key value on GTK and Qt r=romaxa+karlt+smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 30 Dec 2014 10:47:55 +0900
changeset 221627 a4299c28c5cb0b8ddfb1ceb6f897dcd1a42b8ba7
parent 221626 7c0ab70d2e40502c35e7c2fd8ffafc24e1a7e901
child 221628 82b3c66246637d22ef4473156435b6b49a62d02b
push id10617
push userkwierso@gmail.com
push dateWed, 31 Dec 2014 00:06:35 +0000
treeherderfx-team@edccc126caae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersromaxa
bugs900392
milestone37.0a1
Bug 900392 Support "SingleCandidate" key value on GTK and Qt r=romaxa+karlt+smaug
dom/events/KeyNameList.h
widget/NativeKeyToDOMKeyName.h
widget/qt/nsQtKeyUtils.cpp
--- a/dom/events/KeyNameList.h
+++ b/dom/events/KeyNameList.h
@@ -132,17 +132,17 @@ DEFINE_KEYNAME_WITH_SAME_NAME(FinalMode)
 // DEFINE_KEYNAME_WITH_SAME_NAME(GroupLast)
 // DEFINE_KEYNAME_WITH_SAME_NAME(GroupNext)
 // DEFINE_KEYNAME_WITH_SAME_NAME(GroupPrevious)
 DEFINE_KEYNAME_WITH_SAME_NAME(ModeChange)
 // DEFINE_KEYNAME_WITH_SAME_NAME(NextCandidate)
 DEFINE_KEYNAME_WITH_SAME_NAME(NonConvert)
 DEFINE_KEYNAME_WITH_SAME_NAME(PreviousCandidate)
 // DEFINE_KEYNAME_WITH_SAME_NAME(Process)
-// DEFINE_KEYNAME_WITH_SAME_NAME(SingleCandidate)
+DEFINE_KEYNAME_WITH_SAME_NAME(SingleCandidate)
 
 /******************************************************************************
  * Keys specific to Korean keyboards
  *****************************************************************************/
 DEFINE_KEYNAME_WITH_SAME_NAME(HangulMode)
 DEFINE_KEYNAME_WITH_SAME_NAME(HanjaMode)
 DEFINE_KEYNAME_WITH_SAME_NAME(JunjaMode)
 
--- a/widget/NativeKeyToDOMKeyName.h
+++ b/widget/NativeKeyToDOMKeyName.h
@@ -562,16 +562,20 @@ KEY_MAP_WIN     (NonConvert, VK_NONCONVE
 KEY_MAP_GTK     (NonConvert, GDK_Muhenkan)
 KEY_MAP_QT      (NonConvert, Qt::Key_Muhenkan)
 KEY_MAP_ANDROID (NonConvert, AKEYCODE_MUHENKAN)
 
 // PreviousCandidate
 KEY_MAP_GTK     (PreviousCandidate, GDK_PreviousCandidate) // OADG 109, Mae Koho
 KEY_MAP_QT      (PreviousCandidate, Qt::Key_PreviousCandidate)
 
+// SingleCandidate
+KEY_MAP_GTK     (SingleCandidate, GDK_SingleCandidate)
+KEY_MAP_QT      (SingleCandidate, Qt::Key_SingleCandidate)
+
 /******************************************************************************
  * Keys specific to Korean keyboards
  ******************************************************************************/
 // HangulMode
 KEY_MAP_WIN_KOR (HangulMode, VK_HANGUL /* same as VK_KANA */)
 
 // HanjaMode
 KEY_MAP_WIN_KOR (HanjaMode, VK_HANJA /* same as VK_KANJI */)
--- a/widget/qt/nsQtKeyUtils.cpp
+++ b/widget/qt/nsQtKeyUtils.cpp
@@ -364,17 +364,16 @@ QtKeyCodeToDOMKeyNameIndex(int aKeysym)
         case Qt::Key_ssharp:
         case Qt::Key_division:
         case Qt::Key_ydiaeresis:
             return KEY_NAME_INDEX_PrintableKey;
 
         case Qt::Key_Backtab:
         case Qt::Key_Direction_L:
         case Qt::Key_Direction_R:
-        case Qt::Key_SingleCandidate:
         case Qt::Key_Hiragana_Katakana:
         case Qt::Key_Zenkaku_Hankaku:
         case Qt::Key_Touroku:
         case Qt::Key_Massyo:
         case Qt::Key_Hangul:
         case Qt::Key_Hangul_Start:
         case Qt::Key_Hangul_End:
         case Qt::Key_Hangul_Hanja: