Commit e675c834 authored by Masayuki Nakano's avatar Masayuki Nakano
Browse files

Bug 1691622 - part 8: Get rid of `nsIDOMWindowUtils::SendNativeMouseMove()` r=smaug

Now, there are no users of this API.  However,
`nsIWidget::SynthesizeNativeMouseMove()` is still used by `EventStateManager`.
Even though it's just redirected to `nsIWidget::SynthesizeNativeMouseEvent()`,
but it hides the native event message from `EventStateManager`.  Therefore,
this patch keeps the widget API for now.

Differential Revision: https://phabricator.services.mozilla.com/D105762
parent bc2a8bc1
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -1047,22 +1047,6 @@ nsDOMWindowUtils::SendNativeMouseEvent(int32_t aScreenX, int32_t aScreenY,
  return NS_OK;
}

NS_IMETHODIMP
nsDOMWindowUtils::SendNativeMouseMove(int32_t aScreenX, int32_t aScreenY,
                                      Element* aElement,
                                      nsIObserver* aObserver) {
  // get the widget to send the event to
  nsCOMPtr<nsIWidget> widget = GetWidgetForElement(aElement);
  if (!widget) return NS_ERROR_FAILURE;

  NS_DispatchToMainThread(NativeInputRunnable::Create(
      NewRunnableMethod<LayoutDeviceIntPoint, nsIObserver*>(
          "nsIWidget::SynthesizeNativeMouseMove", widget,
          &nsIWidget::SynthesizeNativeMouseMove,
          LayoutDeviceIntPoint(aScreenX, aScreenY), aObserver)));
  return NS_OK;
}

NS_IMETHODIMP
nsDOMWindowUtils::SendNativeMouseScrollEvent(
    int32_t aScreenX, int32_t aScreenY, uint32_t aNativeMessage, double aDeltaX,
+0 −7
Original line number Diff line number Diff line
@@ -535,13 +535,6 @@ interface nsIDOMWindowUtils : nsISupports {
                            in unsigned long aModifierFlags,
                            in Element aElement,
                            [optional] in nsIObserver aObserver);
  /**
   * See nsIWidget::SynthesizeNativeMouseMove and sendNativeMouseEvent
   */
  void sendNativeMouseMove(in long aScreenX,
                           in long aScreenY,
                           in Element aElement,
                           [optional] in nsIObserver aObserver);

  /**
   * Suppress animations that are applied to a window by OS when