Bug 1259667 - part5: rename WidgetSimpleGestureEvent.delta to mDelta. r=masayuki

MozReview-Commit-ID: D33mzFY8Vrn

--HG--
extra : rebase_source : 6d6493af599087537ab6bf469255bb9d7319e395
This commit is contained in:
Tetsuharu OHZEKI 2016-05-10 04:16:55 +09:00
Родитель a5f841b5dc
Коммит dd81b84720
7 изменённых файлов: 20 добавлений и 20 удалений

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

@ -1296,7 +1296,7 @@ nsDOMWindowUtils::SendSimpleGestureEvent(const nsAString& aType,
WidgetSimpleGestureEvent event(true, msg, widget); WidgetSimpleGestureEvent event(true, msg, widget);
event.mModifiers = nsContentUtils::GetWidgetModifiers(aModifiers); event.mModifiers = nsContentUtils::GetWidgetModifiers(aModifiers);
event.mDirection = aDirection; event.mDirection = aDirection;
event.delta = aDelta; event.mDelta = aDelta;
event.mClickCount = aClickCount; event.mClickCount = aClickCount;
event.mTime = PR_IntervalNow(); event.mTime = PR_IntervalNow();

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

@ -78,7 +78,7 @@ SimpleGestureEvent::GetDirection(uint32_t* aDirection)
double double
SimpleGestureEvent::Delta() SimpleGestureEvent::Delta()
{ {
return mEvent->AsSimpleGestureEvent()->delta; return mEvent->AsSimpleGestureEvent()->mDelta;
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -133,7 +133,7 @@ SimpleGestureEvent::InitSimpleGestureEvent(const nsAString& aTypeArg,
WidgetSimpleGestureEvent* simpleGestureEvent = mEvent->AsSimpleGestureEvent(); WidgetSimpleGestureEvent* simpleGestureEvent = mEvent->AsSimpleGestureEvent();
simpleGestureEvent->mAllowedDirections = aAllowedDirectionsArg; simpleGestureEvent->mAllowedDirections = aAllowedDirectionsArg;
simpleGestureEvent->mDirection = aDirectionArg; simpleGestureEvent->mDirection = aDirectionArg;
simpleGestureEvent->delta = aDeltaArg; simpleGestureEvent->mDelta = aDeltaArg;
simpleGestureEvent->mClickCount = aClickCountArg; simpleGestureEvent->mClickCount = aClickCountArg;
} }

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

@ -101,7 +101,7 @@ public:
, mAllowedDirections(0) , mAllowedDirections(0)
, mDirection(0) , mDirection(0)
, mClickCount(0) , mClickCount(0)
, delta(0.0) , mDelta(0.0)
{ {
} }
@ -111,7 +111,7 @@ public:
, mAllowedDirections(aOther.mAllowedDirections) , mAllowedDirections(aOther.mAllowedDirections)
, mDirection(aOther.mDirection) , mDirection(aOther.mDirection)
, mClickCount(0) , mClickCount(0)
, delta(aOther.delta) , mDelta(aOther.mDelta)
{ {
} }
@ -134,7 +134,7 @@ public:
// The number of taps for tap events // The number of taps for tap events
uint32_t mClickCount; uint32_t mClickCount;
// Delta for magnify and rotate events // Delta for magnify and rotate events
double delta; double mDelta;
// XXX Not tested by test_assign_event_data.html // XXX Not tested by test_assign_event_data.html
void AssignSimpleGestureEventData(const WidgetSimpleGestureEvent& aEvent, void AssignSimpleGestureEventData(const WidgetSimpleGestureEvent& aEvent,
@ -144,7 +144,7 @@ public:
// mAllowedDirections isn't copied // mAllowedDirections isn't copied
mDirection = aEvent.mDirection; mDirection = aEvent.mDirection;
delta = aEvent.delta; mDelta = aEvent.mDelta;
mClickCount = aEvent.mClickCount; mClickCount = aEvent.mClickCount;
} }
}; };

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

@ -2141,7 +2141,7 @@ nsWindow::OnNativeGestureEvent(AndroidGeckoEvent *ae)
WidgetSimpleGestureEvent event(true, msg, this); WidgetSimpleGestureEvent event(true, msg, this);
event.mDirection = 0; event.mDirection = 0;
event.delta = delta; event.mDelta = delta;
event.mModifiers = 0; event.mModifiers = 0;
event.mTime = ae->Time(); event.mTime = ae->Time();
event.mRefPoint = pt; event.mRefPoint = pt;

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

@ -212,7 +212,7 @@ SwipeTracker::SendSwipeEvent(EventMessage aMsg, uint32_t aDirection, double aDel
WidgetSimpleGestureEvent geckoEvent = WidgetSimpleGestureEvent geckoEvent =
CreateSwipeGestureEvent(aMsg, &mWidget, mEventPosition); CreateSwipeGestureEvent(aMsg, &mWidget, mEventPosition);
geckoEvent.mDirection = aDirection; geckoEvent.mDirection = aDirection;
geckoEvent.delta = aDelta; geckoEvent.mDelta = aDelta;
geckoEvent.mAllowedDirections = mAllowedDirections; geckoEvent.mAllowedDirections = mAllowedDirections;
return mWidget.DispatchWindowEvent(geckoEvent); return mWidget.DispatchWindowEvent(geckoEvent);
} }

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

