Bug 1296220 Rename nsIMEUpdatePreference to mozilla::widget::IMEUpdatePreference r?m_kato draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 11 Apr 2017 21:24:55 +0900
changeset 560475 a65635897035b2646c56ec950160d7ea1bc1ae2c
parent 560035 b5b5dbed1c409d96aa6b97f2036cd66312fc45ad
child 623708 1fc8e1644bc480bcba593314a6c53c6a70deda63
push id53427
push usermasayuki@d-toybox.com
push dateTue, 11 Apr 2017 13:35:58 +0000
reviewersm_kato
bugs1296220
milestone55.0a1
Bug 1296220 Rename nsIMEUpdatePreference to mozilla::widget::IMEUpdatePreference r?m_kato MozReview-Commit-ID: 2rIXTlwA6my
dom/base/TextInputProcessor.cpp
dom/base/TextInputProcessor.h
dom/events/IMEContentObserver.cpp
dom/events/IMEContentObserver.h
dom/ipc/PBrowser.ipdl
dom/ipc/TabParent.cpp
dom/ipc/TabParent.h
widget/IMEData.h
widget/PuppetWidget.cpp
widget/PuppetWidget.h
widget/TextEventDispatcherListener.h
widget/android/GeckoEditableSupport.cpp
widget/android/GeckoEditableSupport.h
widget/cocoa/TextInputHandler.h
widget/cocoa/TextInputHandler.mm
widget/gtk/IMContextWrapper.cpp
widget/gtk/IMContextWrapper.h
widget/nsBaseWidget.cpp
widget/nsBaseWidget.h
widget/nsGUIEventIPC.h
widget/nsIWidget.h
widget/windows/IMMHandler.cpp
widget/windows/IMMHandler.h
widget/windows/TSFTextStore.cpp
widget/windows/TSFTextStore.h
widget/windows/WinIMEHandler.cpp
widget/windows/WinIMEHandler.h
widget/windows/WinTextEventDispatcherListener.cpp
widget/windows/WinTextEventDispatcherListener.h
--- a/dom/base/TextInputProcessor.cpp
+++ b/dom/base/TextInputProcessor.cpp
@@ -693,21 +693,21 @@ TextInputProcessor::NotifyIME(TextEventD
       CancelCompositionInternal();
       return NS_OK;
     }
     default:
       return NS_ERROR_NOT_IMPLEMENTED;
   }
 }
 
-NS_IMETHODIMP_(nsIMEUpdatePreference)
-TextInputProcessor::GetIMEUpdatePreference()
+NS_IMETHODIMP_(IMENotificationRequests)
+TextInputProcessor::GetIMENotificationRequests()
 {
   // TextInputProcessor::NotifyIME does not require extra change notifications.
-  return nsIMEUpdatePreference();
+  return IMENotificationRequests();
 }
 
 NS_IMETHODIMP_(void)
 TextInputProcessor::OnRemovedFrom(TextEventDispatcher* aTextEventDispatcher)
 {
   // If This is called while this is being initialized, ignore the call.
   if (!mDispatcher) {
     return;
--- a/dom/base/TextInputProcessor.h
+++ b/dom/base/TextInputProcessor.h
@@ -16,29 +16,30 @@
 #include "nsTArray.h"
 
 namespace mozilla {
 
 class TextInputProcessor final : public nsITextInputProcessor
                                , public widget::TextEventDispatcherListener
 {
   typedef mozilla::widget::IMENotification IMENotification;
+  typedef mozilla::widget::IMENotificationRequests IMENotificationRequests;
   typedef mozilla::widget::TextEventDispatcher TextEventDispatcher;
 
 public:
   TextInputProcessor();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSITEXTINPUTPROCESSOR
 
   // TextEventDispatcherListener
   NS_IMETHOD NotifyIME(TextEventDispatcher* aTextEventDispatcher,
                        const IMENotification& aNotification) override;
 
-  NS_IMETHOD_(nsIMEUpdatePreference) GetIMEUpdatePreference() override;
+  NS_IMETHOD_(IMENotificationRequests) GetIMENotificationRequests() override;
 
   NS_IMETHOD_(void)
     OnRemovedFrom(TextEventDispatcher* aTextEventDispatcher) override;
 
   NS_IMETHOD_(void) WillDispatchKeyboardEvent(
                       TextEventDispatcher* aTextEventDispatcher,
                       WidgetKeyboardEvent& aKeyboardEvent,
                       uint32_t aIndexOfKeypress,
--- a/dom/events/IMEContentObserver.cpp
+++ b/dom/events/IMEContentObserver.cpp
@@ -130,17 +130,18 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(IM
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mSelection)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mRootContent)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mEditableNode)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mDocShell)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mEditor)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mEndOfAddedTextCache.mContainerNode)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mStartOfRemovingTextRangeCache.mContainerNode)
 
-  tmp->mUpdatePreference.mWantUpdates = nsIMEUpdatePreference::NOTIFY_NOTHING;
+  tmp->mIMENotificationRequests.mWantUpdates =
+    IMENotificationRequests::NOTIFY_NOTHING;
   tmp->mESM = nullptr;
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(IMEContentObserver)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWidget)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mFocusedWidget)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSelection)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRootContent)
@@ -427,33 +428,33 @@ IMEContentObserver::ObserveEditableNode(
     return;
   }
 
   mIsObserving = true;
   if (mEditor) {
     mEditor->AddEditorObserver(this);
   }
 
-  mUpdatePreference = mWidget->GetIMEUpdatePreference();
+  mIMENotificationRequests = mWidget->GetIMENotificationRequests();
   if (!WasInitializedWithPlugin()) {
     // Add selection change listener only when this starts to observe
     // non-plugin content since we cannot detect selection changes in
     // plugins.
     nsCOMPtr<nsISelectionPrivate> selPrivate(do_QueryInterface(mSelection));
     NS_ENSURE_TRUE_VOID(selPrivate);
     nsresult rv = selPrivate->AddSelectionListener(this);
     NS_ENSURE_SUCCESS_VOID(rv);
   }
 
