Bug 1259656 part.2 Rename WidgetEvent::lastRefPoint to WidgetEvent::mLastRefPoint r?smaug
MozReview-Commit-ID: D5jK0bMzMx6
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -4212,17 +4212,17 @@ EventStateManager::GenerateMouseEnterExi
// The pointer is locked. If the pointer is not located at the center of
// the window, dispatch a synthetic mousemove to return the pointer there.
// Doing this between "real" pointer moves gives the impression that the
// (locked) pointer can continue moving and won't stop at the screen
// boundary. We cancel the synthetic event so that we don't end up
// dispatching the centering move event to content.
LayoutDeviceIntPoint center =
GetWindowClientRectCenter(aMouseEvent->mWidget);
- aMouseEvent->lastRefPoint = center;
+ aMouseEvent->mLastRefPoint = center;
if (aMouseEvent->mRefPoint != center) {
// Mouse move doesn't finish at the center of the window. Dispatch a
// synthetic native mouse event to move the pointer back to the center
// of the window, to faciliate more movement. But first, record that
// we've dispatched a synthetic mouse movement, so we can cancel it
// in the other branch here.
sSynthCenteringPoint = center;
aMouseEvent->mWidget->SynthesizeNativeMouseMove(
@@ -4235,19 +4235,19 @@ EventStateManager::GenerateMouseEnterExi
// targeted at the center.
sSynthCenteringPoint = kInvalidRefPoint;
}
} else if (sLastRefPoint == kInvalidRefPoint) {
// We don't have a valid previous mousemove mRefPoint. This is either
// the first move we've encountered, or the mouse has just re-entered
// the application window. We should report (0,0) movement for this
// case, so make the current and previous mRefPoints the same.
- aMouseEvent->lastRefPoint = aMouseEvent->mRefPoint;
+ aMouseEvent->mLastRefPoint = aMouseEvent->mRefPoint;
} else {
- aMouseEvent->lastRefPoint = sLastRefPoint;
+ aMouseEvent->mLastRefPoint = sLastRefPoint;
}
// Update the last known mRefPoint with the current mRefPoint.
sLastRefPoint = aMouseEvent->mRefPoint;
}
MOZ_FALLTHROUGH;
case ePointerMove:
case ePointerDown:
--- a/dom/events/UIEvent.cpp
+++ b/dom/events/UIEvent.cpp
@@ -126,17 +126,17 @@ UIEvent::GetMovementPoint()
mEvent->mClass != ePointerEventClass &&
mEvent->mClass != eSimpleGestureEventClass) ||
!mEvent->AsGUIEvent()->mWidget) {
return nsIntPoint(0, 0);
}
// Calculate the delta between the last screen point and the current one.
nsIntPoint current = DevPixelsToCSSPixels(mEvent->mRefPoint, mPresContext);
- nsIntPoint last = DevPixelsToCSSPixels(mEvent->lastRefPoint, mPresContext);
+ nsIntPoint last = DevPixelsToCSSPixels(mEvent->mLastRefPoint, mPresContext);
return current - last;
}
NS_IMETHODIMP
UIEvent::GetView(mozIDOMWindowProxy** aView)
{
*aView = mView;
NS_IF_ADDREF(*aView);
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -267,17 +267,17 @@ class WidgetEvent : public WidgetEventTi
protected:
WidgetEvent(bool aIsTrusted,
EventMessage aMessage,
EventClassID aEventClassID)
: WidgetEventTime()
, mClass(aEventClassID)
, mMessage(aMessage)
, mRefPoint(0, 0)
- , lastRefPoint(0, 0)
+ , mLastRefPoint(0, 0)
, userType(nullptr)
{
MOZ_COUNT_CTOR(WidgetEvent);
mFlags.Clear();
mFlags.mIsTrusted = aIsTrusted;
mFlags.mCancelable = true;
mFlags.mBubbles = true;
}
@@ -289,17 +289,17 @@ protected:
}
public:
WidgetEvent(bool aIsTrusted, EventMessage aMessage)
: WidgetEventTime()
, mClass(eBasicEventClass)
, mMessage(aMessage)
, mRefPoint(0, 0)
- , lastRefPoint(0, 0)
+ , mLastRefPoint(0, 0)
, userType(nullptr)
{
MOZ_COUNT_CTOR(WidgetEvent);
mFlags.Clear();
mFlags.mIsTrusted = aIsTrusted;
mFlags.mCancelable = true;
mFlags.mBubbles = true;
}
@@ -326,17 +326,17 @@ public:
}
EventClassID mClass;
EventMessage mMessage;
// Relative to the widget of the event, or if there is no widget then it is
// in screen coordinates. Not modified by layout code.
LayoutDeviceIntPoint mRefPoint;
// The previous mRefPoint, if known, used to calculate mouse movement deltas.
- LayoutDeviceIntPoint lastRefPoint;
+ LayoutDeviceIntPoint mLastRefPoint;
// See BaseEventFlags definition for the detail.
BaseEventFlags mFlags;
// Additional type info for user defined events
nsCOMPtr<nsIAtom> userType;
nsString typeString; // always set on non-main-thread events
@@ -345,17 +345,17 @@ public:
nsCOMPtr<dom::EventTarget> currentTarget;
nsCOMPtr<dom::EventTarget> originalTarget;
void AssignEventData(const WidgetEvent& aEvent, bool aCopyTargets)
{
// mClass should be initialized with the constructor.
// mMessage should be initialized with the constructor.
mRefPoint = aEvent.mRefPoint;
- // lastRefPoint doesn't need to be copied.
+ // mLastRefPoint doesn't need to be copied.
AssignEventTime(aEvent);
// mFlags should be copied manually if it's necessary.
userType = aEvent.userType;
// typeString should be copied manually if it's necessary.
target = aCopyTargets ? aEvent.target : nullptr;
currentTarget = aCopyTargets ? aEvent.currentTarget : nullptr;
originalTarget = aCopyTargets ? aEvent.originalTarget : nullptr;
}