Bug 1259664 part.6 Rename WidgetWheelEvent::mayHaveMomentum to WidgetWheelEvent::mMayHaveMomentum r?smaug
MozReview-Commit-ID: E6kS0pkOZby
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -3171,17 +3171,17 @@ EventStateManager::PostHandleEvent(nsPre
nsPluginFrame* pluginFrame = do_QueryFrame(frameToScroll);
// When APZ is enabled, the actual scroll animation might be handled by
// the compositor.
WheelPrefs::Action action;
if (pluginFrame) {
MOZ_ASSERT(pluginFrame->WantsToHandleWheelEventAsDefaultAction());
action = WheelPrefs::ACTION_SEND_TO_PLUGIN;
- } else if (!wheelEvent->mayHaveMomentum &&
+ } else if (!wheelEvent->mMayHaveMomentum &&
nsLayoutUtils::IsScrollFrameWithSnapping(frameToScroll)) {
// If the target has scroll-snapping points then we want to handle
// the wheel event on the main thread even if we have APZ enabled. Do
// so and let the APZ know that it should ignore this event. However,
// if the wheel event is synthesized from a Mac trackpad or other device
// that can generate additional momentum events, then we should allow
// APZ to handle it, because it will track the velocity and predicted
// destination from the momentum.
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -387,17 +387,17 @@ PanGestureInput::ToWidgetWheelEvent(nsIW
wheelEvent.mModifiers = this->modifiers;
wheelEvent.mTime = mTime;
wheelEvent.mTimeStamp = mTimeStamp;
wheelEvent.refPoint =
RoundedToInt(ViewAs<LayoutDevicePixel>(mPanStartPoint,
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
wheelEvent.buttons = 0;
wheelEvent.mDeltaMode = nsIDOMWheelEvent::DOM_DELTA_PIXEL;
- wheelEvent.mayHaveMomentum = true; // pan inputs may have momentum
+ wheelEvent.mMayHaveMomentum = true; // pan inputs may have momentum
wheelEvent.isMomentum = IsMomentum();
wheelEvent.lineOrPageDeltaX = mLineOrPageDeltaX;
wheelEvent.lineOrPageDeltaY = mLineOrPageDeltaY;
wheelEvent.mDeltaX = mPanDisplacement.x;
wheelEvent.mDeltaY = mPanDisplacement.y;
wheelEvent.mFlags.mHandledByAPZ = mHandledByAPZ;
return wheelEvent;
}
@@ -465,17 +465,17 @@ ScrollWheelInput::ScrollWheelInput(const
, mHandledByAPZ(aWheelEvent.mFlags.mHandledByAPZ)
, mDeltaX(aWheelEvent.mDeltaX)
, mDeltaY(aWheelEvent.mDeltaY)
, mLineOrPageDeltaX(aWheelEvent.lineOrPageDeltaX)
, mLineOrPageDeltaY(aWheelEvent.lineOrPageDeltaY)
, mScrollSeriesNumber(0)
, mUserDeltaMultiplierX(1.0)
, mUserDeltaMultiplierY(1.0)
- , mMayHaveMomentum(aWheelEvent.mayHaveMomentum)
+ , mMayHaveMomentum(aWheelEvent.mMayHaveMomentum)
, mIsMomentum(aWheelEvent.isMomentum)
, mAllowToOverrideSystemScrollSpeed(
aWheelEvent.mAllowToOverrideSystemScrollSpeed)
{
mOrigin =
ScreenPoint(ViewAs<ScreenPixel>(aWheelEvent.refPoint,
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
}
@@ -487,17 +487,17 @@ ScrollWheelInput::ToWidgetWheelEvent(nsI
wheelEvent.mModifiers = this->modifiers;
wheelEvent.mTime = mTime;
wheelEvent.mTimeStamp = mTimeStamp;
wheelEvent.refPoint =
RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
wheelEvent.buttons = 0;
wheelEvent.mDeltaMode = DeltaModeForDeltaType(mDeltaType);
- wheelEvent.mayHaveMomentum = mMayHaveMomentum;
+ wheelEvent.mMayHaveMomentum = mMayHaveMomentum;
wheelEvent.isMomentum = mIsMomentum;
wheelEvent.mDeltaX = mDeltaX;
wheelEvent.mDeltaY = mDeltaY;
wheelEvent.lineOrPageDeltaX = mLineOrPageDeltaX;
wheelEvent.lineOrPageDeltaY = mLineOrPageDeltaY;
wheelEvent.mAllowToOverrideSystemScrollSpeed =
mAllowToOverrideSystemScrollSpeed;
wheelEvent.mFlags.mHandledByAPZ = mHandledByAPZ;
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -471,17 +471,17 @@ public:
WidgetWheelEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget)
: WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, eWheelEventClass)
, mDeltaX(0.0)
, mDeltaY(0.0)
, mDeltaZ(0.0)
, mDeltaMode(nsIDOMWheelEvent::DOM_DELTA_PIXEL)
, mCustomizedByUserPrefs(false)
- , mayHaveMomentum(false)
+ , mMayHaveMomentum(false)
, isMomentum(false)
, mIsNoLineOrPageDelta(false)
, lineOrPageDeltaX(0)
, lineOrPageDeltaY(0)
, scrollType(SCROLL_DEFAULT)
, overflowDeltaX(0.0)
, overflowDeltaY(0.0)
, mViewPortIsOverscrolled(false)
@@ -524,17 +524,17 @@ public:
// Following members are for internal use only, not for DOM event.
// If the delta values are computed from prefs, this value is true.
// Otherwise, i.e., they are computed from native events, false.
bool mCustomizedByUserPrefs;
// true if the momentum events directly tied to this event may follow it.
- bool mayHaveMomentum;
+ bool mMayHaveMomentum;
// true if the event is caused by momentum.
bool isMomentum;
// If device event handlers don't know when they should set lineOrPageDeltaX
// and lineOrPageDeltaY, this is true. Otherwise, false.
// If mIsNoLineOrPageDelta is true, ESM will generate
// eLegacyMouseLineOrPageScroll events when accumulated delta values reach
// a line height.
@@ -610,17 +610,17 @@ public:
{
AssignMouseEventBaseData(aEvent, aCopyTargets);
mDeltaX = aEvent.mDeltaX;
mDeltaY = aEvent.mDeltaY;
mDeltaZ = aEvent.mDeltaZ;
mDeltaMode = aEvent.mDeltaMode;
mCustomizedByUserPrefs = aEvent.mCustomizedByUserPrefs;
- mayHaveMomentum = aEvent.mayHaveMomentum;
+ mMayHaveMomentum = aEvent.mMayHaveMomentum;
isMomentum = aEvent.isMomentum;
mIsNoLineOrPageDelta = aEvent.mIsNoLineOrPageDelta;
lineOrPageDeltaX = aEvent.lineOrPageDeltaX;
lineOrPageDeltaY = aEvent.lineOrPageDeltaY;
scrollType = aEvent.scrollType;
overflowDeltaX = aEvent.overflowDeltaX;
overflowDeltaY = aEvent.overflowDeltaY;
mViewPortIsOverscrolled = aEvent.mViewPortIsOverscrolled;
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -160,17 +160,17 @@ struct ParamTraits<mozilla::WidgetWheelE
static void Write(Message* aMsg, const paramType& aParam)
{
WriteParam(aMsg, static_cast<mozilla::WidgetMouseEventBase>(aParam));
WriteParam(aMsg, aParam.mDeltaX);
WriteParam(aMsg, aParam.mDeltaY);
WriteParam(aMsg, aParam.mDeltaZ);
WriteParam(aMsg, aParam.mDeltaMode);
WriteParam(aMsg, aParam.mCustomizedByUserPrefs);
- WriteParam(aMsg, aParam.mayHaveMomentum);
+ WriteParam(aMsg, aParam.mMayHaveMomentum);
WriteParam(aMsg, aParam.isMomentum);
WriteParam(aMsg, aParam.mIsNoLineOrPageDelta);
WriteParam(aMsg, aParam.lineOrPageDeltaX);
WriteParam(aMsg, aParam.lineOrPageDeltaY);
WriteParam(aMsg, static_cast<int32_t>(aParam.scrollType));
WriteParam(aMsg, aParam.overflowDeltaX);
WriteParam(aMsg, aParam.overflowDeltaY);
WriteParam(aMsg, aParam.mViewPortIsOverscrolled);
@@ -184,17 +184,17 @@ struct ParamTraits<mozilla::WidgetWheelE
bool rv =
ReadParam(aMsg, aIter,
static_cast<mozilla::WidgetMouseEventBase*>(aResult)) &&
ReadParam(aMsg, aIter, &aResult->mDeltaX) &&
ReadParam(aMsg, aIter, &aResult->mDeltaY) &&
ReadParam(aMsg, aIter, &aResult->mDeltaZ) &&
ReadParam(aMsg, aIter, &aResult->mDeltaMode) &&
ReadParam(aMsg, aIter, &aResult->mCustomizedByUserPrefs) &&
- ReadParam(aMsg, aIter, &aResult->mayHaveMomentum) &&
+ ReadParam(aMsg, aIter, &aResult->mMayHaveMomentum) &&
ReadParam(aMsg, aIter, &aResult->isMomentum) &&
ReadParam(aMsg, aIter, &aResult->mIsNoLineOrPageDelta) &&
ReadParam(aMsg, aIter, &aResult->lineOrPageDeltaX) &&
ReadParam(aMsg, aIter, &aResult->lineOrPageDeltaY) &&
ReadParam(aMsg, aIter, &scrollType) &&
ReadParam(aMsg, aIter, &aResult->overflowDeltaX) &&
ReadParam(aMsg, aIter, &aResult->overflowDeltaY) &&
ReadParam(aMsg, aIter, &aResult->mViewPortIsOverscrolled) &&