@ -2578,7 +2578,7 @@ nsChildView::SendMayStartSwipe(const mozilla::PanGestureInput& aSwipeStartEvent)
SwipeTracker::CreateSwipeGestureEvent(eSwipeGestureMayStart, this, SwipeTracker::CreateSwipeGestureEvent(eSwipeGestureMayStart, this,
position); position);
geckoEvent.mDirection = direction; geckoEvent.mDirection = direction;
geckoEvent.delta = 0.0; geckoEvent.mDelta = 0.0;
geckoEvent.mAllowedDirections = 0; geckoEvent.mAllowedDirections = 0;
bool shouldStartSwipe = DispatchWindowEvent(geckoEvent); // event cancelled == swipe should start bool shouldStartSwipe = DispatchWindowEvent(geckoEvent); // event cancelled == swipe should start
@ -4253,7 +4253,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
// Setup the event. // Setup the event.
WidgetSimpleGestureEvent geckoEvent(true, msg, mGeckoChild); WidgetSimpleGestureEvent geckoEvent(true, msg, mGeckoChild);
geckoEvent.delta = deltaZ; geckoEvent.mDelta = deltaZ;
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent]; [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
// Send the event. // Send the event.
@ -4320,7 +4320,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
// Setup the event. // Setup the event.
WidgetSimpleGestureEvent geckoEvent(true, msg, mGeckoChild); WidgetSimpleGestureEvent geckoEvent(true, msg, mGeckoChild);
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent]; [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
geckoEvent.delta = -rotation; geckoEvent.mDelta = -rotation;
if (rotation > 0.0) { if (rotation > 0.0) {
geckoEvent.mDirection = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE; geckoEvent.mDirection = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
} else { } else {
@ -4355,7 +4355,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
{ {
// Setup the "magnify" event. // Setup the "magnify" event.
WidgetSimpleGestureEvent geckoEvent(true, eMagnifyGesture, mGeckoChild); WidgetSimpleGestureEvent geckoEvent(true, eMagnifyGesture, mGeckoChild);
geckoEvent.delta = mCumulativeMagnification; geckoEvent.mDelta = mCumulativeMagnification;
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent]; [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
// Send the event. // Send the event.
@ -4368,7 +4368,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
// Setup the "rotate" event. // Setup the "rotate" event.
WidgetSimpleGestureEvent geckoEvent(true, eRotateGesture, mGeckoChild); WidgetSimpleGestureEvent geckoEvent(true, eRotateGesture, mGeckoChild);
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent]; [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
geckoEvent.delta = -mCumulativeRotation; geckoEvent.mDelta = -mCumulativeRotation;
if (mCumulativeRotation > 0.0) { if (mCumulativeRotation > 0.0) {
geckoEvent.mDirection = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE; geckoEvent.mDirection = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
} else { } else {

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

@ -335,14 +335,14 @@ nsWinGesture::ProcessGestureMessage(HWND hWnd, WPARAM wParam, LPARAM lParam,
mZoomIntermediate = (float)gi.ullArguments; mZoomIntermediate = (float)gi.ullArguments;
evt.mMessage = eMagnifyGestureStart; evt.mMessage = eMagnifyGestureStart;
evt.delta = 0.0; evt.mDelta = 0.0;
} }
else if (gi.dwFlags & GF_END) { else if (gi.dwFlags & GF_END) {
// Send a zoom end event, the delta is the change // Send a zoom end event, the delta is the change
// in touch points. // in touch points.
evt.mMessage = eMagnifyGesture; evt.mMessage = eMagnifyGesture;
// (positive for a "zoom in") // (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; mZoomIntermediate = (float)gi.ullArguments;
} }
else { else {
@ -350,7 +350,7 @@ nsWinGesture::ProcessGestureMessage(HWND hWnd, WPARAM wParam, LPARAM lParam,
// in touch points. // in touch points.
evt.mMessage = eMagnifyGestureUpdate; evt.mMessage = eMagnifyGestureUpdate;
// (positive for a "zoom in") // (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; mZoomIntermediate = (float)gi.ullArguments;
} }
} }
@ -376,12 +376,12 @@ nsWinGesture::ProcessGestureMessage(HWND hWnd, WPARAM wParam, LPARAM lParam,
} }
evt.mDirection = 0; evt.mDirection = 0;
evt.delta = degrees - mRotateIntermediate; evt.mDelta = degrees - mRotateIntermediate;
mRotateIntermediate = degrees; mRotateIntermediate = degrees;
if (evt.delta > 0) if (evt.mDelta > 0)
evt.mDirection = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE; evt.mDirection = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
else if (evt.delta < 0) else if (evt.mDelta < 0)
evt.mDirection = nsIDOMSimpleGestureEvent::ROTATION_CLOCKWISE; evt.mDirection = nsIDOMSimpleGestureEvent::ROTATION_CLOCKWISE;
if (gi.dwFlags & GF_BEGIN) { if (gi.dwFlags & GF_BEGIN) {