Bug 805767 part.3 Remove hack for bug 496360 r=roc
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 13 Nov 2012 22:04:45 +0900
changeset 117720 246c565c9da975309db53bbf2aa3e67eb74d7366
parent 117719 1f4c0a90aa2c39370dde7951d89f31b4eb63f5ec
child 117721 d56d537a1843c0b5d8e112d1a2dc301e4728e054
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs805767, 496360
milestone19.0a1
Bug 805767 part.3 Remove hack for bug 496360 r=roc
widget/cocoa/nsChildView.mm
widget/gtk2/nsWindow.cpp
widget/nsIWidget.h
widget/windows/nsWindow.cpp
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -1655,18 +1655,17 @@ NS_IMETHODIMP nsChildView::GetToggledKey
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP nsChildView::OnIMEFocusChange(bool aFocus)
 {
   NS_ENSURE_TRUE(mTextInputHandler, NS_ERROR_NOT_AVAILABLE);
   mTextInputHandler->OnFocusChangeInGecko(aFocus);
-  // XXX Return NS_ERROR_NOT_IMPLEMENTED, see bug 496360.
-  return NS_ERROR_NOT_IMPLEMENTED;
+  return NS_OK;
 }
 
 NSView<mozView>* nsChildView::GetEditorView()
 {
   NSView<mozView>* editorView = mView;
   // We need to get editor's view. E.g., when the focus is in the bookmark
   // dialog, the view is <panel> element of the dialog.  At this time, the key
   // events are processed the parent window's view that has native focus.
--- a/widget/gtk2/nsWindow.cpp
+++ b/widget/gtk2/nsWindow.cpp
@@ -5916,18 +5916,17 @@ nsWindow::CancelIMEComposition()
 }
 
 NS_IMETHODIMP
 nsWindow::OnIMEFocusChange(bool aFocus)
 {
     if (mIMModule) {
       mIMModule->OnFocusChangeInGecko(aFocus);
     }
-    // XXX Return NS_ERROR_NOT_IMPLEMENTED, see bug 496360.
-    return NS_ERROR_NOT_IMPLEMENTED;
+    return NS_OK;
 }
 
 NS_IMETHODIMP
 nsWindow::GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState)
 {
     NS_ENSURE_ARG_POINTER(aLEDState);
 
     KeymapWrapper::Modifiers modifier;
--- a/widget/nsIWidget.h
+++ b/widget/nsIWidget.h
@@ -1512,19 +1512,16 @@ class nsIWidget : public nsISupports {
      */
     NS_IMETHOD GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState) = 0;
 
     /*
      * An editable node (i.e. input/textarea/design mode document)
      *  is receiving or giving up focus
      * aFocus is true if node is receiving focus
      * aFocus is false if node is giving up focus (blur)
-     *
-     * If this returns NS_ERROR_*, OnIMETextChange and OnIMESelectionChange
-     * will be never called.
      */
     NS_IMETHOD OnIMEFocusChange(bool aFocus) = 0;
 
     /*
      * Text content of the focused node has changed
      * aStart is the starting offset of the change
      * aOldEnd is the ending offset of the change
      * aNewEnd is the caret offset after the change
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -7399,17 +7399,17 @@ nsWindow::GetToggledKeyState(uint32_t aK
 
 #ifdef NS_ENABLE_TSF
 NS_IMETHODIMP
 nsWindow::OnIMEFocusChange(bool aFocus)
 {
   nsresult rv = nsTextStore::OnFocusChange(aFocus, this,
                                            mInputContext.mIMEState.mEnabled);
   if (rv == NS_ERROR_NOT_AVAILABLE)
-    rv = NS_ERROR_NOT_IMPLEMENTED; // TSF is not enabled, maybe.
+    rv = NS_OK; // TSF is not enabled, maybe.
   return rv;
 }
 
 NS_IMETHODIMP
 nsWindow::OnIMETextChange(uint32_t aStart,
                           uint32_t aOldEnd,
                           uint32_t aNewEnd)
 {