зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1259667 - part5: rename WidgetSimpleGestureEvent.delta to mDelta. r=masayuki
MozReview-Commit-ID: D33mzFY8Vrn --HG-- extra : rebase_source : 6d6493af599087537ab6bf469255bb9d7319e395
This commit is contained in:
Родитель
a5f841b5dc
Коммит
dd81b84720
|
@ -1296,7 +1296,7 @@ nsDOMWindowUtils::SendSimpleGestureEvent(const nsAString& aType,
|
|||
WidgetSimpleGestureEvent event(true, msg, widget);
|
||||
event.mModifiers = nsContentUtils::GetWidgetModifiers(aModifiers);
|
||||
event.mDirection = aDirection;
|
||||
event.delta = aDelta;
|
||||
event.mDelta = aDelta;
|
||||
event.mClickCount = aClickCount;
|
||||
event.mTime = PR_IntervalNow();
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ SimpleGestureEvent::GetDirection(uint32_t* aDirection)
|
|||
double
|
||||
SimpleGestureEvent::Delta()
|
||||
{
|
||||
return mEvent->AsSimpleGestureEvent()->delta;
|
||||
return mEvent->AsSimpleGestureEvent()->mDelta;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -133,7 +133,7 @@ SimpleGestureEvent::InitSimpleGestureEvent(const nsAString& aTypeArg,
|
|||
WidgetSimpleGestureEvent* simpleGestureEvent = mEvent->AsSimpleGestureEvent();
|
||||
simpleGestureEvent->mAllowedDirections = aAllowedDirectionsArg;
|
||||
simpleGestureEvent->mDirection = aDirectionArg;
|
||||
simpleGestureEvent->delta = aDeltaArg;
|
||||
simpleGestureEvent->mDelta = aDeltaArg;
|
||||
simpleGestureEvent->mClickCount = aClickCountArg;
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ public:
|
|||
, mAllowedDirections(0)
|
||||
, mDirection(0)
|
||||
, mClickCount(0)
|
||||
, delta(0.0)
|
||||
, mDelta(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ public:
|
|||
, mAllowedDirections(aOther.mAllowedDirections)
|
||||
, mDirection(aOther.mDirection)
|
||||
, mClickCount(0)
|
||||
, delta(aOther.delta)
|
||||
, mDelta(aOther.mDelta)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ public:
|
|||
// The number of taps for tap events
|
||||
uint32_t mClickCount;
|
||||
// Delta for magnify and rotate events
|
||||
double delta;
|
||||
double mDelta;
|
||||
|
||||
// XXX Not tested by test_assign_event_data.html
|
||||
void AssignSimpleGestureEventData(const WidgetSimpleGestureEvent& aEvent,
|
||||
|
@ -144,7 +144,7 @@ public:
|
|||
|
||||
// mAllowedDirections isn't copied
|
||||
mDirection = aEvent.mDirection;
|
||||
delta = aEvent.delta;
|
||||
mDelta = aEvent.mDelta;
|
||||
mClickCount = aEvent.mClickCount;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2141,7 +2141,7 @@ nsWindow::OnNativeGestureEvent(AndroidGeckoEvent *ae)
|
|||
WidgetSimpleGestureEvent event(true, msg, this);
|
||||
|
||||
event.mDirection = 0;
|
||||
event.delta = delta;
|
||||
event.mDelta = delta;
|
||||
event.mModifiers = 0;
|
||||
event.mTime = ae->Time();
|
||||
event.mRefPoint = pt;
|
||||
|
|
|
@ -212,7 +212,7 @@ SwipeTracker::SendSwipeEvent(EventMessage aMsg, uint32_t aDirection, double aDel
|
|||
WidgetSimpleGestureEvent geckoEvent =
|
||||
CreateSwipeGestureEvent(aMsg, &mWidget, mEventPosition);
|
||||
geckoEvent.mDirection = aDirection;
|
||||
geckoEvent.delta = aDelta;
|
||||
geckoEvent.mDelta = aDelta;
|
||||
geckoEvent.mAllowedDirections = mAllowedDirections;
|
||||
return mWidget.DispatchWindowEvent(geckoEvent);
|
||||
}
|
||||
|
|
|
@ -2578,7 +2578,7 @@ nsChildView::SendMayStartSwipe(const mozilla::PanGestureInput& aSwipeStartEvent)
|
|||
SwipeTracker::CreateSwipeGestureEvent(eSwipeGestureMayStart, this,
|
||||
position);
|
||||
geckoEvent.mDirection = direction;
|
||||
geckoEvent.delta = 0.0;
|
||||
geckoEvent.mDelta = 0.0;
|
||||
geckoEvent.mAllowedDirections = 0;
|
||||
bool shouldStartSwipe = DispatchWindowEvent(geckoEvent); // event cancelled == swipe should start
|
||||
|
||||
|
@ -4253,7 +4253,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
|
||||
// Setup the event.
|
||||
WidgetSimpleGestureEvent geckoEvent(true, msg, mGeckoChild);
|
||||
geckoEvent.delta = deltaZ;
|
||||
geckoEvent.mDelta = deltaZ;
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
// Send the event.
|
||||
|
@ -4320,7 +4320,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
// Setup the event.
|
||||
WidgetSimpleGestureEvent geckoEvent(true, msg, mGeckoChild);
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.delta = -rotation;
|
||||
geckoEvent.mDelta = -rotation;
|
||||
if (rotation > 0.0) {
|
||||
geckoEvent.mDirection = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
|
||||
} else {
|
||||
|
@ -4355,7 +4355,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
{
|
||||
// Setup the "magnify" event.
|
||||
WidgetSimpleGestureEvent geckoEvent(true, eMagnifyGesture, mGeckoChild);
|
||||
geckoEvent.delta = mCumulativeMagnification;
|
||||
geckoEvent.mDelta = mCumulativeMagnification;
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
|
||||
// Send the event.
|
||||
|
@ -4368,7 +4368,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
// Setup the "rotate" event.
|
||||
WidgetSimpleGestureEvent geckoEvent(true, eRotateGesture, mGeckoChild);
|
||||
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
|
||||
geckoEvent.delta = -mCumulativeRotation;
|
||||
geckoEvent.mDelta = -mCumulativeRotation;
|
||||
if (mCumulativeRotation > 0.0) {
|
||||
geckoEvent.mDirection = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
|
||||
} else {
|
||||
|
|
|
@ -335,14 +335,14 @@ nsWinGesture::ProcessGestureMessage(HWND hWnd, WPARAM wParam, LPARAM lParam,
|
|||
mZoomIntermediate = (float)gi.ullArguments;
|
||||
|
||||
evt.mMessage = eMagnifyGestureStart;
|
||||
evt.delta = 0.0;
|
||||
evt.mDelta = 0.0;
|
||||
}
|
||||
else if (gi.dwFlags & GF_END) {
|
||||
// Send a zoom end event, the delta is the change
|
||||
// in touch points.
|
||||
evt.mMessage = eMagnifyGesture;
|
||||
// (positive for a "zoom in")
|
||||
evt.delta = -1.0 * (mZoomIntermediate - (float)gi.ullArguments);
|
||||
evt.mDelta = -1.0 * (mZoomIntermediate - (float)gi.ullArguments);
|
||||
mZoomIntermediate = (float)gi.ullArguments;
|
||||
}
|
||||
else {
|
||||
|
@ -350,7 +350,7 @@ nsWinGesture::ProcessGestureMessage(HWND hWnd, WPARAM wParam, LPARAM lParam,
|
|||
// in touch points.
|
||||
evt.mMessage = eMagnifyGestureUpdate;
|
||||
// (positive for a "zoom in")
|
||||
evt.delta = -1.0 * (mZoomIntermediate - (float)gi.ullArguments);
|
||||
evt.mDelta = -1.0 * (mZoomIntermediate - (float)gi.ullArguments);
|
||||
mZoomIntermediate = (float)gi.ullArguments;
|
||||
}
|
||||
}
|
||||
|
@ -376,12 +376,12 @@ nsWinGesture::ProcessGestureMessage(HWND hWnd, WPARAM wParam, LPARAM lParam,
|
|||
}
|
||||
|
||||
evt.mDirection = 0;
|
||||
evt.delta = degrees - mRotateIntermediate;
|
||||
evt.mDelta = degrees - mRotateIntermediate;
|
||||
mRotateIntermediate = degrees;
|
||||
|
||||
if (evt.delta > 0)
|
||||
if (evt.mDelta > 0)
|
||||
evt.mDirection = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
|
||||
else if (evt.delta < 0)
|
||||
else if (evt.mDelta < 0)
|
||||
evt.mDirection = nsIDOMSimpleGestureEvent::ROTATION_CLOCKWISE;
|
||||
|
||||
if (gi.dwFlags & GF_BEGIN) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче