Bug 1259664 part.3 Rename WidgetWheelEvent::deltaZ to WidgetWheelEvent::mDeltaZ r=smaug

MozReview-Commit-ID: BbxTrLko8kp

--HG--
extra : rebase_source : 1aa8b1086791442dc15ac5464b7ecd3716203ccd
This commit is contained in:
Masayuki Nakano 2016-03-31 18:18:34 +09:00
Родитель 6aedccbde5
Коммит 3450ec21e1
7 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -795,7 +795,7 @@ nsDOMWindowUtils::SendWheelEvent(float aX,
wheelEvent.mModifiers = nsContentUtils::GetWidgetModifiers(aModifiers);
wheelEvent.mDeltaX = aDeltaX;
wheelEvent.mDeltaY = aDeltaY;
wheelEvent.deltaZ = aDeltaZ;
wheelEvent.mDeltaZ = aDeltaZ;
wheelEvent.deltaMode = aDeltaMode;
wheelEvent.isMomentum =
(aOptions & WHEEL_EVENT_CAUSED_BY_MOMENTUM) != 0;

Просмотреть файл

@ -5642,7 +5642,7 @@ EventStateManager::WheelPrefs::ApplyUserPrefsToDelta(WidgetWheelEvent* aEvent)
aEvent->mDeltaX *= mMultiplierX[index];
aEvent->mDeltaY *= mMultiplierY[index];
aEvent->deltaZ *= mMultiplierZ[index];
aEvent->mDeltaZ *= mMultiplierZ[index];
// If the multiplier is 1.0 or -1.0, i.e., it doesn't change the absolute
// value, we should use lineOrPageDelta values which were set by widget.
@ -5689,7 +5689,7 @@ EventStateManager::WheelPrefs::ComputeActionFor(WidgetWheelEvent* aEvent)
bool deltaXPreferred =
(Abs(aEvent->mDeltaX) > Abs(aEvent->mDeltaY) &&
Abs(aEvent->mDeltaX) > Abs(aEvent->deltaZ));
Abs(aEvent->mDeltaX) > Abs(aEvent->mDeltaZ));
Action* actions = deltaXPreferred ? mOverriddenActionsX : mActions;
if (actions[index] == ACTION_NONE || actions[index] == ACTION_SCROLL) {
return actions[index];

Просмотреть файл

@ -67,7 +67,7 @@ WheelEvent::InitWheelEvent(const nsAString& aType,
WidgetWheelEvent* wheelEvent = mEvent->AsWheelEvent();
wheelEvent->mDeltaX = aDeltaX;
wheelEvent->mDeltaY = aDeltaY;
wheelEvent->deltaZ = aDeltaZ;
wheelEvent->mDeltaZ = aDeltaZ;
wheelEvent->deltaMode = aDeltaMode;
}
@ -95,9 +95,9 @@ double
WheelEvent::DeltaZ()
{
if (!mAppUnitsPerDevPixel) {
return mEvent->AsWheelEvent()->deltaZ;
return mEvent->AsWheelEvent()->mDeltaZ;
}
return mEvent->AsWheelEvent()->deltaZ *
return mEvent->AsWheelEvent()->mDeltaZ *
mAppUnitsPerDevPixel / nsPresContext::AppUnitsPerCSSPixel();
}

Просмотреть файл

@ -450,7 +450,7 @@ private:
WidgetWheelEvent()
: mDeltaX(0.0)
, mDeltaY(0.0)
, deltaZ(0.0)
, mDeltaZ(0.0)
, deltaMode(nsIDOMWheelEvent::DOM_DELTA_PIXEL)
, customizedByUserPrefs(false)
, isMomentum(false)
@ -473,7 +473,7 @@ public:
: WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, eWheelEventClass)
, mDeltaX(0.0)
, mDeltaY(0.0)
, deltaZ(0.0)
, mDeltaZ(0.0)
, deltaMode(nsIDOMWheelEvent::DOM_DELTA_PIXEL)
, customizedByUserPrefs(false)
, mayHaveMomentum(false)
@ -511,13 +511,13 @@ public:
this->overflowDeltaX != 0.0;
}
// NOTE: mDeltaX, mDeltaY and deltaZ may be customized by
// NOTE: mDeltaX, mDeltaY and mDeltaZ may be customized by
// mousewheel.*.delta_multiplier_* prefs which are applied by
// EventStateManager. So, after widget dispatches this event,
// these delta values may have different values than before.
double mDeltaX;
double mDeltaY;
double deltaZ;
double mDeltaZ;
// Should be one of nsIDOMWheelEvent::DOM_DELTA_*
uint32_t deltaMode;
@ -583,7 +583,7 @@ public:
// nsEventStateManger. If the default action of the wheel event isn't scroll,
// these values always zero. Otherwise, remaning delta values which are
// not used by scroll are set.
// NOTE: mDeltaX, mDeltaY and deltaZ may be modified by EventStateManager.
// NOTE: mDeltaX, mDeltaY and mDeltaZ may be modified by EventStateManager.
// However, overflowDeltaX and overflowDeltaY indicate unused original
// delta values which are not applied the delta_multiplier prefs.
// So, if widget wanted to know the actual direction to be scrolled,
@ -612,7 +612,7 @@ public:
mDeltaX = aEvent.mDeltaX;
mDeltaY = aEvent.mDeltaY;
deltaZ = aEvent.deltaZ;
mDeltaZ = aEvent.mDeltaZ;
deltaMode = aEvent.deltaMode;
customizedByUserPrefs = aEvent.customizedByUserPrefs;
mayHaveMomentum = aEvent.mayHaveMomentum;

Просмотреть файл

@ -278,7 +278,7 @@ WidgetEvent::IsAllowedToDispatchDOMEvent() const
// shouldn't cause a DOM event.
const WidgetWheelEvent* wheelEvent = AsWheelEvent();
return wheelEvent->mDeltaX != 0.0 || wheelEvent->mDeltaY != 0.0 ||
wheelEvent->deltaZ != 0.0;
wheelEvent->mDeltaZ != 0.0;
}
// Following events are handled in EventStateManager, so, we don't need to

Просмотреть файл

@ -162,7 +162,7 @@ struct ParamTraits<mozilla::WidgetWheelEvent>
WriteParam(aMsg, static_cast<mozilla::WidgetMouseEventBase>(aParam));
WriteParam(aMsg, aParam.mDeltaX);
WriteParam(aMsg, aParam.mDeltaY);
WriteParam(aMsg, aParam.deltaZ);
WriteParam(aMsg, aParam.mDeltaZ);
WriteParam(aMsg, aParam.deltaMode);
WriteParam(aMsg, aParam.customizedByUserPrefs);
WriteParam(aMsg, aParam.mayHaveMomentum);
@ -186,7 +186,7 @@ struct ParamTraits<mozilla::WidgetWheelEvent>
static_cast<mozilla::WidgetMouseEventBase*>(aResult)) &&
ReadParam(aMsg, aIter, &aResult->mDeltaX) &&
ReadParam(aMsg, aIter, &aResult->mDeltaY) &&
ReadParam(aMsg, aIter, &aResult->deltaZ) &&
ReadParam(aMsg, aIter, &aResult->mDeltaZ) &&
ReadParam(aMsg, aIter, &aResult->deltaMode) &&
ReadParam(aMsg, aIter, &aResult->customizedByUserPrefs) &&
ReadParam(aMsg, aIter, &aResult->mayHaveMomentum) &&

Просмотреть файл

@ -565,7 +565,7 @@ nsWinGesture::PanFeedbackFinalize(HWND hWnd, bool endFeedback)
bool
nsWinGesture::PanDeltaToPixelScroll(WidgetWheelEvent& aWheelEvent)
{
aWheelEvent.mDeltaX = aWheelEvent.mDeltaY = aWheelEvent.deltaZ = 0.0;
aWheelEvent.mDeltaX = aWheelEvent.mDeltaY = aWheelEvent.mDeltaZ = 0.0;
aWheelEvent.lineOrPageDeltaX = aWheelEvent.lineOrPageDeltaY = 0;
aWheelEvent.refPoint.x = mPanRefPoint.x;