diff --git a/content/events/src/nsDOMEvent.cpp b/content/events/src/nsDOMEvent.cpp index ccd433993777..e559c982e78f 100644 --- a/content/events/src/nsDOMEvent.cpp +++ b/content/events/src/nsDOMEvent.cpp @@ -605,10 +605,10 @@ nsDOMEvent::DuplicatePrivateData() } case NS_MOUSE_SCROLL_EVENT: { - nsMouseScrollEvent* oldMouseScrollEvent = - static_cast(mEvent); - nsMouseScrollEvent* mouseScrollEvent = - new nsMouseScrollEvent(false, msg, nullptr); + WidgetMouseScrollEvent* oldMouseScrollEvent = + static_cast(mEvent); + WidgetMouseScrollEvent* mouseScrollEvent = + new WidgetMouseScrollEvent(false, msg, nullptr); mouseScrollEvent->AssignMouseScrollEventData(*oldMouseScrollEvent, true); newEvent = mouseScrollEvent; break; diff --git a/content/events/src/nsDOMMouseEvent.cpp b/content/events/src/nsDOMMouseEvent.cpp index e3d95b385704..33f2cf1a495a 100644 --- a/content/events/src/nsDOMMouseEvent.cpp +++ b/content/events/src/nsDOMMouseEvent.cpp @@ -18,7 +18,7 @@ nsDOMMouseEvent::nsDOMMouseEvent(mozilla::dom::EventTarget* aOwner, new nsMouseEvent(false, 0, nullptr, nsMouseEvent::eReal)) { - // There's no way to make this class' ctor allocate an nsMouseScrollEvent. + // There's no way to make this class' ctor allocate an WidgetMouseScrollEvent. // It's not that important, though, since a scroll event is not a real // DOM event. diff --git a/content/events/src/nsDOMMouseScrollEvent.cpp b/content/events/src/nsDOMMouseScrollEvent.cpp index fbcfba846e69..bcf6445b92cf 100644 --- a/content/events/src/nsDOMMouseScrollEvent.cpp +++ b/content/events/src/nsDOMMouseScrollEvent.cpp @@ -13,7 +13,8 @@ nsDOMMouseScrollEvent::nsDOMMouseScrollEvent(mozilla::dom::EventTarget* aOwner, nsPresContext* aPresContext, WidgetInputEvent* aEvent) : nsDOMMouseEvent(aOwner, aPresContext, - aEvent ? aEvent : new nsMouseScrollEvent(false, 0, nullptr)) + aEvent ? aEvent : + new WidgetMouseScrollEvent(false, 0, nullptr)) { if (aEvent) { mEventIsInternal = false; @@ -25,7 +26,7 @@ nsDOMMouseScrollEvent::nsDOMMouseScrollEvent(mozilla::dom::EventTarget* aOwner, } if(mEvent->eventStructType == NS_MOUSE_SCROLL_EVENT) { - mDetail = static_cast(mEvent)->delta; + mDetail = static_cast(mEvent)->delta; } } @@ -35,7 +36,7 @@ nsDOMMouseScrollEvent::~nsDOMMouseScrollEvent() switch (mEvent->eventStructType) { case NS_MOUSE_SCROLL_EVENT: - delete static_cast(mEvent); + delete static_cast(mEvent); break; default: delete mEvent; @@ -66,7 +67,7 @@ nsDOMMouseScrollEvent::InitMouseScrollEvent(const nsAString & aType, bool aCanBu NS_ENSURE_SUCCESS(rv, rv); if (mEvent->eventStructType == NS_MOUSE_SCROLL_EVENT) { - static_cast(mEvent)->isHorizontal = + static_cast(mEvent)->isHorizontal = (aAxis == HORIZONTAL_AXIS); } @@ -86,7 +87,7 @@ int32_t nsDOMMouseScrollEvent::Axis() { if (mEvent->eventStructType == NS_MOUSE_SCROLL_EVENT) { - return static_cast(mEvent)->isHorizontal ? + return static_cast(mEvent)->isHorizontal ? static_cast(HORIZONTAL_AXIS) : static_cast(VERTICAL_AXIS); } diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index 51f363960f3f..8face3cbeaed 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -2478,8 +2478,8 @@ nsEventStateManager::SendLineScrollEvent(nsIFrame* aTargetFrame, targetContent = targetContent->GetParent(); } - nsMouseScrollEvent event(aEvent->mFlags.mIsTrusted, NS_MOUSE_SCROLL, - aEvent->widget); + WidgetMouseScrollEvent event(aEvent->mFlags.mIsTrusted, NS_MOUSE_SCROLL, + aEvent->widget); if (*aStatus == nsEventStatus_eConsumeNoDefault) { event.mFlags.mDefaultPrevented = true; } @@ -2514,8 +2514,8 @@ nsEventStateManager::SendPixelScrollEvent(nsIFrame* aTargetFrame, targetContent = targetContent->GetParent(); } - nsMouseScrollEvent event(aEvent->mFlags.mIsTrusted, NS_MOUSE_PIXEL_SCROLL, - aEvent->widget); + WidgetMouseScrollEvent event(aEvent->mFlags.mIsTrusted, NS_MOUSE_PIXEL_SCROLL, + aEvent->widget); if (*aStatus == nsEventStatus_eConsumeNoDefault) { event.mFlags.mDefaultPrevented = true; } diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index 5fd7af928009..d20fa671a7e8 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -43,7 +43,6 @@ using nsIntRect; using nsIntSize; using mozilla::WidgetKeyboardEvent; using nsMouseEvent; -using nsMouseScrollEvent; using mozilla::WheelEvent; using nsRect; using mozilla::WidgetSelectionEvent; diff --git a/widget/EventForwards.h b/widget/EventForwards.h index db60b1197aa5..f217fbef737f 100644 --- a/widget/EventForwards.h +++ b/widget/EventForwards.h @@ -106,7 +106,6 @@ class InternalMutationEvent; typedef mozilla::WidgetEvent nsEvent; typedef mozilla::WidgetGUIEvent nsGUIEvent; typedef mozilla::WidgetMouseEvent nsMouseEvent; -typedef mozilla::WidgetMouseScrollEvent nsMouseScrollEvent; namespace mozilla { typedef WidgetWheelEvent WheelEvent; diff --git a/widget/MouseEvents.h b/widget/MouseEvents.h index 1373027da5d5..a604f0a0da11 100644 --- a/widget/MouseEvents.h +++ b/widget/MouseEvents.h @@ -425,6 +425,5 @@ typedef WidgetWheelEvent WheelEvent; // TODO: Remove following typedefs typedef mozilla::WidgetMouseEvent nsMouseEvent; -typedef mozilla::WidgetMouseScrollEvent nsMouseScrollEvent; #endif // mozilla_MouseEvents_h__ diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 69bad8854a2e..7718b045c1c5 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -4122,9 +4122,9 @@ NSEvent* gLastDragMouseDownEvent = nil; // Only initiate tracking if the user has tried to scroll past the edge of // the current page (as indicated by 'overflow' being non-zero). Gecko only - // sets nsMouseScrollEvent.scrollOverflow when it's processing + // sets WidgetMouseScrollEvent.scrollOverflow when it's processing // NS_MOUSE_PIXEL_SCROLL events (not NS_MOUSE_SCROLL events). - // nsMouseScrollEvent.scrollOverflow only indicates left or right overflow + // WidgetMouseScrollEvent.scrollOverflow only indicates left or right overflow // for horizontal NS_MOUSE_PIXEL_SCROLL events. if (!overflow) { return;