-  if (mUpdatePreference.WantTextChange()) {
+  if (mIMENotificationRequests.WantTextChange()) {
     // add text change observer
     mRootContent->AddMutationObserver(this);
   }
 
-  if (mUpdatePreference.WantPositionChanged() && mDocShell) {
+  if (mIMENotificationRequests.WantPositionChanged() && mDocShell) {
     // Add scroll position listener and reflow observer to detect position and
     // size changes
     mDocShell->AddWeakScrollObserver(this);
     mDocShell->AddWeakReflowObserver(this);
   }
 }
 
 void
@@ -509,21 +510,21 @@ IMEContentObserver::UnregisterObservers(
     nsCOMPtr<nsISelectionPrivate> selPrivate(do_QueryInterface(mSelection));
     if (selPrivate) {
       selPrivate->RemoveSelectionListener(this);
     }
     mSelectionData.Clear();
     mFocusedWidget = nullptr;
   }
 
-  if (mUpdatePreference.WantTextChange() && mRootContent) {
+  if (mIMENotificationRequests.WantTextChange() && mRootContent) {
     mRootContent->RemoveMutationObserver(this);
   }
 
-  if (mUpdatePreference.WantPositionChanged() && mDocShell) {
+  if (mIMENotificationRequests.WantPositionChanged() && mDocShell) {
     mDocShell->RemoveWeakScrollObserver(this);
     mDocShell->RemoveWeakReflowObserver(this);
   }
 }
 
 nsPresContext*
 IMEContentObserver::GetPresContext() const
 {
@@ -535,17 +536,18 @@ IMEContentObserver::Destroy()
 {
   // WARNING: When you change this method, you have to check Unlink() too.
 
   NotifyIMEOfBlur();
   UnregisterObservers();
   Clear();
 
   mWidget = nullptr;
-  mUpdatePreference.mWantUpdates = nsIMEUpdatePreference::NOTIFY_NOTHING;
+  mIMENotificationRequests.mWantUpdates =
+    IMENotificationRequests::NOTIFY_NOTHING;
 
   if (mESM) {
     mESM->OnStopObservingContent(this);
     mESM = nullptr;
   }
 }
 
 void
@@ -779,17 +781,17 @@ IMEContentObserver::HandleQueryContentEv
   }
   return rv;
 }
 
 bool
 IMEContentObserver::OnMouseButtonEvent(nsPresContext* aPresContext,
                                        WidgetMouseEvent* aMouseEvent)
 {
-  if (!mUpdatePreference.WantMouseButtonEventOnChar()) {
+  if (!mIMENotificationRequests.WantMouseButtonEventOnChar()) {
     return false;
   }
   if (!aMouseEvent->IsTrusted() ||
       aMouseEvent->DefaultPrevented() ||
       !aMouseEvent->mWidget) {
     return false;
   }
   // Now, we need to notify only mouse down and mouse up event.
@@ -1642,17 +1644,17 @@ IMEContentObserver::IMENotificationSende
 
   MOZ_RELEASE_ASSERT(mIMEContentObserver->mSendingNotification ==
                        NOTIFY_IME_OF_NOTHING);
   mIMEContentObserver->mSendingNotification = NOTIFY_IME_OF_FOCUS;
   IMEStateManager::NotifyIME(IMENotification(NOTIFY_IME_OF_FOCUS),
                              mIMEContentObserver->mWidget);
   mIMEContentObserver->mSendingNotification = NOTIFY_IME_OF_NOTHING;
 
-  // nsIMEUpdatePreference referred by ObserveEditableNode() may be different
+  // IMENotificationRequests referred by ObserveEditableNode() may be different
   // before or after widget receives NOTIFY_IME_OF_FOCUS.  Therefore, we need
   // to guarantee to call ObserveEditableNode() after sending
   // NOTIFY_IME_OF_FOCUS.
   mIMEContentObserver->OnIMEReceivedFocus();
 
   MOZ_LOG(sIMECOLog, LogLevel::Debug,
     ("0x%p IMEContentObserver::IMENotificationSender::"
      "SendFocusSet(), sent NOTIFY_IME_OF_FOCUS", this));
--- a/dom/events/IMEContentObserver.h
+++ b/dom/events/IMEContentObserver.h
@@ -11,17 +11,17 @@
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsIDocShell.h" // XXX Why does only this need to be included here?
 #include "nsIEditor.h"
 #include "nsIEditorObserver.h"
 #include "nsIReflowObserver.h"
 #include "nsISelectionListener.h"
 #include "nsIScrollObserver.h"
-#include "nsIWidget.h" // for nsIMEUpdatePreference
+#include "nsIWidget.h"
 #include "nsStubMutationObserver.h"
 #include "nsThreadUtils.h"
 #include "nsWeakReference.h"
 
 class nsIContent;
 class nsINode;
 class nsISelection;
 class nsPresContext;
@@ -41,16 +41,17 @@ class IMEContentObserver final : public 
                                , public nsIEditorObserver
 {
 public:
   typedef ContentEventHandler::NodePosition NodePosition;
   typedef ContentEventHandler::NodePositionBefore NodePositionBefore;
   typedef widget::IMENotification::SelectionChangeData SelectionChangeData;
   typedef widget::IMENotification::TextChangeData TextChangeData;
   typedef widget::IMENotification::TextChangeDataBase TextChangeDataBase;
+  typedef widget::IMENotificationRequests IMENotificationRequests;
   typedef widget::IMEMessage IMEMessage;
 
   IMEContentObserver();
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(IMEContentObserver,
                                            nsISelectionListener)
   NS_DECL_NSIEDITOROBSERVER
@@ -93,17 +94,17 @@ public:
                          nsIContent* aContent,
                          nsIEditor* aEditor);
   bool IsManaging(nsPresContext* aPresContext, nsIContent* aContent) const;
   bool IsManaging(const TextComposition* aTextComposition) const;
   bool WasInitializedWithPlugin() const;
   bool IsEditorHandlingEventForComposition() const;
   bool KeepAliveDuringDeactive() const
   {
-    return mUpdatePreference.WantDuringDeactive();
+    return mIMENotificationRequests.WantDuringDeactive();
   }
   nsIWidget* GetWidget() const { return mWidget; }
   nsIEditor* GetEditor() const { return mEditor; }
   void SuppressNotifyingIME();
   void UnsuppressNotifyingIME();
   nsPresContext* GetPresContext() const;
   nsresult GetSelectionAndRoot(nsISelection** aSelection,
                                nsIContent** aRoot) const;
@@ -320,17 +321,17 @@ private:
 
   // mSelectionData is the last selection data which was notified.  The
   // selection information is modified by UpdateSelectionCache().  The reason
   // of the selection change is modified by MaybeNotifyIMEOfSelectionChange().
   SelectionChangeData mSelectionData;
 
   EventStateManager* mESM;
 
-  nsIMEUpdatePreference mUpdatePreference;
+  IMENotificationRequests mIMENotificationRequests;
   uint32_t mPreAttrChangeLength;
   uint32_t mSuppressNotifications;
   int64_t mPreCharacterDataChangeLength;
 
   // mSendingNotification is a notification which is now sending from
   // IMENotificationSender.  When the value is NOTIFY_IME_OF_NOTHING, it's
   // not sending any notification.
   IMEMessage mSendingNotification;
--- a/dom/ipc/PBrowser.ipdl
+++ b/dom/ipc/PBrowser.ipdl
@@ -40,18 +40,18 @@ using struct mozilla::layers::Scrollable
 using struct mozilla::layers::ZoomConstraints from "FrameMetrics.h";
 using mozilla::layers::MaybeZoomConstraints from "FrameMetrics.h";
 using mozilla::layers::GeckoContentController::TapType from "mozilla/layers/GeckoContentController.h";
 using FrameMetrics::ViewID from "FrameMetrics.h";
 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
 using mozilla::WindowsHandle from "ipc/IPCMessageUtils.h";
 using nscolor from "nsColor.h";
 using class mozilla::WidgetCompositionEvent from "ipc/nsGUIEventIPC.h";
-using struct mozilla::widget::IMENotification from "nsIWidget.h";
-using struct nsIMEUpdatePreference from "nsIWidget.h";
+using struct mozilla::widget::IMENotification from "mozilla/widget/IMEData.h";
+using struct mozilla::widget::IMENotificationRequests from "mozilla/widget/IMEData.h";
 using mozilla::gfx::IntSize from "mozilla/gfx/Point.h";
 using mozilla::gfx::IntPoint from "mozilla/gfx/Point.h";
 using mozilla::gfx::IntRect from "mozilla/gfx/Rect.h";
 using class mozilla::ContentCache from "ipc/nsGUIEventIPC.h";
 using class mozilla::WidgetKeyboardEvent from "ipc/nsGUIEventIPC.h";
 using class mozilla::WidgetMouseEvent from "ipc/nsGUIEventIPC.h";
 using class mozilla::WidgetWheelEvent from "ipc/nsGUIEventIPC.h";
 using class mozilla::WidgetDragEvent from "ipc/nsGUIEventIPC.h";
@@ -214,21 +214,21 @@ parent:
       returns (StructuredCloneData[] retval);
 
     /**
      * Notifies chrome that there is a focus change involving an editable
      * object (input, textarea, document, contentEditable. etc.)
      *
      *  contentCache Cache of content
      *  notification Whole data of the notification
-     *  preference   Native widget preference for IME updates
+     *  requests     Requests of notification for IME of the native widget
      */
     nested(inside_cpow) sync NotifyIMEFocus(ContentCache contentCache,
                                             IMENotification notification)
-      returns (nsIMEUpdatePreference preference);
+      returns (IMENotificationRequests requests);
 
     /**
      * Notifies chrome that there has been a change in text content
      * One call can encompass both a delete and an insert operation
      * Only called when NotifyIMEFocus returns PR_TRUE for mWantUpdates
      *
      *  contentCache Cache of content
      *  notification Whole data of the notification
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -1737,45 +1737,45 @@ TabParent::RecvHideTooltip()
 
   xulBrowserWindow->HideTooltip();
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 TabParent::RecvNotifyIMEFocus(const ContentCache& aContentCache,
                               const IMENotification& aIMENotification,
-                              nsIMEUpdatePreference* aPreference)
+                              IMENotificationRequests* aRequests)
 {
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (!widget) {
-    *aPreference = nsIMEUpdatePreference();
+    *aRequests = IMENotificationRequests();
     return IPC_OK();
   }
 
   mContentCache.AssignContent(aContentCache, widget, &aIMENotification);
   IMEStateManager::NotifyIME(aIMENotification, widget, true);
 
   if (aIMENotification.mMessage == NOTIFY_IME_OF_FOCUS) {
-    *aPreference = widget->GetIMEUpdatePreference();
+    *aRequests = widget->GetIMENotificationRequests();
   }
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 TabParent::RecvNotifyIMETextChange(const ContentCache& aContentCache,
                                    const IMENotification& aIMENotification)
 {
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (!widget) {
     return IPC_OK();
   }
 
 #ifdef DEBUG
-  nsIMEUpdatePreference updatePreference = widget->GetIMEUpdatePreference();
-  NS_ASSERTION(updatePreference.WantTextChange(),
+  IMENotificationRequests requests = widget->GetIMENotificationRequests();
+  NS_ASSERTION(requests.WantTextChange(),
     "Don't call Send/RecvNotifyIMETextChange without NOTIFY_TEXT_CHANGE");
 #endif
 
   mContentCache.AssignContent(aContentCache, widget, &aIMENotification);
   mContentCache.MaybeNotifyIME(widget, aIMENotification);
   return IPC_OK();
 }
 
--- a/dom/ipc/TabParent.h
+++ b/dom/ipc/TabParent.h
@@ -202,17 +202,17 @@ public:
   virtual mozilla::ipc::IPCResult RecvAsyncMessage(const nsString& aMessage,
                                                    InfallibleTArray<CpowEntry>&& aCpows,
                                                    const IPC::Principal& aPrincipal,
                                                    const ClonedMessageData& aData) override;
 
   virtual mozilla::ipc::IPCResult
   RecvNotifyIMEFocus(const ContentCache& aContentCache,
                      const widget::IMENotification& aEventMessage,
-                     nsIMEUpdatePreference* aPreference) override;
+                     widget::IMENotificationRequests* aRequests) override;
 
   virtual mozilla::ipc::IPCResult
   RecvNotifyIMETextChange(const ContentCache& aContentCache,
                           const widget::IMENotification& aEventMessage) override;
 
   virtual mozilla::ipc::IPCResult
   RecvNotifyIMECompositionUpdate(const ContentCache& aContentCache,
                                  const widget::IMENotification& aEventMessage) override;
--- a/widget/IMEData.h
+++ b/widget/IMEData.h
@@ -11,33 +11,33 @@
 #include "nsStringGlue.h"
 
 class nsIWidget;
 
 namespace mozilla {
 
 class WritingMode;
 
-} // namespace mozilla
+namespace widget {
 
 /**
  * Preference for receiving IME updates
  *
  * If mWantUpdates is not NOTIFY_NOTHING, nsTextStateManager will observe text
  * change and/or selection change and call nsIWidget::NotifyIME() with
  * NOTIFY_IME_OF_SELECTION_CHANGE and/or NOTIFY_IME_OF_TEXT_CHANGE.
  * Please note that the text change observing cost is very expensive especially
  * on an HTML editor has focus.
  * If the IME implementation on a particular platform doesn't care about
  * NOTIFY_IME_OF_SELECTION_CHANGE and/or NOTIFY_IME_OF_TEXT_CHANGE,
  * they should set mWantUpdates to NOTIFY_NOTHING to avoid the cost.
  * If the IME implementation needs notifications even while our process is
  * deactive, it should also set NOTIFY_DURING_DEACTIVE.
  */
-struct nsIMEUpdatePreference final
+struct IMENotificationRequests final
 {
   typedef uint8_t Notifications;
 
   enum : Notifications
   {
     NOTIFY_NOTHING                       = 0,
     NOTIFY_TEXT_CHANGE                   = 1 << 1,
     NOTIFY_POSITION_CHANGE               = 1 << 2,
@@ -47,29 +47,29 @@ struct nsIMEUpdatePreference final
     // returns NS_SUCCESS_EVENT_CONSUMED.  Otherwise, it returns NS_OK if it's
     // handled without any error.
     NOTIFY_MOUSE_BUTTON_EVENT_ON_CHAR    = 1 << 3,
     // NOTE: NOTIFY_DURING_DEACTIVE isn't supported in environments where two
     //       or more compositions are possible.  E.g., Mac and Linux (GTK).
     NOTIFY_DURING_DEACTIVE               = 1 << 7
   };
 
-  nsIMEUpdatePreference()
+  IMENotificationRequests()
     : mWantUpdates(NOTIFY_NOTHING)
   {
   }
 
-  explicit nsIMEUpdatePreference(Notifications aWantUpdates)
+  explicit IMENotificationRequests(Notifications aWantUpdates)
     : mWantUpdates(aWantUpdates)
   {
   }
 
-  nsIMEUpdatePreference operator|(const nsIMEUpdatePreference& aOther) const
+  IMENotificationRequests operator|(const IMENotificationRequests& aOther) const
   {
-    return nsIMEUpdatePreference(aOther.mWantUpdates | mWantUpdates);
+    return IMENotificationRequests(aOther.mWantUpdates | mWantUpdates);
   }
 
   bool WantTextChange() const
   {
     return !!(mWantUpdates & NOTIFY_TEXT_CHANGE);
   }
 
   bool WantPositionChanged() const
@@ -95,19 +95,16 @@ struct nsIMEUpdatePreference final
   Notifications mWantUpdates;
 };
 
 /**
  * Contains IMEStatus plus information about the current 
  * input context that the IME can use as hints if desired.
  */
 
-namespace mozilla {
-namespace widget {
-
 struct IMEState final
 {
   /**
    * IME enabled states, the mEnabled value of
    * SetInputContext()/GetInputContext() should be one value of following
    * values.
    *
    * WARNING: If you change these values, you also need to edit:
--- a/widget/PuppetWidget.cpp
+++ b/widget/PuppetWidget.cpp
@@ -155,17 +155,17 @@ PuppetWidget::Create(nsIWidget* aParent,
 
 void
 PuppetWidget::InitIMEState()
 {
   MOZ_ASSERT(mTabChild);
   if (mNeedIMEStateInit) {
     mContentCache.Clear();
     mTabChild->SendUpdateContentCache(mContentCache);
-    mIMEPreferenceOfParent = nsIMEUpdatePreference();
+    mIMENotificationRequestsOfParent = IMENotificationRequests();
     mNeedIMEStateInit = false;
   }
 }
 
 already_AddRefed<nsIWidget>
 PuppetWidget::CreateChild(const LayoutDeviceIntRect& aRect,
                           nsWidgetInitData* aInitData,
                           bool aForceUseIWidgetParent)
@@ -835,19 +835,19 @@ PuppetWidget::NotifyIMEOfFocusChange(con
         return NS_ERROR_FAILURE;
       }
     }
   } else {
     // When IME loses focus, we don't need to store anything.
     mContentCache.Clear();
   }
 
-  mIMEPreferenceOfParent = nsIMEUpdatePreference();
+  mIMENotificationRequestsOfParent = IMENotificationRequests();
   if (!mTabChild->SendNotifyIMEFocus(mContentCache, aIMENotification,
-                                     &mIMEPreferenceOfParent)) {
+                                     &mIMENotificationRequestsOfParent)) {
     return NS_ERROR_FAILURE;
   }
   return NS_OK;
 }
 
 nsresult
 PuppetWidget::NotifyIMEOfCompositionUpdate(
                 const IMENotification& aIMENotification)
@@ -859,38 +859,41 @@ PuppetWidget::NotifyIMEOfCompositionUpda
   if (mInputContext.mIMEState.mEnabled != IMEState::PLUGIN &&
       NS_WARN_IF(!mContentCache.CacheSelection(this, &aIMENotification))) {
     return NS_ERROR_FAILURE;
   }
   mTabChild->SendNotifyIMECompositionUpdate(mContentCache, aIMENotification);
   return NS_OK;
 }
 
-nsIMEUpdatePreference
-PuppetWidget::GetIMEUpdatePreference()
+IMENotificationRequests
+PuppetWidget::GetIMENotificationRequests()
 {
   if (mNativeTextEventDispatcherListener) {
-    // Use mNativeTextEventDispatcherListener for IME preference.
-    return mNativeTextEventDispatcherListener->GetIMEUpdatePreference();
+    // Use mNativeTextEventDispatcherListener for retrieving IME notification
+    // requests because non-native IME may have transaction.
+    return mNativeTextEventDispatcherListener->GetIMENotificationRequests();
   }
 
   // e10s requires IME content cache in in the TabParent for handling query
   // content event only with the parent process.  Therefore, this process
   // needs to receive a lot of information from the focused editor to sent
   // the latest content to the parent process.
   if (mInputContext.mIMEState.mEnabled == IMEState::PLUGIN) {
     // But if a plugin has focus, we cannot receive text nor selection change
     // in the plugin.  Therefore, PuppetWidget needs to receive only position
     // change event for updating the editor rect cache.
-    return nsIMEUpdatePreference(mIMEPreferenceOfParent.mWantUpdates |
-                                 nsIMEUpdatePreference::NOTIFY_POSITION_CHANGE);
+    return IMENotificationRequests(
+             mIMENotificationRequestsOfParent.mWantUpdates |
+             IMENotificationRequests::NOTIFY_POSITION_CHANGE);
   }
-  return nsIMEUpdatePreference(mIMEPreferenceOfParent.mWantUpdates |
-                               nsIMEUpdatePreference::NOTIFY_TEXT_CHANGE |
-                               nsIMEUpdatePreference::NOTIFY_POSITION_CHANGE );
+  return IMENotificationRequests(
+           mIMENotificationRequestsOfParent.mWantUpdates |
+           IMENotificationRequests::NOTIFY_TEXT_CHANGE |
+           IMENotificationRequests::NOTIFY_POSITION_CHANGE);
 }
 
 nsresult
 PuppetWidget::NotifyIMEOfTextChange(const IMENotification& aIMENotification)
 {
   MOZ_ASSERT(aIMENotification.mMessage == NOTIFY_IME_OF_TEXT_CHANGE,
              "Passed wrong notification");
   if (!mTabChild) {
@@ -907,17 +910,17 @@ PuppetWidget::NotifyIMEOfTextChange(cons
   //      the cache as far as possible here.
 
   if (NS_WARN_IF(!mContentCache.CacheText(this, &aIMENotification))) {
     return NS_ERROR_FAILURE;
   }
 
   // TabParent doesn't this this to cache.  we don't send the notification
   // if parent process doesn't request NOTIFY_TEXT_CHANGE.
-  if (mIMEPreferenceOfParent.WantTextChange()) {
+  if (mIMENotificationRequestsOfParent.WantTextChange()) {
     mTabChild->SendNotifyIMETextChange(mContentCache, aIMENotification);
   } else {
     mTabChild->SendUpdateContentCache(mContentCache);
   }
   return NS_OK;
 }
 
 nsresult
@@ -985,17 +988,17 @@ PuppetWidget::NotifyIMEOfPositionChange(
     return NS_ERROR_FAILURE;
   }
   // While a plugin has focus, selection range isn't available.  So, we don't
   // need to cache it at that time.
   if (mInputContext.mIMEState.mEnabled != IMEState::PLUGIN &&
       NS_WARN_IF(!mContentCache.CacheSelection(this, &aIMENotification))) {
     return NS_ERROR_FAILURE;
   }
-  if (mIMEPreferenceOfParent.WantPositionChanged()) {
+  if (mIMENotificationRequestsOfParent.WantPositionChanged()) {
     mTabChild->SendNotifyIMEPositionChange(mContentCache, aIMENotification);
   } else {
     mTabChild->SendUpdateContentCache(mContentCache);
   }
   return NS_OK;
 }
 
 void
--- a/widget/PuppetWidget.h
+++ b/widget/PuppetWidget.h
@@ -178,17 +178,17 @@ public:
 
   // This is used after a compositor reset.
   LayerManager* RecreateLayerManager(PLayerTransactionChild* aShadowManager);
 
   virtual void SetInputContext(const InputContext& aContext,
                                const InputContextAction& aAction) override;
   virtual InputContext GetInputContext() override;
   virtual NativeIMEContext GetNativeIMEContext() override;
-  virtual nsIMEUpdatePreference GetIMEUpdatePreference() override;
+  virtual IMENotificationRequests GetIMENotificationRequests() override;
   TextEventDispatcherListener* GetNativeTextEventDispatcherListener() override
   { return mNativeTextEventDispatcherListener; }
   void SetNativeTextEventDispatcherListener(TextEventDispatcherListener* aListener)
   { mNativeTextEventDispatcherListener = aListener; }
 
   virtual void SetCursor(nsCursor aCursor) override;
   virtual nsresult SetCursor(imgIContainer* aCursor,
                              uint32_t aHotspotX, uint32_t aHotspotY) override;
@@ -351,17 +351,17 @@ private:
   RefPtr<PuppetWidget> mChild;
   LayoutDeviceIntRegion mDirtyRegion;
   nsRevocableEventPtr<PaintTask> mPaintTask;
   RefPtr<MemoryPressureObserver> mMemoryPressureObserver;
   // XXX/cjones: keeping this around until we teach LayerManager to do
   // retained-content-only transactions
   RefPtr<DrawTarget> mDrawTarget;
   // IME
-  nsIMEUpdatePreference mIMEPreferenceOfParent;
+  IMENotificationRequests mIMENotificationRequestsOfParent;
   InputContext mInputContext;
   // mNativeIMEContext is initialized when this dispatches every composition
   // event both from parent process's widget and TextEventDispatcher in same
   // process.  If it hasn't been started composition yet, this isn't necessary
   // for XP code since there is no TextComposition instance which is caused by
   // the PuppetWidget instance.
   NativeIMEContext mNativeIMEContext;
   ContentCacheInChild mContentCache;
--- a/widget/TextEventDispatcherListener.h
+++ b/widget/TextEventDispatcherListener.h
@@ -2,23 +2,22 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_textinputdispatcherlistener_h_
 #define mozilla_textinputdispatcherlistener_h_
 
 #include "nsWeakReference.h"
 
-struct nsIMEUpdatePreference;
-
 namespace mozilla {
 namespace widget {
 
 class TextEventDispatcher;
 struct IMENotification;
+struct IMENotificationRequests;
 
 #define NS_TEXT_INPUT_PROXY_LISTENER_IID \
 { 0xf2226f55, 0x6ddb, 0x40d5, \
   { 0x8a, 0x24, 0xce, 0x4d, 0x5b, 0x38, 0x15, 0xf0 } };
 
 class TextEventDispatcherListener : public nsSupportsWeakReference
 {
 public:
@@ -30,17 +29,17 @@ public:
    * for the detail.
    */
   NS_IMETHOD NotifyIME(TextEventDispatcher* aTextEventDispatcher,
                        const IMENotification& aNotification) = 0;
 
   /**
    * Returns preference for which IME notification are received by NotifyIME().
    */
-  NS_IMETHOD_(nsIMEUpdatePreference) GetIMEUpdatePreference() = 0;
+  NS_IMETHOD_(IMENotificationRequests) GetIMENotificationRequests() = 0;
 
   /**
    * OnRemovedFrom() is called when the TextEventDispatcher stops working and
    * is releasing the listener.
    */
   NS_IMETHOD_(void) OnRemovedFrom(
                       TextEventDispatcher* aTextEventDispatcher) = 0;
 
--- a/widget/android/GeckoEditableSupport.cpp
+++ b/widget/android/GeckoEditableSupport.cpp
@@ -1130,24 +1130,24 @@ GeckoEditableSupport::OnRemovedFrom(Text
 void
 GeckoEditableSupport::WillDispatchKeyboardEvent(
         TextEventDispatcher* aTextEventDispatcher,
         WidgetKeyboardEvent& aKeyboardEvent, uint32_t aIndexOfKeypress,
         void* aData)
 {
 }
 
-NS_IMETHODIMP_(nsIMEUpdatePreference)
-GeckoEditableSupport::GetIMEUpdatePreference()
+NS_IMETHODIMP_(IMENotificationRequests)
+GeckoEditableSupport::GetIMENotificationRequests()
 {
     // While a plugin has focus, Listener doesn't need any notifications.
     if (GetInputContext().mIMEState.mEnabled == IMEState::PLUGIN) {
-      return nsIMEUpdatePreference();
+      return IMENotificationRequests();
     }
-    return nsIMEUpdatePreference(nsIMEUpdatePreference::NOTIFY_TEXT_CHANGE);
+    return IMENotificationRequests(IMENotificationRequests::NOTIFY_TEXT_CHANGE);
 }
 
 void
 GeckoEditableSupport::SetInputContext(const InputContext& aContext,
                                       const InputContextAction& aAction)
 {
     MOZ_ASSERT(mEditable);
 
--- a/widget/android/GeckoEditableSupport.h
+++ b/widget/android/GeckoEditableSupport.h
@@ -187,17 +187,17 @@ public:
     {}
 
     NS_DECL_ISUPPORTS
 
     // TextEventDispatcherListener methods
     NS_IMETHOD NotifyIME(TextEventDispatcher* aTextEventDispatcher,
                          const IMENotification& aNotification) override;
 
-    NS_IMETHOD_(nsIMEUpdatePreference) GetIMEUpdatePreference() override;
+    NS_IMETHOD_(IMENotificationRequests) GetIMENotificationRequests() override;
 
     NS_IMETHOD_(void) OnRemovedFrom(
             TextEventDispatcher* aTextEventDispatcher) override;
 
     NS_IMETHOD_(void) WillDispatchKeyboardEvent(
             TextEventDispatcher* aTextEventDispatcher,
             WidgetKeyboardEvent& aKeyboardEvent,
             uint32_t aIndexOfKeypress,
--- a/widget/cocoa/TextInputHandler.h
+++ b/widget/cocoa/TextInputHandler.h
@@ -769,17 +769,17 @@ private:
  */
 
 class IMEInputHandler : public TextInputHandlerBase
 {
 public:
   // TextEventDispatcherListener methods
   NS_IMETHOD NotifyIME(TextEventDispatcher* aTextEventDispatcher,
                        const IMENotification& aNotification) override;
-  NS_IMETHOD_(nsIMEUpdatePreference) GetIMEUpdatePreference() override;
+  NS_IMETHOD_(IMENotificationRequests) GetIMENotificationRequests() override;
   NS_IMETHOD_(void) OnRemovedFrom(
                       TextEventDispatcher* aTextEventDispatcher) override;
   NS_IMETHOD_(void) WillDispatchKeyboardEvent(
                       TextEventDispatcher* aTextEventDispatcher,
                       WidgetKeyboardEvent& aKeyboardEvent,
                       uint32_t aIndexOfKeypress,
                       void* aData) override;
 
--- a/widget/cocoa/TextInputHandler.mm
+++ b/widget/cocoa/TextInputHandler.mm
@@ -2618,23 +2618,23 @@ IMEInputHandler::NotifyIME(TextEventDisp
     case NOTIFY_IME_OF_SELECTION_CHANGE:
       OnSelectionChange(aNotification);
       return NS_OK;
     default:
       return NS_ERROR_NOT_IMPLEMENTED;
   }
 }
 
-NS_IMETHODIMP_(nsIMEUpdatePreference)
-IMEInputHandler::GetIMEUpdatePreference()
+NS_IMETHODIMP_(IMENotificationRequests)
+IMEInputHandler::GetIMENotificationRequests()
 {
   // XXX Shouldn't we move floating window which shows composition string
   //     when plugin has focus and its parent is scrolled or the window is
   //     moved?
-  return nsIMEUpdatePreference();
+  return IMENotificationRequests();
 }
 
 NS_IMETHODIMP_(void)
 IMEInputHandler::OnRemovedFrom(TextEventDispatcher* aTextEventDispatcher)
 {
   // XXX When input transaction is being stolen by add-on, what should we do?
 }
 
--- a/widget/gtk/IMContextWrapper.cpp
+++ b/widget/gtk/IMContextWrapper.cpp
@@ -319,33 +319,32 @@ IMContextWrapper::GetTextEventDispatcher
   }
   TextEventDispatcher* dispatcher =
     mLastFocusedWindow->GetTextEventDispatcher();
   // nsIWidget::GetTextEventDispatcher() shouldn't return nullptr.
   MOZ_RELEASE_ASSERT(dispatcher);
   return dispatcher;
 }
 
-NS_IMETHODIMP_(nsIMEUpdatePreference)
-IMContextWrapper::GetIMEUpdatePreference()
+NS_IMETHODIMP_(IMENotificationRequests)
+IMContextWrapper::GetIMENotificationRequests()
 {
     // While a plugin has focus, IMContextWrapper doesn't need any
     // notifications.
     if (mInputContext.mIMEState.mEnabled == IMEState::PLUGIN) {
-      return nsIMEUpdatePreference();
+      return IMENotificationRequests();
     }
 
-    nsIMEUpdatePreference::Notifications notifications =
-        nsIMEUpdatePreference::NOTIFY_NOTHING;
+    IMENotificationRequests::Notifications notifications =
+        IMENotificationRequests::NOTIFY_NOTHING;
     // If it's not enabled, we don't need position change notification.
     if (IsEnabled()) {
-        notifications |= nsIMEUpdatePreference::NOTIFY_POSITION_CHANGE;
+        notifications |= IMENotificationRequests::NOTIFY_POSITION_CHANGE;
     }
-    nsIMEUpdatePreference updatePreference(notifications);
-    return updatePreference;
+    return IMENotificationRequests(notifications);
 }
 
 void
 IMContextWrapper::OnDestroyWindow(nsWindow* aWindow)
 {
     MOZ_LOG(gGtkIMLog, LogLevel::Info,
         ("0x%p OnDestroyWindow(aWindow=0x%p), mLastFocusedWindow=0x%p, "
          "mOwnerWindow=0x%p, mLastFocusedModule=0x%p",
--- a/widget/gtk/IMContextWrapper.h
+++ b/widget/gtk/IMContextWrapper.h
@@ -28,17 +28,17 @@ namespace widget {
 class IMContextWrapper final : public TextEventDispatcherListener
 {
 public:
     // TextEventDispatcherListener implementation
     NS_DECL_ISUPPORTS
 
     NS_IMETHOD NotifyIME(TextEventDispatcher* aTextEventDispatcher,
                          const IMENotification& aNotification) override;
-    NS_IMETHOD_(nsIMEUpdatePreference) GetIMEUpdatePreference() override;
+    NS_IMETHOD_(IMENotificationRequests) GetIMENotificationRequests() override;
     NS_IMETHOD_(void) OnRemovedFrom(
                           TextEventDispatcher* aTextEventDispatcher) override;
     NS_IMETHOD_(void) WillDispatchKeyboardEvent(
                           TextEventDispatcher* aTextEventDispatcher,
                           WidgetKeyboardEvent& aKeyboardEvent,
                           uint32_t aIndexOfKeypress,
                           void* aData) override;
 
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -1772,17 +1772,17 @@ nsBaseWidget::NotifySizeMoveDone()
 
 void
 nsBaseWidget::NotifyWindowMoved(int32_t aX, int32_t aY)
 {
   if (mWidgetListener) {
     mWidgetListener->WindowMoved(this, aX, aY);
   }
 
-  if (mIMEHasFocus && GetIMEUpdatePreference().WantPositionChanged()) {
+  if (mIMEHasFocus && GetIMENotificationRequests().WantPositionChanged()) {
     NotifyIME(IMENotification(IMEMessage::NOTIFY_IME_OF_POSITION_CHANGE));
   }
 }
 
 void
 nsBaseWidget::NotifySysColorChanged()
 {
   if (!mWidgetListener || mWidgetListener->GetXULWindow())
@@ -1848,26 +1848,26 @@ nsBaseWidget::NotifyIME(const IMENotific
       if (aIMENotification.mMessage == NOTIFY_IME_OF_BLUR) {
         mIMEHasFocus = false;
       }
       return rv2 == NS_ERROR_NOT_IMPLEMENTED ? rv : rv2;
     }
   }
 }
 
-nsIMEUpdatePreference
-nsBaseWidget::GetIMEUpdatePreference()
+IMENotificationRequests
+nsBaseWidget::GetIMENotificationRequests()
 {
   RefPtr<TextEventDispatcherListener> listener =
     GetNativeTextEventDispatcherListener();
   if (!listener) {
     // Default is to not send additional change notifications to NotifyIME.
-    return nsIMEUpdatePreference();
+    return IMENotificationRequests();
   }
-  return listener->GetIMEUpdatePreference();
+  return listener->GetIMENotificationRequests();
 }
 
 void
 nsBaseWidget::EnsureTextEventDispatcher()
 {
   if (mTextEventDispatcher) {
     return;
   }
--- a/widget/nsBaseWidget.h
+++ b/widget/nsBaseWidget.h
@@ -281,17 +281,17 @@ public:
   virtual MOZ_MUST_USE nsresult AttachNativeKeyEvent(mozilla::WidgetKeyboardEvent& aEvent) override { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual bool            ExecuteNativeKeyBinding(
                             NativeKeyBindingsType aType,
                             const mozilla::WidgetKeyboardEvent& aEvent,
                             DoCommandCallback aCallback,
                             void* aCallbackData) override { return false; }
   bool                    ComputeShouldAccelerate();
   virtual bool            WidgetTypeSupportsAcceleration() { return true; }
-  virtual nsIMEUpdatePreference GetIMEUpdatePreference() override;
+  virtual IMENotificationRequests GetIMENotificationRequests() override;
   virtual MOZ_MUST_USE nsresult OnDefaultButtonLoaded(const LayoutDeviceIntRect& aButtonRect) override { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual already_AddRefed<nsIWidget>
   CreateChild(const LayoutDeviceIntRect& aRect,
               nsWidgetInitData* aInitData = nullptr,
               bool aForceUseIWidgetParent = false) override;
   virtual void            AttachViewToTopLevel(bool aUseAttachedEvents) override;
   virtual nsIWidgetListener* GetAttachedWidgetListener() override;
   virtual void               SetAttachedWidgetListener(nsIWidgetListener* aListener) override;
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -718,19 +718,19 @@ struct ParamTraits<mozilla::WidgetSelect
            ReadParam(aMsg, aIter, &aResult->mReversed) &&
            ReadParam(aMsg, aIter, &aResult->mExpandToClusterBoundary) &&
            ReadParam(aMsg, aIter, &aResult->mSucceeded) &&
            ReadParam(aMsg, aIter, &aResult->mUseNativeLineBreak);
   }
 };
 
 template<>
-struct ParamTraits<nsIMEUpdatePreference>
+struct ParamTraits<mozilla::widget::IMENotificationRequests>
 {
-  typedef nsIMEUpdatePreference paramType;
+  typedef mozilla::widget::IMENotificationRequests paramType;
 
   static void Write(Message* aMsg, const paramType& aParam)
   {
     WriteParam(aMsg, aParam.mWantUpdates);
   }
 
   static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
   {
--- a/widget/nsIWidget.h
+++ b/widget/nsIWidget.h
@@ -338,16 +338,17 @@ class nsIWidget : public nsISupports
     typedef mozilla::layers::FrameMetrics FrameMetrics;
     typedef mozilla::layers::LayerManager LayerManager;
     typedef mozilla::layers::LayerManagerComposite LayerManagerComposite;
     typedef mozilla::layers::LayersBackend LayersBackend;
     typedef mozilla::layers::PLayerTransactionChild PLayerTransactionChild;
     typedef mozilla::layers::ZoomConstraints ZoomConstraints;
     typedef mozilla::widget::IMEMessage IMEMessage;
     typedef mozilla::widget::IMENotification IMENotification;
+    typedef mozilla::widget::IMENotificationRequests IMENotificationRequests;
     typedef mozilla::widget::IMEState IMEState;
     typedef mozilla::widget::InputContext InputContext;
     typedef mozilla::widget::InputContextAction InputContextAction;
     typedef mozilla::widget::NativeIMEContext NativeIMEContext;
     typedef mozilla::widget::SizeConstraints SizeConstraints;
     typedef mozilla::widget::TextEventDispatcher TextEventDispatcher;
     typedef mozilla::widget::TextEventDispatcherListener
       TextEventDispatcherListener;
@@ -1820,17 +1821,17 @@ public:
                         NativeKeyBindingsType aType,
                         const mozilla::WidgetKeyboardEvent& aEvent,
                         DoCommandCallback aCallback,
                         void* aCallbackData) = 0;
 
     /*
      * Retrieves preference for IME updates
      */
-    virtual nsIMEUpdatePreference GetIMEUpdatePreference() = 0;
+    virtual IMENotificationRequests GetIMENotificationRequests() = 0;
 
     /*
      * Call this method when a dialog is opened which has a default button.
      * The button's rectangle should be supplied in aButtonRect.
      */
     virtual MOZ_MUST_USE nsresult
     OnDefaultButtonLoaded(const LayoutDeviceIntRect& aButtonRect) = 0;
 
--- a/widget/windows/IMMHandler.cpp
+++ b/widget/windows/IMMHandler.cpp
@@ -385,22 +385,22 @@ IMMHandler::InitKeyboardLayout(nsWindow*
 // static
 UINT
 IMMHandler::GetKeyboardCodePage()
 {
   return sCodePage;
 }
 
 // static
-nsIMEUpdatePreference
-IMMHandler::GetIMEUpdatePreference()
+IMENotificationRequests
+IMMHandler::GetIMENotificationRequests()
 {
-  return nsIMEUpdatePreference(
-    nsIMEUpdatePreference::NOTIFY_POSITION_CHANGE |
-    nsIMEUpdatePreference::NOTIFY_MOUSE_BUTTON_EVENT_ON_CHAR);
+  return IMENotificationRequests(
+    IMENotificationRequests::NOTIFY_POSITION_CHANGE |
+    IMENotificationRequests::NOTIFY_MOUSE_BUTTON_EVENT_ON_CHAR);
 }
 
 // used for checking the lParam of WM_IME_COMPOSITION
 #define IS_COMPOSING_LPARAM(lParam) \
   ((lParam) & (GCS_COMPSTR | GCS_COMPATTR | GCS_COMPCLAUSE | GCS_CURSORPOS))
 #define IS_COMMITTING_LPARAM(lParam) ((lParam) & GCS_RESULTSTR)
 // Some IMEs (e.g., the standard IME for Korean) don't have caret position,
 // then, we should not set caret position to compositionchange event.
--- a/widget/windows/IMMHandler.h
+++ b/widget/windows/IMMHandler.h
@@ -141,17 +141,17 @@ public:
   static void CommitComposition(nsWindow* aWindow, bool aForce = false);
   static void CancelComposition(nsWindow* aWindow, bool aForce = false);
   static void OnFocusChange(bool aFocus, nsWindow* aWindow);
   static void OnUpdateComposition(nsWindow* aWindow);
   static void OnSelectionChange(nsWindow* aWindow,
                                 const IMENotification& aIMENotification,
                                 bool aIsIMMActive);
 
-  static nsIMEUpdatePreference GetIMEUpdatePreference();
+  static IMENotificationRequests GetIMENotificationRequests();
 
   // Returns NS_SUCCESS_EVENT_CONSUMED if the mouse button event is consumed by
   // IME.  Otherwise, NS_OK.
   static nsresult OnMouseButtonEvent(nsWindow* aWindow,
                                      const IMENotification& aIMENotification);
   static void SetCandidateWindow(nsWindow* aWindow, CANDIDATEFORM* aForm);
   static void DefaultProcOfPluginEvent(nsWindow* aWindow,
                                        const NPEvent* aEvent);
--- a/widget/windows/TSFTextStore.cpp
+++ b/widget/windows/TSFTextStore.cpp
@@ -4829,31 +4829,31 @@ TSFTextStore::CreateAndSetFocus(nsWindow
        "ITextStoreACPSink::OnLayoutChange(TS_LC_CREATE) for 0x%p...",
        textStore.get()));
     textStore->mSink->OnLayoutChange(TS_LC_CREATE, TEXTSTORE_DEFAULT_VIEW);
   }
   return true;
 }
 
 // static
-nsIMEUpdatePreference
-TSFTextStore::GetIMEUpdatePreference()
+IMENotificationRequests
+TSFTextStore::GetIMENotificationRequests()
 {
   if (sThreadMgr && sEnabledTextStore && sEnabledTextStore->mDocumentMgr) {
     RefPtr<ITfDocumentMgr> docMgr;
     sThreadMgr->GetFocus(getter_AddRefs(docMgr));
     if (docMgr == sEnabledTextStore->mDocumentMgr) {
-      return nsIMEUpdatePreference(
-               nsIMEUpdatePreference::NOTIFY_TEXT_CHANGE |
-               nsIMEUpdatePreference::NOTIFY_POSITION_CHANGE |
-               nsIMEUpdatePreference::NOTIFY_MOUSE_BUTTON_EVENT_ON_CHAR |
-               nsIMEUpdatePreference::NOTIFY_DURING_DEACTIVE);
+      return IMENotificationRequests(
+               IMENotificationRequests::NOTIFY_TEXT_CHANGE |
+               IMENotificationRequests::NOTIFY_POSITION_CHANGE |
+               IMENotificationRequests::NOTIFY_MOUSE_BUTTON_EVENT_ON_CHAR |
+               IMENotificationRequests::NOTIFY_DURING_DEACTIVE);
     }
   }
-  return nsIMEUpdatePreference();
+  return IMENotificationRequests();
 }
 
 nsresult
 TSFTextStore::OnTextChangeInternal(const IMENotification& aIMENotification)
 {
   const TextChangeDataBase& textChangeData = aIMENotification.mTextChangeData;
 
   MOZ_LOG(sTextStoreLog, LogLevel::Debug,
--- a/widget/windows/TSFTextStore.h
+++ b/widget/windows/TSFTextStore.h
@@ -180,17 +180,17 @@ public:
     NS_ASSERTION(IsInTSFMode(), "Not in TSF mode, shouldn't be called");
     if (!sEnabledTextStore) {
       return NS_OK;
     }
     RefPtr<TSFTextStore> textStore(sEnabledTextStore);
     return textStore->OnMouseButtonEventInternal(aIMENotification);
   }
 
-  static nsIMEUpdatePreference GetIMEUpdatePreference();
+  static IMENotificationRequests GetIMENotificationRequests();
 
   // Returns the address of the pointer so that the TSF automatic test can
   // replace the system object with a custom implementation for testing.
   // XXX TSF doesn't work now.  Should we remove it?
   static void* GetNativeData(uint32_t aDataType)
   {
     switch (aDataType) {
       case NS_NATIVE_TSF_THREAD_MGR:
--- a/widget/windows/WinIMEHandler.cpp
+++ b/widget/windows/WinIMEHandler.cpp
@@ -329,41 +329,41 @@ IMEHandler::NotifyIME(nsWindow* aWindow,
 #endif //NS_ENABLE_TSF
       return NS_OK;
     default:
       return NS_ERROR_NOT_IMPLEMENTED;
   }
 }
 
 // static
-nsIMEUpdatePreference
-IMEHandler::GetUpdatePreference()
+IMENotificationRequests
+IMEHandler::GetIMENotificationRequests()
 {
   // While a plugin has focus, neither TSFTextStore nor IMMHandler needs
   // notifications.
   if (sPluginHasFocus) {
-    return nsIMEUpdatePreference();
+    return IMENotificationRequests();
   }
 
 #ifdef NS_ENABLE_TSF
   if (IsTSFAvailable()) {
     if (!sIsIMMEnabled) {
-      return TSFTextStore::GetIMEUpdatePreference();
+      return TSFTextStore::GetIMENotificationRequests();
     }
     // Even if TSF is available, the active IME may be an IMM-IME.
-    // Unfortunately, changing the result of GetUpdatePreference() while an
-    // editor has focus isn't supported by IMEContentObserver nor
+    // Unfortunately, changing the result of GetIMENotificationRequests() while
+    // an editor has focus isn't supported by IMEContentObserver nor
     // ContentCacheInParent.  Therefore, we need to request whole notifications
     // which are necessary either IMMHandler or TSFTextStore.
-    return IMMHandler::GetIMEUpdatePreference() |
-             TSFTextStore::GetIMEUpdatePreference();
+    return IMMHandler::GetIMENotificationRequests() |
+             TSFTextStore::GetIMENotificationRequests();
   }
 #endif //NS_ENABLE_TSF
 
-  return IMMHandler::GetIMEUpdatePreference();
+  return IMMHandler::GetIMENotificationRequests();
 }
 
 // static
 TextEventDispatcherListener*
 IMEHandler::GetNativeTextEventDispatcherListener()
 {
   return WinTextEventDispatcherListener::GetInstance();
 }
--- a/widget/windows/WinIMEHandler.h
+++ b/widget/windows/WinIMEHandler.h
@@ -67,19 +67,19 @@ public:
 
   /**
    * Notifies IME of the notification (a request or an event).
    */
   static nsresult NotifyIME(nsWindow* aWindow,
                             const IMENotification& aIMENotification);
 
   /**
-   * Returns update preferences.
+   * Returns notification requests of IME.
    */
-  static nsIMEUpdatePreference GetUpdatePreference();
+  static IMENotificationRequests GetIMENotificationRequests();
 
   /**
    * Returns native text event dispatcher listener.
    */
   static TextEventDispatcherListener* GetNativeTextEventDispatcherListener();
 
   /**
    * Returns IME open state on the window.
--- a/widget/windows/WinTextEventDispatcherListener.cpp
+++ b/widget/windows/WinTextEventDispatcherListener.cpp
@@ -51,20 +51,20 @@ WinTextEventDispatcherListener::NotifyIM
 {
   nsWindow* window = static_cast<nsWindow*>(aTextEventDispatcher->GetWidget());
   if (NS_WARN_IF(!window)) {
     return NS_ERROR_FAILURE;
   }
   return IMEHandler::NotifyIME(window, aNotification);
 }
 
-NS_IMETHODIMP_(nsIMEUpdatePreference)
-WinTextEventDispatcherListener::GetIMEUpdatePreference()
+NS_IMETHODIMP_(IMENotificationRequests)
+WinTextEventDispatcherListener::GetIMENotificationRequests()
 {
-  return IMEHandler::GetUpdatePreference();
+  return IMEHandler::GetIMENotificationRequests();
 }
 
 NS_IMETHODIMP_(void)
 WinTextEventDispatcherListener::OnRemovedFrom(
                                   TextEventDispatcher* aTextEventDispatcher)
 {
   // XXX When input transaction is being stolen by add-on, what should we do?
 }
--- a/widget/windows/WinTextEventDispatcherListener.h
+++ b/widget/windows/WinTextEventDispatcherListener.h
@@ -24,17 +24,17 @@ class WinTextEventDispatcherListener fin
 public:
   static WinTextEventDispatcherListener* GetInstance();
   static void Shutdown();
 
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD NotifyIME(TextEventDispatcher* aTextEventDispatcher,
                        const IMENotification& aNotification) override;
-  NS_IMETHOD_(nsIMEUpdatePreference) GetIMEUpdatePreference() override;
+  NS_IMETHOD_(IMENotificationRequests) GetIMENotificationRequests() override;
   NS_IMETHOD_(void) OnRemovedFrom(
                       TextEventDispatcher* aTextEventDispatcher) override;
   NS_IMETHOD_(void) WillDispatchKeyboardEvent(
                       TextEventDispatcher* aTextEventDispatcher,
                       WidgetKeyboardEvent& aKeyboardEvent,
                       uint32_t aIndexOfKeypress,
                       void* aData) override;