Bug 960877 - Part 1. Add helper method to nsIMEUpdatePreference. r=masayuki
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 29 Jan 2014 18:31:57 +0900
changeset 181754 68444ba6d0a0a1149f4903ba1510f1f80e6ba0a0
parent 181753 15d8e67e503508ca1033881ce2ddbdfc5a7f7297
child 181755 9f52cf83ac724e32691e34b34579d7c8bb2f83a7
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs960877
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 960877 - Part 1. Add helper method to nsIMEUpdatePreference. r=masayuki
widget/nsIWidget.h
--- a/widget/nsIWidget.h
+++ b/widget/nsIWidget.h
@@ -240,16 +240,31 @@ struct nsIMEUpdatePreference {
     : mWantUpdates(NOTIFY_NOTHING), mWantHints(false)
   {
   }
   nsIMEUpdatePreference(Notifications aWantUpdates, bool aWantHints)
     : mWantUpdates(aWantUpdates), mWantHints(aWantHints)
   {
   }
 
+  bool WantSelectionChange() const
+  {
+    return !!(mWantUpdates & NOTIFY_SELECTION_CHANGE);
+  }
+
+  bool WantTextChange() const
+  {
+    return !!(mWantUpdates & NOTIFY_TEXT_CHANGE);
+  }
+
+  bool WantDuringDeactive() const
+  {
+    return !!(mWantUpdates & NOTIFY_DURING_DEACTIVE);
+  }
+
   Notifications mWantUpdates;
   bool mWantHints;
 };
 
 
 /* 
  * Contains IMEStatus plus information about the current 
  * input context that the IME can use as hints if desired.