Bug 1497815 - Rename EditorEventListener::EnsureCommitCompoisition() to EditorEventListener::EnsureCommitComposition() r=m_kato
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 11 Oct 2018 09:12:15 +0000
changeset 499134 57d97b765e4913a0abecea6444eb4e9bd43025cd
parent 499133 43470b75b0d4c3f53ac5f8f50f1789873e50430b
child 499135 8958a60dd82423a4689837029be94e6d032f6b8c
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersm_kato
bugs1497815
milestone64.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 1497815 - Rename EditorEventListener::EnsureCommitCompoisition() to EditorEventListener::EnsureCommitComposition() r=m_kato Just fixing typo of the method name. Differential Revision: https://phabricator.services.mozilla.com/D8336
editor/libeditor/EditorEventListener.cpp
editor/libeditor/EditorEventListener.h
editor/libeditor/HTMLEditorEventListener.cpp
--- a/editor/libeditor/EditorEventListener.cpp
+++ b/editor/libeditor/EditorEventListener.cpp
@@ -351,17 +351,17 @@ bool
 EditorEventListener::DetachedFromEditorOrDefaultPrevented(
                        WidgetEvent* aWidgetEvent) const
 {
   return NS_WARN_IF(!aWidgetEvent) || DetachedFromEditor() ||
          aWidgetEvent->DefaultPrevented();
 }
 
 bool
-EditorEventListener::EnsureCommitCompoisition()
+EditorEventListener::EnsureCommitComposition()
 {
   MOZ_ASSERT(!DetachedFromEditor());
   RefPtr<EditorBase> editorBase(mEditorBase);
   editorBase->CommitComposition();
   return !DetachedFromEditor();
 }
 
 NS_IMETHODIMP
@@ -669,17 +669,17 @@ EditorEventListener::MouseClick(WidgetMo
 
   if (DetachedFromEditorOrDefaultPrevented(aMouseClickEvent)) {
     // We're done if 'preventdefault' is true (see for example bug 70698).
     return NS_OK;
   }
 
   // If we got a mouse down inside the editing area, we should force the
   // IME to commit before we change the cursor position.
-  if (!EnsureCommitCompoisition()) {
+  if (!EnsureCommitComposition()) {
     return NS_OK;
   }
 
   // XXX The following code is hack for our buggy "click" and "auxclick"
   //     implementation.  "auxclick" event was added recently, however,
   //     any non-primary button click event handlers in our UI still keep
   //     listening to "click" events.  Additionally, "auxclick" event is
   //     fired after "click" events and even if we do this in the system event
@@ -740,17 +740,17 @@ EditorEventListener::MouseDown(MouseEven
 {
   // FYI: We don't need to check if it's already consumed here because
   //      we need to commit composition at mouse button operation.
   // FYI: This may be called by HTMLEditorEventListener::MouseDown() even
   //      when the event is not acceptable for committing composition.
   if (DetachedFromEditor()) {
     return NS_OK;
   }
-  Unused << EnsureCommitCompoisition();
+  Unused << EnsureCommitComposition();
   return NS_OK;
 }
 
 /**
  * Drag event implementation
  */
 
 nsresult
--- a/editor/libeditor/EditorEventListener.h
+++ b/editor/libeditor/EditorEventListener.h
@@ -105,17 +105,17 @@ protected:
    */
   bool DetachedFromEditorOrDefaultPrevented(WidgetEvent* aEvent) const;
 
   /**
    * EnsureCommitComposition() requests to commit composition if there is.
    * Returns false if the editor is detached from the listener, i.e.,
    * impossible to continue to handle the event.  Otherwise, true.
    */
-  MOZ_MUST_USE bool EnsureCommitCompoisition();
+  MOZ_MUST_USE bool EnsureCommitComposition();
 
   EditorBase* mEditorBase; // weak
   RefPtr<nsCaret> mCaret;
   bool mCommitText;
   bool mInTransaction;
   bool mMouseDownOrUpConsumedByIME;
 #ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH
   bool mHaveBidiKeyboards;
--- a/editor/libeditor/HTMLEditorEventListener.cpp
+++ b/editor/libeditor/HTMLEditorEventListener.cpp
@@ -67,17 +67,17 @@ HTMLEditorEventListener::MouseDown(Mouse
   if (NS_WARN_IF(!aMouseEvent) || DetachedFromEditor()) {
     return NS_OK;
   }
 
   // Even if it's not acceptable mousedown event (i.e., when mousedown
   // event is fired outside of the active editing host), we need to commit
   // composition because it will be change the selection to the clicked
   // point.  Then, we won't be able to commit the composition.
-  if (!EnsureCommitCompoisition()) {
+  if (!EnsureCommitComposition()) {
     return NS_OK;
   }
 
   WidgetMouseEvent* mousedownEvent =
     aMouseEvent->WidgetEventPtr()->AsMouseEvent();
 
   HTMLEditor* htmlEditor = mEditorBase->AsHTMLEditor();
   MOZ_ASSERT(htmlEditor);