Bug 1263653 - Fixed TSFTextStore.h compilation with mingw. r=masayuki
authorJacek Caban <jacek@codeweavers.com>
Tue, 12 Apr 2016 12:37:18 +0200
changeset 330673 a2d94f934b2a733fa09e8f1097ee6fe07d7a2ad1
parent 330672 474f2f3c105915264882ba0f9733e7d1ee986c95
child 330674 13bb9febca01431b9ed8217be841b615156d915e
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1263653
milestone48.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 1263653 - Fixed TSFTextStore.h compilation with mingw. r=masayuki
widget/windows/TSFTextStore.cpp
widget/windows/TSFTextStore.h
--- a/widget/windows/TSFTextStore.cpp
+++ b/widget/windows/TSFTextStore.cpp
@@ -5299,17 +5299,17 @@ TSFTextStore::SetInputContext(nsWindowBa
           aWidget, GetIMEEnabledName(aContext.mIMEState.mEnabled),
           GetFocusChangeName(aAction.mFocusChange), sEnabledTextStore.get(),
           GetBoolName(ThinksHavingFocus())));
 
   NS_ENSURE_TRUE_VOID(IsInTSFMode());
 
   if (aAction.mFocusChange != InputContextAction::FOCUS_NOT_CHANGED) {
     if (sEnabledTextStore) {
-      RefPtr<TSFTextStore> textStore = sEnabledTextStore;
+      RefPtr<TSFTextStore> textStore(sEnabledTextStore);
       textStore->SetInputScope(aContext.mHTMLInputType,
                                aContext.mHTMLInputInputmode);
     }
     return;
   }
 
   // If focus isn't actually changed but the enabled state is changed,
   // emulate the focus move.
--- a/widget/windows/TSFTextStore.h
+++ b/widget/windows/TSFTextStore.h
@@ -114,74 +114,74 @@ public:
   static bool     GetIMEOpenState(void);
 
   static void     CommitComposition(bool aDiscard)
   {
     NS_ASSERTION(IsInTSFMode(), "Not in TSF mode, shouldn't be called");
     if (!sEnabledTextStore) {
       return;
     }
-    RefPtr<TSFTextStore> textStore = sEnabledTextStore;
+    RefPtr<TSFTextStore> textStore(sEnabledTextStore);
     textStore->CommitCompositionInternal(aDiscard);
   }
 
   static void SetInputContext(nsWindowBase* aWidget,
                               const InputContext& aContext,
                               const InputContextAction& aAction);
 
   static nsresult OnFocusChange(bool aGotFocus,
                                 nsWindowBase* aFocusedWidget,
                                 const InputContext& aContext);
   static nsresult OnTextChange(const IMENotification& aIMENotification)
   {
     NS_ASSERTION(IsInTSFMode(), "Not in TSF mode, shouldn't be called");
     if (!sEnabledTextStore) {
       return NS_OK;
     }
-    RefPtr<TSFTextStore> textStore = sEnabledTextStore;
+    RefPtr<TSFTextStore> textStore(sEnabledTextStore);
     return textStore->OnTextChangeInternal(aIMENotification);
   }
 
   static nsresult OnSelectionChange(const IMENotification& aIMENotification)
   {
     NS_ASSERTION(IsInTSFMode(), "Not in TSF mode, shouldn't be called");
     if (!sEnabledTextStore) {
       return NS_OK;
     }
-    RefPtr<TSFTextStore> textStore = sEnabledTextStore;
+    RefPtr<TSFTextStore> textStore(sEnabledTextStore);
     return textStore->OnSelectionChangeInternal(aIMENotification);
   }
 
   static nsresult OnLayoutChange()
   {
     NS_ASSERTION(IsInTSFMode(), "Not in TSF mode, shouldn't be called");
     if (!sEnabledTextStore) {
       return NS_OK;
     }
-    RefPtr<TSFTextStore> textStore = sEnabledTextStore;
+    RefPtr<TSFTextStore> textStore(sEnabledTextStore);
     return textStore->OnLayoutChangeInternal();
   }
 
   static nsresult OnUpdateComposition()
   {
     NS_ASSERTION(IsInTSFMode(), "Not in TSF mode, shouldn't be called");
     if (!sEnabledTextStore) {
       return NS_OK;
     }
-    RefPtr<TSFTextStore> textStore = sEnabledTextStore;
+    RefPtr<TSFTextStore> textStore(sEnabledTextStore);
     return textStore->OnUpdateCompositionInternal();
   }
 
   static nsresult OnMouseButtonEvent(const IMENotification& aIMENotification)
   {
     NS_ASSERTION(IsInTSFMode(), "Not in TSF mode, shouldn't be called");
     if (!sEnabledTextStore) {
       return NS_OK;
     }
-    RefPtr<TSFTextStore> textStore = sEnabledTextStore;
+    RefPtr<TSFTextStore> textStore(sEnabledTextStore);
     return textStore->OnMouseButtonEventInternal(aIMENotification);
   }
 
   static nsIMEUpdatePreference GetIMEUpdatePreference();
 
   // 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?